Index: gobject-introspection-1.31.1/tests/gimarshallingtests.c
===================================================================
--- gobject-introspection-1.31.1.orig/tests/gimarshallingtests.c
+++ gobject-introspection-1.31.1/tests/gimarshallingtests.c
@@ -3596,6 +3596,32 @@ gi_marshalling_tests_object_method_with_
     GI_MARSHALLING_TESTS_OBJECT_GET_CLASS (self)->method_with_default_implementation (self, in);
 }
 
+static int _callback(int val)
+{
+    return val;
+}
+
+/**
+ * gi_marshalling_tests_object_callback:
+ */
+void
+gi_marshalling_tests_object_callback (GIMarshallingTestsObject *self)
+{
+  GI_MARSHALLING_TESTS_OBJECT_GET_CLASS (self)->method_callback (self, (GIMarshallingTestsCallback) _callback, NULL);
+}
+
+/**
+ * gi_marshalling_tests_object_callback2:
+ * @cb: (scope call) (closure data): a callback
+ * @data: callback user data
+ * Virtual: method_callback
+ */
+void
+gi_marshalling_tests_object_callback2 (GIMarshallingTestsObject *self, GIMarshallingTestsCallback cb, gpointer data)
+{
+  GI_MARSHALLING_TESTS_OBJECT_GET_CLASS (self)->method_callback (self, cb, data);
+}
+
 static void
 gi_marshalling_tests_object_real_method_with_default_implementation (GIMarshallingTestsObject *self, gint8 in)
 {
Index: gobject-introspection-1.31.1/tests/gimarshallingtests.h
===================================================================
--- gobject-introspection-1.31.1.orig/tests/gimarshallingtests.h
+++ gobject-introspection-1.31.1/tests/gimarshallingtests.h
@@ -614,6 +614,14 @@ void gi_marshalling_tests_union_method (
 typedef struct _GIMarshallingTestsObjectClass GIMarshallingTestsObjectClass;
 typedef struct _GIMarshallingTestsObject GIMarshallingTestsObject;
 
+/**
+ * GIMarshallingTestsCallback:
+ * @value: (in):
+ * @data: user data
+ * Returns: (transfer none):
+ */
+typedef int (*GIMarshallingTestsCallback) (int value, gpointer data);
+
 struct _GIMarshallingTestsObjectClass
 {
 	GObjectClass parent_class;
@@ -641,6 +649,12 @@ struct _GIMarshallingTestsObjectClass
      * @in: (in):
      */
     void (* method_deep_hierarchy) (GIMarshallingTestsObject *self, gint8 in);
+
+    /**
+     * GIMarshallingTestsObjectClass::method_callback:
+     * @callback: (scope call) (closure callback_data): a callback
+     */
+    void (* method_callback) (GIMarshallingTestsObject *self, GIMarshallingTestsCallback callback, gpointer callback_data);
 };
 
 struct _GIMarshallingTestsObject
@@ -664,6 +678,8 @@ const gint *gi_marshalling_tests_object_
 void gi_marshalling_tests_object_method_int8_in (GIMarshallingTestsObject *object, gint8 in);
 void gi_marshalling_tests_object_method_int8_out (GIMarshallingTestsObject *object, gint8 *out);
 void gi_marshalling_tests_object_method_with_default_implementation (GIMarshallingTestsObject *object, gint8 in);
+void gi_marshalling_tests_object_callback (GIMarshallingTestsObject *object);
+void gi_marshalling_tests_object_callback2 (GIMarshallingTestsObject *object, GIMarshallingTestsCallback cb, gpointer data);
 
 
 GIMarshallingTestsObject *gi_marshalling_tests_object_none_return (void);
