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 555296 - Implement customization library for Clutter
Implement customization library for Clutter
Status: RESOLVED FIXED
Product: gobject-introspection
Classification: Platform
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gobject-introspection Maintainer(s)
gobject-introspection Maintainer(s)
Depends on: 554854
Blocks:
 
 
Reported: 2008-10-06 21:19 UTC by Lucas Rocha
Modified: 2015-02-07 16:55 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
First tentative patch (9.12 KB, patch)
2008-10-06 21:20 UTC, Lucas Rocha
committed Details | Review

Description Lucas Rocha 2008-10-06 21:19:34 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.
Comment 1 Lucas Rocha 2008-10-06 21:20:32 UTC
Created attachment 120057 [details] [review]
First tentative patch
Comment 2 Johan (not receiving bugmail) Dahlin 2008-10-08 16:26:05 UTC
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.
Comment 3 Lucas Rocha 2008-10-08 17:48:58 UTC
(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.
Comment 4 André Klapper 2015-02-07 16:55:18 UTC
[Mass-moving gobject-introspection tickets to its own Bugzilla product - see bug 708029. Mass-filter your bugmail for this message: introspection20150207 ]