GNOME Bugzilla – Bug 555296
Implement customization library for Clutter
Last modified: 2015-02-07 16:55:18 UTC
This can be taken as an example on how to do the same for other libraries. This is not complete yet. The patch parses the header of custom library together with the ones from the target library. This basically makes the scanner add some functions when we actually want to add object methods. We need to inject the functions from the custom lib with g-ir-inject in order to put them in the correct places. However, g-ir-scanner is basically broken now because of bug #554854.
Created attachment 120057 [details] [review] First tentative patch
Comment on attachment 120057 [details] [review] First tentative patch >diff --git a/gir/Clutter-custom.c b/gir/Clutter-custom.c >+girepo_clutter_color_get_components(ClutterColor *color) >+ list = g_list_append(list, GINT_TO_POINTER((gint)color->red)); >+ list = g_list_append(list, GINT_TO_POINTER((gint)color->green)); >+ list = g_list_append(list, GINT_TO_POINTER((gint)color->blue)); >+ list = g_list_append(list, GINT_TO_POINTER((gint)color->alpha)); You probably want to reverse and use prepend here. The rest looks good, please commit.
(In reply to comment #2) > (From update of attachment 120057 [details] [review] [edit]) > >diff --git a/gir/Clutter-custom.c b/gir/Clutter-custom.c > > >+girepo_clutter_color_get_components(ClutterColor *color) > > >+ list = g_list_append(list, GINT_TO_POINTER((gint)color->red)); > >+ list = g_list_append(list, GINT_TO_POINTER((gint)color->green)); > >+ list = g_list_append(list, GINT_TO_POINTER((gint)color->blue)); > >+ list = g_list_append(list, GINT_TO_POINTER((gint)color->alpha)); > > You probably want to reverse and use prepend here. Makes sense. Fixed. > The rest looks good, please commit. Ok, thanks! 2008-10-08 Lucas Rocha <lucasr@gnome.org> Bug 555296: Add custom lib with utility functions for simplifying binding development on Clutter. * configure.ac: add libtool stuff. * gir/Clutter-custom.[ch]: utility library with custom utility function that will help binding development in general. * gir/Makefile.am: add librepo-Clutter-custom.la to the build. Reference the custom lib when scanning the Clutter header files.
[Mass-moving gobject-introspection tickets to its own Bugzilla product - see bug 708029. Mass-filter your bugmail for this message: introspection20150207 ]