rpms/pygobject2/F-11 pygobject-2.16.1-classic-classes.patch, NONE, 1.1 pygobject2.spec, 1.48, 1.49

Matthew Barnes mbarnes at fedoraproject.org
Tue May 5 22:45:25 UTC 2009


Author: mbarnes

Update of /cvs/pkgs/rpms/pygobject2/F-11
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv19208

Modified Files:
	pygobject2.spec 
Added Files:
	pygobject-2.16.1-classic-classes.patch 
Log Message:

* Wed Apr 22 2009 Matthew Barnes <mbarnes at redhat.com> - 2.16.1-4.fc11
- Add patch for GNOME bug #566571 (classic vs new-style inheritance crash).


pygobject-2.16.1-classic-classes.patch:

--- NEW FILE pygobject-2.16.1-classic-classes.patch ---
diff -up pygobject-2.16.1/gobject/gobjectmodule.c.classic-classes pygobject-2.16.1/gobject/gobjectmodule.c
--- pygobject-2.16.1/gobject/gobjectmodule.c.classic-classes	2009-02-20 16:48:29.000000000 -0500
+++ pygobject-2.16.1/gobject/gobjectmodule.c	2009-05-05 18:21:45.000000000 -0400
@@ -1079,16 +1079,20 @@ pyg_type_add_interfaces(PyTypeObject *cl
 
     for (i = 0; i < PyTuple_GET_SIZE(bases); ++i) {
         guint k;
-        PyTypeObject *base = (PyTypeObject *) PyTuple_GET_ITEM(bases, i);
+        PyObject *base = PyTuple_GET_ITEM(bases, i);
         GType itype;
         gboolean is_new = TRUE;
         const GInterfaceInfo *iinfo;
         GInterfaceInfo iinfo_copy;
 
-        if (!PyType_IsSubtype(base, &PyGInterface_Type))
+        /* 'base' can also be a PyClassObject, see bug #566571. */
+        if (!PyType_Check(base))
             continue;
 
-        itype = pyg_type_from_object((PyObject *) base);
+        if (!PyType_IsSubtype((PyTypeObject*) base, &PyGInterface_Type))
+            continue;
+
+        itype = pyg_type_from_object(base);
 
         /* Happens for _implementations_ of an interface. */
         if (!G_TYPE_IS_INTERFACE(itype))
@@ -1109,7 +1113,7 @@ pyg_type_add_interfaces(PyTypeObject *cl
             gchar *error;
             error = g_strdup_printf("Interface type %s "
                                     "has no Python implementation support",
-                                    base->tp_name);
+                                    ((PyTypeObject *) base)->tp_name);
             PyErr_Warn(PyExc_RuntimeWarning, error);
             g_free(error);
             continue;


Index: pygobject2.spec
===================================================================
RCS file: /cvs/pkgs/rpms/pygobject2/F-11/pygobject2.spec,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -p -r1.48 -r1.49
--- pygobject2.spec	26 Feb 2009 20:00:16 -0000	1.48
+++ pygobject2.spec	5 May 2009 22:44:55 -0000	1.49
@@ -18,6 +18,8 @@ Source: pygobject-%{version}.tar.bz2
 
 ### Patches ###
 
+Patch1: pygobject-2.16.1-classic-classes.patch
+
 ### Build Dependencies ###
 
 BuildRequires: automake
@@ -59,6 +61,7 @@ This package contains documentation file
 
 %prep
 %setup -q -n pygobject-%{version}
+%patch1 -p1 -b .classic-classes
 
 %build
 %configure --enable-thread
@@ -113,6 +116,9 @@ rm -fr $RPM_BUILD_ROOT
 %{_datadir}/pygobject/xsl
 
 %changelog
+* Wed Apr 22 2009 Matthew Barnes <mbarnes at redhat.com> - 2.16.1-4.fc11
+- Add patch for GNOME bug #566571 (classic vs new-style inheritance crash).
+
 * Thu Feb 26 2009 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 2.16.1-3
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
 




More information about the fedora-extras-commits mailing list