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 669535 - Handle GParameter lists outside constructors.
Handle GParameter lists outside constructors.
Status: RESOLVED OBSOLETE
Product: pygobject
Classification: Bindings
Component: introspection
Git master
Other Linux
: Normal normal
: ---
Assigned To: Nobody's working on this now (help wanted and appreciated)
Python bindings maintainers
Depends on:
Blocks: 693117
 
 
Reported: 2012-02-07 06:15 UTC by Jamie Lennox
Modified: 2017-11-18 16:27 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Simple test program with expected behaviour. (716 bytes, text/x-python)
2012-02-07 06:15 UTC, Jamie Lennox
Details

Description Jamie Lennox 2012-02-07 06:15:17 UTC
Created attachment 206953 [details]
Simple test program with expected behaviour.

Currently there is no means to handle passing GParameters to functions, either individually or as part of a list. 

In the construction of an object a Python Dictionary is turned into an array of GParamaters and passed, however a brief look at the code (and i don't know much about cpython or introspection) seems to indicate that this is a special case. 

This code should be made universal such that any function taking a variable array of GParameters accepts a dictionary, and possibly a tuple for a single GParameter input (not sure where this would be used). 

Attached my test program.
Comment 1 Olivier Crête 2013-01-15 00:02:21 UTC
I have the same problem for Farstream, for now I added another API that's uses a GHashTable with str->GValue instead of GParameters, but it's not ideal. Maybe we should add constructors and destructors for GParameter in GLib?
Comment 2 Christoph Reiter (lazka) 2017-11-18 16:27:03 UTC
With bug 709865 deprecating GParameter and with some activity in libpeas bug 660014 to create a new API for bindings I think this can be closed.

If there is anything I've missed please say so.