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 660070 - PANGO_PIXELS is missing from instrospection
PANGO_PIXELS is missing from instrospection
Status: RESOLVED OBSOLETE
Product: pango
Classification: Platform
Component: language-bindings
unspecified
Other Linux
: Normal normal
: ---
Assigned To: pango-maint
pango-maint
Depends on:
Blocks:
 
 
Reported: 2011-09-25 17:24 UTC by Jose Rostagno
Modified: 2018-05-22 13:02 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Jose Rostagno 2011-09-25 17:24:45 UTC
At least in python, Pango.PIXELS is not available. it doesn't appears in the GIR.
Comment 1 Behdad Esfahbod 2011-09-25 17:47:22 UTC
Yeah, I don't know how macros are supposed to be handled.
Comment 2 Jose Rostagno 2011-10-03 15:50:57 UTC
I ask on IRC about this:

pepeleproso 12:25:09
someone knows if there is an introspection anotation for C macros like
#define PANGO_PIXELS(d) (((int)(d) + 512) >> 10)	

J5 12:27:39
nacho: ok
pepeleproso, no 12:27:51
only for constants 12:28:05
 
pepeleproso 12:32:21
that macro thing is a known issue or I need to file a new bug?	

J5 12:36:50
pepeleproso, it really isn't an issue, we shouldn't be exposing macros

J5 12:39:38
pepeleproso, if it is important to have it should be exposed as a function in the library.  macros get expanded at compile time so there is no way to make it dynamic without wrapping it in a function
or you can just recreate that in python I think.  Not sure if the int size is important.
12:40:23
(d + 512) >> 10 is valid python


For now I'll copy that macro in my code, in future maybe it can be converted into a function
Comment 3 Behdad Esfahbod 2012-08-25 20:56:18 UTC
So, macros are by definition not supported in g-i?
Comment 4 Colin Walters 2012-08-25 21:06:47 UTC
(In reply to comment #3)
> So, macros are by definition not supported in g-i?

Constants are - i.e. you can do:

#define PANGO_SOME_VALUE 20

And that becomes Pango.SOME_VALUE.

But function-macros aren't supported, no.  You'd have to make a C function.
Comment 5 GNOME Infrastructure Team 2018-05-22 13:02:01 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/pango/issues/197.