summaryrefslogtreecommitdiffstats
path: root/gio
diff options
context:
space:
mode:
authorGustavo J. A. M. Carneiro <gjc@src.gnome.org>2009-02-17 10:59:49 +0000
committerGustavo J. A. M. Carneiro <gjc@src.gnome.org>2009-02-17 10:59:49 +0000
commitc1507495a79fb580f24818afd01402b4e19ee00d (patch)
tree25040e7a2c971edfdfaba0ab1c28daff498dc36e /gio
parent2fe5f9a56b7b7281ccf4099536aced8f7d1e045c (diff)
downloadpygobject-c1507495a79fb580f24818afd01402b4e19ee00d.tar.gz
pygobject-c1507495a79fb580f24818afd01402b4e19ee00d.tar.xz
pygobject-c1507495a79fb580f24818afd01402b4e19ee00d.zip
Bug 556250 again. I screwed up and gave misinformation about how to fix
* gio/gfile.override, gio/gio.defs, gio/gio.override: Bug 556250 again. I screwed up and gave misinformation about how to fix it. It must be pyg_begin/end_allow_threads, pyg_block/unblock_threads is only to be used for async callbacks. svn path=/trunk/; revision=1005
Diffstat (limited to 'gio')
-rw-r--r--gio/gfile.override16
-rw-r--r--gio/gio.defs1
-rw-r--r--gio/gio.override20
3 files changed, 19 insertions, 18 deletions
diff --git a/gio/gfile.override b/gio/gfile.override
index 6c210ee..89b3b18 100644
--- a/gio/gfile.override
+++ b/gio/gfile.override
@@ -191,12 +191,12 @@ _wrap_g_file_load_contents(PyGObject *self,
if (!pygio_check_cancellable(pycancellable, &cancellable))
return NULL;
- pyg_unblock_threads();
+ pyg_begin_allow_threads;
ret = g_file_load_contents(G_FILE(self->obj), cancellable,
&contents, &length, &etag_out, &error);
- pyg_block_threads();
+ pyg_end_allow_threads;
if (pyg_error_check(&error))
return NULL;
@@ -560,7 +560,7 @@ _wrap_g_file_copy(PyGObject *self,
/* No need to reference callback here, because it will be used
* only while this function is in progress. */
- pyg_unblock_threads();
+ pyg_begin_allow_threads;
ret = g_file_copy(G_FILE(self->obj),
G_FILE(destination->obj),
@@ -570,7 +570,7 @@ _wrap_g_file_copy(PyGObject *self,
notify,
&error);
- pyg_block_threads();
+ pyg_end_allow_threads;
if (pyg_error_check(&error))
goto error;
@@ -706,7 +706,7 @@ _wrap_g_file_move(PyGObject *self,
/* No need to reference callback here, because it will be used
* only while this function is in progress. */
- pyg_unblock_threads();
+ pyg_begin_allow_threads;
ret = g_file_move(G_FILE(self->obj),
G_FILE(destination->obj),
@@ -716,7 +716,7 @@ _wrap_g_file_move(PyGObject *self,
notify,
&error);
- pyg_block_threads();
+ pyg_end_allow_threads;
if (pyg_error_check(&error))
goto error;
@@ -1103,13 +1103,13 @@ _wrap_g_file_replace_contents(PyGObject *self, PyObject *args, PyObject *kwargs)
if (!pygio_check_cancellable(pycancellable, &cancellable))
return NULL;
- pyg_unblock_threads();
+ pyg_begin_allow_threads;
ret = g_file_replace_contents(G_FILE(self->obj), contents, length, etag,
make_backup, flags, &new_etag, cancellable,
&error);
- pyg_block_threads();
+ pyg_end_allow_threads;
if (pyg_error_check(&error))
return NULL;
diff --git a/gio/gio.defs b/gio/gio.defs
index 718f947..ed163c2 100644
--- a/gio/gio.defs
+++ b/gio/gio.defs
@@ -1987,6 +1987,7 @@
"(not the on-disk file), see gio.File.dup().")
(of-object "GFile")
(c-name "g_file_copy")
+ (unblock-threads #t)
(return-type "gboolean")
(parameters
'("GFile*" "destination")
diff --git a/gio/gio.override b/gio/gio.override
index ceb2944..e074d74 100644
--- a/gio/gio.override
+++ b/gio/gio.override
@@ -240,11 +240,11 @@ _wrap_g_drive_get_volumes (PyGObject *self)
GList *list, *l;
PyObject *ret;
- pyg_unblock_threads();
+ pyg_begin_allow_threads;
list = g_drive_get_volumes (G_DRIVE (self->obj));
- pyg_block_threads();
+ pyg_end_allow_threads;
ret = PyList_New(0);
for (l = list; l; l = l->next) {
@@ -334,14 +334,14 @@ _wrap_g_drive_poll_for_media(PyGObject *self, PyObject *args, PyObject *kwargs)
pygio_notify_reference_callback(notify);
- pyg_unblock_threads();
+ pyg_begin_allow_threads;
g_drive_poll_for_media(G_DRIVE(self->obj),
cancellable,
(GAsyncReadyCallback) async_result_callback_marshal,
notify);
- pyg_block_threads();
+ pyg_end_allow_threads;
Py_INCREF(Py_None);
return Py_None;
@@ -490,7 +490,7 @@ _wrap_g_mount_unmount(PyGObject *self,
pygio_notify_reference_callback(notify);
- pyg_unblock_threads();
+ pyg_begin_allow_threads;
g_mount_unmount(G_MOUNT(self->obj),
flags,
@@ -498,7 +498,7 @@ _wrap_g_mount_unmount(PyGObject *self,
(GAsyncReadyCallback)async_result_callback_marshal,
notify);
- pyg_block_threads();
+ pyg_end_allow_threads;
Py_INCREF(Py_None);
return Py_None;
@@ -542,7 +542,7 @@ _wrap_g_mount_eject(PyGObject *self, PyObject *args, PyObject *kwargs)
pygio_notify_reference_callback(notify);
- pyg_unblock_threads();
+ pyg_begin_allow_threads;
g_mount_eject(G_MOUNT(self->obj),
flags,
@@ -550,7 +550,7 @@ _wrap_g_mount_eject(PyGObject *self, PyObject *args, PyObject *kwargs)
(GAsyncReadyCallback) async_result_callback_marshal,
notify);
- pyg_block_threads();
+ pyg_end_allow_threads;
Py_INCREF(Py_None);
return Py_None;
@@ -608,7 +608,7 @@ _wrap_g_mount_remount(PyGObject *self, PyObject *args, PyObject *kwargs)
pygio_notify_reference_callback(notify);
- pyg_unblock_threads();
+ pyg_begin_allow_threads;
g_mount_remount(G_MOUNT(self->obj),
flags,
@@ -617,7 +617,7 @@ _wrap_g_mount_remount(PyGObject *self, PyObject *args, PyObject *kwargs)
(GAsyncReadyCallback) async_result_callback_marshal,
notify);
- pyg_block_threads();
+ pyg_end_allow_threads;
Py_INCREF(Py_None);
return Py_None;