For GObject classes we have g_object_info_get_ref_function() and g_object_info_get_unref_function()
For none GObject classes like GtkExpression the ref and unref funcions are listed in the XML file
<class name="Expression" c:symbol-prefix="expression" c:type="GtkExpression" abstract="1" glib:type-name="GtkExpression" glib:get-type="gtk_expression_get_type" glib:fundamental="1" glib:ref-func="gtk_expression_ref" glib:unref-func="gtk_expression_unref" glib:set-value-func="gtk_value_set_expression" glib:get-value-func="gtk_value_get_expression">
But I can not find a function in the gobject-introspection API to get the ref function like “gtk_expression_ref”.
So would the only way to find it be scanning all the available functions/methods of the class/struct/union and grep the function by name containing “ref”?
Actually I get the feeling that GtkExpression is the only none GObject based class that supports ref() and unref() operation currently? Well then it is not really hard to find the matching functions.