summaryrefslogtreecommitdiff
path: root/pango.override
diff options
context:
space:
mode:
authorJohan Dahlin <johan@src.gnome.org>2004-08-02 11:03:05 +0000
committerJohan Dahlin <johan@src.gnome.org>2004-08-02 11:03:05 +0000
commit92e0b9e24a60f47c216cf625de22fa46e7df0296 (patch)
tree67fff2ad85c5926e1f1be38710ef1827b229495f /pango.override
parent3c5e6f41e151f4b8b8471b5b3a8de1c64ad36588 (diff)
downloadpygtk-92e0b9e24a60f47c216cf625de22fa46e7df0296.tar.gz
Call PyEval_InitThreads. Perhaps its something that always should be
* gobject/gobjectmodule.c (initgobject): Call PyEval_InitThreads. Perhaps its something that always should be called. * README (Author): Add a requirements section * configure.in: Require Python 2.3 * setup.py (version): Ditto * gobject/pygtype.c, gobject/pygobject.h: Remove 2.2 compat. * All over the place: Add support for PyGILState.
Diffstat (limited to 'pango.override')
-rw-r--r--pango.override10
1 files changed, 7 insertions, 3 deletions
diff --git a/pango.override b/pango.override
index 0879c1eb..3dca5840 100644
--- a/pango.override
+++ b/pango.override
@@ -1,4 +1,4 @@
- * -*- Mode: C; c-basic-offset: 4 -*-
+/* -*- Mode: C; c-basic-offset: 4 -*-
* pygtk- Python bindings for the GTK toolkit.
* Copyright (C) 1998-2003 James Henstridge
*
@@ -1522,12 +1522,13 @@ override pango_attr_list_filter kwargs
static gboolean
pypango_attr_list_filter_cb(PangoAttribute *attr, gpointer data)
{
+ PyGILState_STATE state;
PyGtkCustomNotify *cunote = data;
PyObject *retobj, *py_attr;
gboolean ret = FALSE;
-
pyg_block_threads();
+ state = PyGILState_Ensure();
py_attr = pypango_attr_new(pango_attribute_copy(attr),
attr->start_index, attr->end_index);
@@ -1545,6 +1546,7 @@ pypango_attr_list_filter_cb(PangoAttribute *attr, gpointer data)
PyErr_Print();
}
+ PyGILState_Release(state);
pyg_unblock_threads();
return ret;
}
@@ -1616,12 +1618,13 @@ static gboolean
pypango_fontset_foreach_cb(PangoFontset *fontset, PangoFont *font,
gpointer data)
{
+ PyGILState_STATE state;
PyGtkCustomNotify *cunote = data;
PyObject *retobj, *py_font, *py_fontset;
gboolean ret = FALSE;
-
pyg_block_threads();
+ state = PyGILState_Ensure();
py_fontset = pygobject_new((GObject *)fontset);
py_font = pygobject_new((GObject *)font);
@@ -1640,6 +1643,7 @@ pypango_fontset_foreach_cb(PangoFontset *fontset, PangoFont *font,
PyErr_Print();
}
+ PyGILState_Release(state);
pyg_unblock_threads();
return ret;
}