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 690670 - local_command_line not introspectable/annotated
local_command_line not introspectable/annotated
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: gapplication
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
: 687912 (view as bug list)
Depends on: 690851
Blocks: 690377
 
 
Reported: 2012-12-23 14:17 UTC by Paolo Borelli
Modified: 2017-11-17 10:43 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
add the annotations (1.09 KB, patch)
2012-12-27 20:49 UTC, Paolo Borelli
none Details | Review
patch (1.10 KB, patch)
2012-12-27 21:18 UTC, Paolo Borelli
committed Details | Review

Description Paolo Borelli 2012-12-23 14:17:51 UTC
I did not investigate this thoroughly but I was trying to override local_command_line in a python app and I was not able to get it to work.

As far as I can see "arguments" is an in/out param and exitcode is an out param, but they are not marked as such in the gir file
Comment 1 Allison Karlitskaya (desrt) 2012-12-24 13:54:01 UTC
What an awful API that is.... ;)

"patches welcome"
Comment 2 Paolo Borelli 2012-12-27 20:49:21 UTC
Created attachment 232301 [details] [review]
add the annotations

with this patch, the gir has the following, which looks correct to me


      <virtual-method name="local_command_line">
        <return-value transfer-ownership="none">
          <type name="gboolean" c:type="gboolean"/>
        </return-value>
        <parameters>
          <parameter name="arguments"
                     direction="inout"
                     caller-allocates="0"
                     transfer-ownership="full">
            <doc xml:whitespace="preserve">array of command line arguments</doc>
            <type name="utf8" c:type="gchar***"/>
          </parameter>
          <parameter name="exit_status"
                     direction="out"
                     caller-allocates="1"
                     transfer-ownership="none">
            <doc xml:whitespace="preserve">exit status to fill after processing the command line.</doc>
            <type name="gint" c:type="int*"/>
          </parameter>
        </parameters>
      </virtual-method>
Comment 3 Paolo Borelli 2012-12-27 21:18:21 UTC
Created attachment 232305 [details] [review]
patch

better annotations... with these I can override the vfunc in python and properly print the received args, but then it crashes... not sure if it is a pygobject bug or what
Comment 4 Paolo Borelli 2012-12-29 11:24:39 UTC
The crash is due to a pygobject bug: https://bugzilla.gnome.org/show_bug.cgi?id=690851 has a patch
Comment 5 Matthias Clasen 2013-01-01 16:12:15 UTC
Review of attachment 232305 [details] [review]:

Looks good to me, though it would be nice to add actual documentation too.
Comment 6 Allison Karlitskaya (desrt) 2013-01-02 12:41:12 UTC
The "actual docs" are there in quite a lot of detail in the class overview...

It always feels like there's not "enough space" to write verbosely about private vfuncs.
Comment 7 Philip Withnall 2017-11-17 10:43:17 UTC
*** Bug 687912 has been marked as a duplicate of this bug. ***