After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 563934 - gchar** being scanned as an array
gchar** being scanned as an array
Status: RESOLVED FIXED
Product: gobject-introspection
Classification: Platform
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gobject-introspection Maintainer(s)
gobject-introspection Maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2008-12-10 00:11 UTC by Marina Zhurakhinskaya
Modified: 2015-02-07 16:58 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Disable array auto-detection for out-annotated parameters (4.72 KB, patch)
2008-12-15 20:50 UTC, Owen Taylor
accepted-commit_now Details | Review

Description Marina Zhurakhinskaya 2008-12-10 00:11:29 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>
Comment 1 Johan (not receiving bugmail) Dahlin 2008-12-11 13:32:06 UTC
The code which treats gchar** as arrays should not do so if there is an out annotation
Comment 2 Owen Taylor 2008-12-15 20:50:50 UTC
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 3 Johan (not receiving bugmail) Dahlin 2008-12-15 21:11:00 UTC
Comment on attachment 124754 [details] [review]
Disable array auto-detection for out-annotated parameters

Looks good, thanks for the patch.
Comment 4 Owen Taylor 2008-12-16 04:24:46 UTC
Committed.
Comment 5 André Klapper 2015-02-07 16:58:32 UTC
[Mass-moving gobject-introspection tickets to its own Bugzilla product - see bug 708029. Mass-filter your bugmail for this message: introspection20150207 ]