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 350153 - h2def.py doesn't handle interfaces correctly
h2def.py doesn't handle interfaces correctly
Status: RESOLVED OBSOLETE
Product: pygobject
Classification: Bindings
Component: codegen
2.15.x
Other Linux
: Normal normal
: ---
Assigned To: Nobody's working on this now (help wanted and appreciated)
Python bindings maintainers
Depends on:
Blocks:
 
 
Reported: 2006-08-06 13:27 UTC by James "Doc" Livingston
Modified: 2012-02-10 08:19 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch (1.64 KB, patch)
2006-08-06 13:30 UTC, James "Doc" Livingston
none Details | Review

Description James "Doc" Livingston 2006-08-06 13:27:28 UTC
h2def.py currently doesn't handle interfaces correctly, and generates define-object sections for them. It should instead generate define-interface sections.
Comment 1 James "Doc" Livingston 2006-08-06 13:30:35 UTC
Created attachment 70308 [details] [review]
patch

This patch is a fairly trivial change, and makes it emit define-interface sections for any type whose parent is GTypeInterface. It doesn't work for types derived from other interfaces, but it shouldn't be any worse than the existing behaviour.

I haven't done extensive testing, but it seems to work for Rhythmbox and Tinymail.
Comment 2 John Finlay 2006-08-06 17:31:46 UTC
You could also try defsgen.py which uses the ctypes module to extract type info from the installed library. It correctly identifies interfaces and boxed types as well as object types, enums and flags.
Comment 3 Martin Pitt 2012-02-10 08:19:01 UTC
codegen and the static bindings are obsolete since pygobject 3.0, which is GI only.

Thanks!