GNOME Bugzilla – Bug 623021
Remove the dependency on libcairo and pycairo
Last modified: 2010-06-29 08:47:29 UTC
The functions required so pycairo objects can be used from introspection libraries are contained now in a separate python module that is loaded at runtime if needed.
Created attachment 164794 [details] [review] Remove pygi-external.h
Created attachment 164795 [details] [review] Build the cairo shim as a python module so the _gi module stops linking to it
Created attachment 164798 [details] [review] Remove pygi-external.h
Created attachment 164799 [details] [review] Remove pygi-external.h
Created attachment 164800 [details] [review] Build the cairo shim as a python module so the _gi module stops linking to it
Created attachment 164809 [details] [review] Remove pygi-external.h
Created attachment 164810 [details] [review] Build the cairo shim as a python module so the _gi module stops linking to it
Review of attachment 164809 [details] [review]: Rest looks good. Feel free to commit this with or without addressing the comment, no need for additional reviews. ::: gi/pygi-type.h @@ +30,2 @@ /* Public */ +PyObject *pygi_type_import_by_g_type_real (GType g_type); Pretty bad name for a public API. Why not remove the _real suffix?
Review of attachment 164810 [details] [review]: Otherwise looks good. Feel free to commit it with or without incorporating the review comments. ::: configure.ac @@ +215,3 @@ glib-2.0 >= glib_required_version + PKG_CHECK_MODULES(PYCAIRO, + ) Should be optional. ::: gi/pygi-argument.c @@ +1492,3 @@ } else if ( (type == G_TYPE_NONE) && (g_struct_info_is_foreign (info))) { + PyErr_SetString (PyExc_RuntimeError, "PyObject conversion from foreign struct failed"); + if (object == NULL) Makes sense to include the name of the foreign struct in the error message. ::: gi/pygi-foreign.c @@ +137,3 @@ +pygi_register_foreign_struct_real (const char* namespace_, +void + g_slice_new
(In reply to comment #8) > Review of attachment 164809 [details] [review]: > > Rest looks good. Feel free to commit this with or without addressing the > comment, no need for additional reviews. > > ::: gi/pygi-type.h > @@ +30,2 @@ > /* Public */ > +PyObject *pygi_type_import_by_g_type_real (GType g_type); > > Pretty bad name for a public API. Why not remove the _real suffix? Because pygi_type_import_by_g_type is used for the function exported by the CAPI. I'm going to push this one as-is, but if anybody has any better alternative, I will be glad to change it later.
(In reply to comment #9) > Review of attachment 164810 [details] [review]: > > Otherwise looks good. Feel free to commit it with or without incorporating the > review comments. > > ::: configure.ac > @@ +215,3 @@ > glib-2.0 >= glib_required_version > + PKG_CHECK_MODULES(PYCAIRO, > + ) > > Should be optional. Not doing it myself for now, hopefully someone will send a patch soon. Thanks for the reviews!