GNOME Bugzilla – Bug 690670
local_command_line not introspectable/annotated
Last modified: 2017-11-17 10:43:17 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
What an awful API that is.... ;) "patches welcome"
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>
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
The crash is due to a pygobject bug: https://bugzilla.gnome.org/show_bug.cgi?id=690851 has a patch
Review of attachment 232305 [details] [review]: Looks good to me, though it would be nice to add actual documentation too.
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.
*** Bug 687912 has been marked as a duplicate of this bug. ***