GNOME Bugzilla – Bug 660070
PANGO_PIXELS is missing from instrospection
Last modified: 2018-05-22 13:02:01 UTC
At least in python, Pango.PIXELS is not available. it doesn't appears in the GIR.
Yeah, I don't know how macros are supposed to be handled.
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
So, macros are by definition not supported in g-i?
(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.
-- 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.