- Add patch for GNOME bug #566571 (classic vs new-style inheritance crash).
This commit is contained in:
parent
023b851bc4
commit
335e77358f
36
pygobject2-2.16.1-fix-classic-class-crash.patch
Normal file
36
pygobject2-2.16.1-fix-classic-class-crash.patch
Normal file
@ -0,0 +1,36 @@
|
||||
diff -up pygobject-2.16.1/gobject/gobjectmodule.c.fix-classic-class-crash pygobject-2.16.1/gobject/gobjectmodule.c
|
||||
--- pygobject-2.16.1/gobject/gobjectmodule.c.fix-classic-class-crash 2009-02-20 16:48:29.000000000 -0500
|
||||
+++ pygobject-2.16.1/gobject/gobjectmodule.c 2009-04-22 16:23:21.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;
|
||||
@ -4,11 +4,17 @@
|
||||
%define glib2_version 2.16.0
|
||||
%define python2_version 2.3.5
|
||||
|
||||
# XXX Disable this and use "make <my-real-arch>" instead of
|
||||
# "make local" when building locally to avoid avoid the
|
||||
# "Arch dependent binaries in noarch package" error.
|
||||
# Added in Fedora 11, hopefully only temporarily.
|
||||
%define noarch_docs 0
|
||||
|
||||
### Abstract ###
|
||||
|
||||
Name: pygobject2
|
||||
Version: 2.16.1
|
||||
Release: 3%{?dist}
|
||||
Release: 4%{?dist}
|
||||
License: LGPLv2+
|
||||
Group: Development/Languages
|
||||
Summary: Python bindings for GObject
|
||||
@ -18,6 +24,9 @@ Source: pygobject-%{version}.tar.bz2
|
||||
|
||||
### Patches ###
|
||||
|
||||
# GNOME bug #566571
|
||||
Patch1: pygobject2-2.16.1-fix-classic-class-crash.patch
|
||||
|
||||
### Build Dependencies ###
|
||||
|
||||
BuildRequires: automake
|
||||
@ -52,13 +61,16 @@ libraries such as pygtk2.
|
||||
%package doc
|
||||
Summary: Documentation files for %{name}
|
||||
Group: Development/Languages
|
||||
%if %{noarch_docs}
|
||||
BuildArch: noarch
|
||||
%endif
|
||||
|
||||
%description doc
|
||||
This package contains documentation files for %{name}.
|
||||
|
||||
%prep
|
||||
%setup -q -n pygobject-%{version}
|
||||
%patch1 -p1 -b .fix-classic-class-crash
|
||||
|
||||
%build
|
||||
%configure --enable-thread
|
||||
@ -113,6 +125,9 @@ rm -fr $RPM_BUILD_ROOT
|
||||
%{_datadir}/pygobject/xsl
|
||||
|
||||
%changelog
|
||||
* Wed Apr 22 2009 Matthew Barnes <mbarnes@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@lists.fedoraproject.org> - 2.16.1-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user