summaryrefslogtreecommitdiff
path: root/tests/scanner/annotation.h
diff options
context:
space:
mode:
authorAndreas Rottmann <a.rottmann@gmx.at>2009-03-23 23:19:24 +0100
committerAndreas Rottmann <a.rottmann@gmx.at>2009-03-23 23:19:24 +0100
commitcf7621f31c6b3eaf29e1da82631a9404f8b1c036 (patch)
tree21501ed5345aa84b289046927632531d23135f6f /tests/scanner/annotation.h
parentbec176d20df2f0e25a0f3dc84a3dbe3edeecd65f (diff)
downloadgobject-introspection-cf7621f31c6b3eaf29e1da82631a9404f8b1c036.tar.gz
Bug 574284 - Add support for a 'closure' and 'destroy' annotations
This allows to annotate cases where the heuristics don't work. TODO: According to Juerbi, there are cases where two callbacks refer to the same user_data, which is prohibited by the current implementation. Signed-off-by: Andreas Rottmann <a.rottmann@gmx.at>
Diffstat (limited to 'tests/scanner/annotation.h')
-rw-r--r--tests/scanner/annotation.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/scanner/annotation.h b/tests/scanner/annotation.h
index e43e7ba6..745a94b6 100644
--- a/tests/scanner/annotation.h
+++ b/tests/scanner/annotation.h
@@ -22,6 +22,15 @@ typedef const gint* (*AnnotationCallback) (const gint *in);
typedef GList* (*AnnotationListCallback) (GList *in);
/**
+ * AnnotationNotifyFunc:
+ * @data: (closure): The user data
+ *
+ * This is a callback with a 'closure' argument that is not named
+ * 'user_data' and hence has to be annotated.
+ */
+typedef void (*AnnotationNotifyFunc) (gpointer data);
+
+/**
* AnnotationObject:
*
* This is an object used to test annotations.
@@ -122,6 +131,9 @@ void annotation_string_zero_terminated_out (char ***out);
void annotation_object_extra_annos (AnnotationObject *object);
+void annotation_custom_destroy (AnnotationCallback callback,
+ AnnotationNotifyFunc destroy,
+ gpointer data);
char * annotation_get_source_file (void);
void annotation_set_source_file (const char *fname);