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 688792 - Replace static GObject.signal_query with introspected version
Replace static GObject.signal_query with introspected version
Status: RESOLVED FIXED
Product: pygobject
Classification: Bindings
Component: gobject
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Nobody's working on this now (help wanted and appreciated)
Python bindings maintainers
Depends on: 678663 710561
Blocks: 685373
 
 
Reported: 2012-11-21 10:05 UTC by Simon Feltman
Modified: 2014-08-18 05:23 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Replace GObject.signal_query with introspected version (6.40 KB, patch)
2014-08-18 05:23 UTC, Simon Feltman
committed Details | Review
Use array lengths specified on struct fields (4.97 KB, patch)
2014-08-18 05:23 UTC, Simon Feltman
committed Details | Review
Refactor signal array length marshalling to support a length policy (7.94 KB, patch)
2014-08-18 05:23 UTC, Simon Feltman
committed Details | Review
Remove dead code for marshalling array lengths in the context of vfuncs (2.81 KB, patch)
2014-08-18 05:23 UTC, Simon Feltman
committed Details | Review

Description Simon Feltman 2012-11-21 10:05:33 UTC
When replacing static methods with introspection versions in bug 687487, signal_query was left in place due to bugs regarding struct array field lengths (bug 687541, bug 687550, bug 687545, and now bug 678663). Once all of these are fixed we can finally move forward with a complete removal of the static GObject.signal_query function.
Comment 1 Simon Feltman 2014-08-18 05:23:10 UTC
The following fixes have been pushed:
62aed09 Replace GObject.signal_query with introspected version
4e130d7 Use array lengths specified on struct fields
c55d029 Refactor signal array length marshalling to support a length policy
3270dad Remove dead code for marshalling array lengths in the context of vfuncs
Comment 2 Simon Feltman 2014-08-18 05:23:15 UTC
Created attachment 283705 [details] [review]
Replace GObject.signal_query with introspected version

Remove the static bindings for GObject.signal_query and replace with a
Python compatibility shim which utilizes the introspection exposed version
of the function.
Comment 3 Simon Feltman 2014-08-18 05:23:18 UTC
Created attachment 283706 [details] [review]
Use array lengths specified on struct fields

Add array length marshalling policy for struct fields. This fixes accessing
C array fields on structs which also specify a length field.
Comment 4 Simon Feltman 2014-08-18 05:23:22 UTC
Created attachment 283707 [details] [review]
Refactor signal array length marshalling to support a length policy

Replace passing arrays of data to non-caching array marshallers with a policy
closure that can be customized depending on context. In the case of signals,
this is mostly scaffolding which will be replaced with caching marshallers.
However, it opens the legacy marshaller for usage with struct and object
array fields.
Comment 5 Simon Feltman 2014-08-18 05:23:25 UTC
Created attachment 283708 [details] [review]
Remove dead code for marshalling array lengths in the context of vfuncs

Remove usage of the args parameter from _pygi_argument_to_array. This is no
longer used because array marshalling for vfuncs is now handled by the cached
marshaller.