Re: Can g_field_info_get_offset () provide same info as G_STRUCT_OFFSET?
On 06/11/13 17:19, Jasper St. Pierre wrote: On Wed, Nov 6, 2013 at 10:48 AM, Andrés G. Aragoneses kno...@gmail.com mailto:kno...@gmail.com wrote: On 06/11/13 16:45, Ross Burton wrote: On 6 November 2013 14:45, Andrés G. Aragoneses kno...@gmail.com mailto:kno...@gmail.com mailto:kno...@gmail.com mailto:kno...@gmail.com wrote: (unless glib upstream would accept a patch to wrap the G_STRUCT_OFFSET in a public function?). That would be a function for every member of every struct, as G_STRUCT_OFFSET is a macro (sounds unlikely to me). Oh, right! Thanks for the pointer. So then I'll go with the libgirepository route. BTW, does gnome provide Windows/Mac binaries for libgirepository library? gobject-introspection is still in the process of being ported to Windows. Can I help here? Are bugs filed in bugzilla that I can look at? ___ gtk-devel-list mailing list gtk-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-devel-list
Re: Can g_field_info_get_offset () provide same info as G_STRUCT_OFFSET?
On Wed, Nov 6, 2013 at 9:05 AM, Andrés G. Aragoneses kno...@gmail.comwrote: Hello, According to GObjectIntrospection wiki page[1], this is the proper place to ask questions about GI. I'm wondering if the function g_field_info_get_offset() [2] could provide the same information at compile-time that the G_STRUCT_OFFSET macro [3] provides at run-time? Am I missing something obvious here? You've got these backwards. G_STRUCT_OFFSET is a compile-time macro, while g_field_info_get_offset() is a runtime method using the GIR/typelib data. But yes, they should provide the same values. What's the issue here? Thanks [1] https://wiki.gnome.org/GObjectIntrospection [2] https://developer.gnome.org/gi/stable/gi-GIFieldInfo.html# g-field-info-get-offset [3] https://developer.gnome.org/glib/2.37/glib-Standard- Macros.html#G-STRUCT-OFFSET:CAPS ___ gtk-devel-list mailing list gtk-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-devel-list -- Jasper ___ gtk-devel-list mailing list gtk-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-devel-list
Re: Can g_field_info_get_offset () provide same info as G_STRUCT_OFFSET?
On 06/11/13 15:39, Jasper St. Pierre wrote: On Wed, Nov 6, 2013 at 9:05 AM, Andrés G. Aragoneses kno...@gmail.com According to GObjectIntrospection wiki page[1], this is the proper place to ask questions about GI. I'm wondering if the function g_field_info_get_offset() [2] could provide the same information at compile-time that the G_STRUCT_OFFSET macro [3] provides at run-time? Am I missing something obvious here? You've got these backwards. G_STRUCT_OFFSET is a compile-time macro, Oh right, but from the point of view of a binding, it's not accessible at compile-time (therefore the need for glue code in C). while g_field_info_get_offset() is a runtime method using the GIR/typelib data. But yes, they should provide the same values. Thanks What's the issue here? No issue but enhancement. I'm thinking of using g_field_info_get_offset() at runtime (at binding initialization) to prevent the use of glue code (unless glib upstream would accept a patch to wrap the G_STRUCT_OFFSET in a public function?). ___ gtk-devel-list mailing list gtk-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-devel-list
Re: Can g_field_info_get_offset () provide same info as G_STRUCT_OFFSET?
On 6 November 2013 14:45, Andrés G. Aragoneses kno...@gmail.com wrote: (unless glib upstream would accept a patch to wrap the G_STRUCT_OFFSET in a public function?). That would be a function for every member of every struct, as G_STRUCT_OFFSET is a macro (sounds unlikely to me). Ross ___ gtk-devel-list mailing list gtk-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-devel-list
Re: Can g_field_info_get_offset () provide same info as G_STRUCT_OFFSET?
On 06/11/13 16:45, Ross Burton wrote: On 6 November 2013 14:45, Andrés G. Aragoneses kno...@gmail.com mailto:kno...@gmail.com wrote: (unless glib upstream would accept a patch to wrap the G_STRUCT_OFFSET in a public function?). That would be a function for every member of every struct, as G_STRUCT_OFFSET is a macro (sounds unlikely to me). Oh, right! Thanks for the pointer. So then I'll go with the libgirepository route. BTW, does gnome provide Windows/Mac binaries for libgirepository library? Thanks ___ gtk-devel-list mailing list gtk-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-devel-list
Re: Can g_field_info_get_offset () provide same info as G_STRUCT_OFFSET?
On Wed, Nov 6, 2013 at 10:48 AM, Andrés G. Aragoneses kno...@gmail.comwrote: On 06/11/13 16:45, Ross Burton wrote: On 6 November 2013 14:45, Andrés G. Aragoneses kno...@gmail.com mailto:kno...@gmail.com wrote: (unless glib upstream would accept a patch to wrap the G_STRUCT_OFFSET in a public function?). That would be a function for every member of every struct, as G_STRUCT_OFFSET is a macro (sounds unlikely to me). Oh, right! Thanks for the pointer. So then I'll go with the libgirepository route. BTW, does gnome provide Windows/Mac binaries for libgirepository library? gobject-introspection is still in the process of being ported to Windows. I think we'll ship Windows/Mac binaries when we support those platforms. Thanks ___ gtk-devel-list mailing list gtk-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-devel-list -- Jasper ___ gtk-devel-list mailing list gtk-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-devel-list