add patch

This commit is contained in:
Colin Walters 2007-06-14 19:26:43 +00:00
parent d23bbaee70
commit fbbdd54b99
2 changed files with 44 additions and 1 deletions

View File

@ -0,0 +1,38 @@
--- gnome-menus-2.18.0/python/gmenu.c~ 2007-03-12 14:49:27.000000000 -0400
+++ gnome-menus-2.18.0/python/gmenu.c 2007-06-05 19:55:37.000000000 -0400
@@ -1497,6 +1497,9 @@
{
PyObject *args;
PyObject *ret;
+ PyGILState_STATE gstate;
+
+ gstate = PyGILState_Ensure();
args = PyTuple_New (callback->user_data ? 2 : 1);
@@ -1513,6 +1516,8 @@
Py_XDECREF (ret);
Py_DECREF (args);
+
+ PyGILState_Release(gstate);
}
static PyObject *
@@ -1522,10 +1527,15 @@
PyGMenuTree *tree;
PyGMenuTreeCallback *callback;
PyObject *pycallback;
- PyObject *pyuser_data;
+ PyObject *pyuser_data = NULL;
if (!PyArg_ParseTuple (args, "O|O:gmenu.Tree.add_monitor", &pycallback, &pyuser_data))
return NULL;
+ if (!PyCallable_Check(pycallback))
+ {
+ PyErr_SetString(PyExc_TypeError, "callback must be callable");
+ return NULL;
+ }
tree = (PyGMenuTree *) self;

View File

@ -6,11 +6,12 @@
Summary: A menu system for the GNOME project
Name: gnome-menus
Version: 2.19.3
Release: 1%{?dist}
Release: 2%{?dist}
License: LGPL
Group: System Environment/Libraries
URL: http://www.gnome.org/
Source0: http://download.gnome.org/sources/gnome-menus/2.19/%{name}-%{version}.tar.bz2
Patch0: gnome-menus-pythread-bgo442747.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Requires: redhat-menus >= 7.8.9-2
BuildRequires: glib2-devel >= 2.6.0
@ -42,6 +43,7 @@ writing applications that use the GNOME menu system.
%prep
%setup -q
%patch0 -p1
%build
%configure \
@ -98,6 +100,9 @@ rm -rf $RPM_BUILD_ROOT
%{_includedir}/gnome-menus
%changelog
* Thu Jun 14 2007 Colin Walters <walters@redhat.com> - 2.19.3-2
- Add patch gnome-menus-pythread-bgo442747.patch
* Mon Jun 4 2007 Matthias Clasen <mclasen@redhat.com> - 2.19.3-1
- Update to 2.19.3