GNOME Bugzilla – Bug 563934
gchar** being scanned as an array
Last modified: 2015-02-07 16:58:32 UTC
There is a problem with the binding that gets generated for http://library.gnome.org/devel/gtk/stable/GtkRecentManager.html#gtk-recent-info-get-application-info The problem is with app_exec argument. Annotations for the function are already present in gir-repository/gir/Gtk-custom.c The xml that is generated in Gtk-2.0.gir is the following: <method name="get_application_info" c:identifier="gtk_recent_info_get_application_info"> <return-value transfer-ownership="none"> <type name="boolean" c:type="gboolean"/> </return-value> <parameters> <parameter name="app_name" transfer-ownership="none"> <type name="utf8" c:type="gchar*"/> </parameter> <parameter name="app_exec" direction="out" transfer-ownership="full"> <array c:type="gchar**"> <type name="utf8"/> </array> </parameter> <parameter name="count" direction="out" transfer-ownership="full"> <type name="uint" c:type="guint*"/> </parameter> <parameter name="time_" direction="out" transfer-ownership="full"> <type name="time_t" c:type="time_t*"/> </parameter> </parameters> </method>
The code which treats gchar** as arrays should not do so if there is an out annotation
Created attachment 124754 [details] [review] Disable array auto-detection for out-annotated parameters Here's a patch along the lines that jdahlin suggested. This doesn't try to autodetect an unannotated 'char ***' as an out-array, but I think such complicated corner cases are probably better explicitly annotated in any case.
Comment on attachment 124754 [details] [review] Disable array auto-detection for out-annotated parameters Looks good, thanks for the patch.
Committed.
[Mass-moving gobject-introspection tickets to its own Bugzilla product - see bug 708029. Mass-filter your bugmail for this message: introspection20150207 ]