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 603712 - Need to find a way to use the static cairo bindings while cairo-glib arrives
Need to find a way to use the static cairo bindings while cairo-glib arrives
Status: RESOLVED FIXED
Product: pygi
Classification: Deprecated
Component: general
unspecified
Other All
: Normal normal
: 0.6
Assigned To: pygi-maint
pygi-maint
Depends on:
Blocks:
 
 
Reported: 2009-12-03 17:54 UTC by Tomeu Vizoso
Modified: 2010-04-17 14:57 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Use static wrappers for cairo structs (proof of concept) (3.88 KB, patch)
2009-12-03 17:54 UTC, Tomeu Vizoso
reviewed Details | Review
Add support for foreign structs (20.73 KB, patch)
2010-04-15 21:31 UTC, Tomeu Vizoso
accepted-commit_now Details | Review
Add support for foreign structs (21.00 KB, patch)
2010-04-17 14:57 UTC, Tomeu Vizoso
committed Details | Review

Description Tomeu Vizoso 2009-12-03 17:54:29 UTC
Use static wrappers for cairo structs (proof of concept)
Comment 1 Tomeu Vizoso 2009-12-03 17:54:31 UTC
Created attachment 149023 [details] [review]
Use static wrappers for cairo structs (proof of concept)
Comment 2 Simon van der Linden 2009-12-03 18:33:39 UTC
This looks awful. What's the status of cairo-glib? Isn't it easier to push it forward?
Comment 3 Johan (not receiving bugmail) Dahlin 2009-12-22 13:26:02 UTC
Review of attachment 149023 [details] [review]:

Looks quite good for now, but I don't think we want a hard dependency on cairo.
Ideally it should be a runtime check instead of compile time. Is that doable?
Comment 4 Tomeu Vizoso 2010-01-02 15:13:19 UTC
(In reply to comment #3)
> Review of attachment 149023 [details] [review]:
> 
> Looks quite good for now, but I don't think we want a hard dependency on cairo.
> Ideally it should be a runtime check instead of compile time. Is that doable?

Cannot think of a way of doing this in runtime, any ideas?
Comment 5 Tomeu Vizoso 2010-02-26 15:43:27 UTC
What gjs is doing in https://bugzilla.gnome.org/show_bug.cgi?id=610357 may be a better alternative.
Comment 6 Tomeu Vizoso 2010-04-15 21:31:34 UTC
Created attachment 158844 [details] [review]
Add support for foreign structs
Comment 7 Colin Walters 2010-04-17 14:20:27 UTC
Review of attachment 158844 [details] [review]:

One minor comment.  In general this looks roughly right.

::: gi/pygi-argument.c
@@ +947,3 @@
+
+                        gint retval;
+                    } else if ((type == G_TYPE_NONE) && (g_struct_info_is_foreign (info))) {

This will overwrite the earlier exception that pygi_struct_foreign_convert_to_g_argument set, but that's probably OK.
Comment 8 Colin Walters 2010-04-17 14:20:28 UTC
Review of attachment 158844 [details] [review]:

One minor comment.  In general this looks roughly right.

::: gi/pygi-argument.c
@@ +947,3 @@
+
+                        gint retval;
+                    } else if ((type == G_TYPE_NONE) && (g_struct_info_is_foreign (info))) {

This will overwrite the earlier exception that pygi_struct_foreign_convert_to_g_argument set, but that's probably OK.
Comment 9 Tomeu Vizoso 2010-04-17 14:57:27 UTC
The following fix has been pushed:
a34cb9f Add support for foreign structs
Comment 10 Tomeu Vizoso 2010-04-17 14:57:29 UTC
Created attachment 158953 [details] [review]
Add support for foreign structs