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 655496 - X11-specific objects methods are introspected as static functions
X11-specific objects methods are introspected as static functions
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Backend: X11
3.1.x
Other All
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2011-07-28 11:26 UTC by Pavel Holejsovsky
Modified: 2011-08-01 09:28 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Add (type) annotations for 'this' argument (10.82 KB, patch)
2011-07-28 11:35 UTC, Pavel Holejsovsky
committed Details | Review

Description Pavel Holejsovsky 2011-07-28 11:26:40 UTC
GdkX11 contains functions like 

XID gdk_x11_window_get_xid (GdkWindow *window)

When parsed in .gir, resulting method should be

GdkX11.X11Window.get_xid()

but because 1st argument is
GdkWindow* and not GdkX11Window*, gi-ir-scanner creates static
function

GdkX11.X11Window.get_xid(Gdk.Window arg)
Comment 1 Pavel Holejsovsky 2011-07-28 11:35:26 UTC
Created attachment 192812 [details] [review]
Add (type) annotations for 'this' argument

This patch solves the issue by explicit marking of first argument with real type.

Note that this might break API (depends on binding implementation), but most of these methods were not introspectable up-to-now (see bug 655495), so I don't think that this is a problem, but it is definitely up to reviewer to decide.
Comment 2 Johan (not receiving bugmail) Dahlin 2011-07-29 12:35:11 UTC
Review of attachment 192812 [details] [review]:

Should be okay, ideally g-i should be smarter and figure out that X11Window is a parent class of Window (in some cases).
Comment 3 Johan (not receiving bugmail) Dahlin 2011-07-29 12:35:12 UTC
Review of attachment 192812 [details] [review]:

Should be okay, ideally g-i should be smarter and figure out that X11Window is a parent class of Window (in some cases).
Comment 4 Pavel Holejsovsky 2011-08-01 09:28:40 UTC
Review of attachment 192812 [details] [review]:

Committed