diff options
author | Tomeu Vizoso <tomeu.vizoso@collabora.co.uk> | 2010-06-25 13:54:57 +0200 |
---|---|---|
committer | Tomeu Vizoso <tomeu.vizoso@collabora.co.uk> | 2010-06-25 13:54:57 +0200 |
commit | 8b3a3baacb45cb3f9112f7597607602fa89c6634 (patch) | |
tree | 495c3c19aec3701250e2e2d7ef616f899bfb4a63 | |
parent | 0f2a09d7eae63abb71723b7cd8fb290dcba33426 (diff) | |
download | pygobject-8b3a3baacb45cb3f9112f7597607602fa89c6634.tar.gz |
Revert "correctly handle floating objects in gtk"
This reverts commit 60fdf4b8f738dd0f5c190bc18ddf010032d3c5ca.
Conflicts:
gi/gimodule.c
tests/test_everything.py
-rw-r--r-- | gi/gimodule.c | 13 | ||||
-rw-r--r-- | tests/test_everything.py | 3 |
2 files changed, 2 insertions, 14 deletions
diff --git a/gi/gimodule.c b/gi/gimodule.c index 59601fb1..0375825c 100644 --- a/gi/gimodule.c +++ b/gi/gimodule.c @@ -231,14 +231,6 @@ _wrap_pyg_hook_up_vfunc_implementation (PyObject *self, PyObject *args) Py_RETURN_NONE; } -static void -_sink_gobject (GObject *obj) -{ - if (G_IS_INITIALLY_UNOWNED (obj) || g_object_is_floating (obj)) { - g_object_ref_sink (obj); - } -} - static PyMethodDef _pygi_functions[] = { { "enum_add", (PyCFunction) _wrap_pyg_enum_add, METH_VARARGS | METH_KEYWORDS }, { "flags_add", (PyCFunction) _wrap_pyg_flags_add, METH_VARARGS | METH_KEYWORDS }, @@ -277,11 +269,6 @@ init_gi (void) if (Pycairo_CAPI == NULL) return; - // register our floating object sink while we wait for the pygobject - // patch to be approved. Once the patch is in this becomes a noop - // For more details - https://bugzilla.gnome.org/show_bug.cgi?id=583909 - pygobject_register_sinkfunc (G_TYPE_OBJECT, _sink_gobject); - _pygi_repository_register_types (m); _pygi_info_register_types (m); _pygi_struct_register_types (m); diff --git a/tests/test_everything.py b/tests/test_everything.py index c7c03852..69d19543 100644 --- a/tests/test_everything.py +++ b/tests/test_everything.py @@ -121,6 +121,7 @@ class TestNullableArgs(unittest.TestCase): def test_out_nullable_object(self): self.assertEqual(None, Everything.test_object_null_out()) + class TestCallbacks(unittest.TestCase): called = False main_loop = GObject.MainLoop() @@ -270,4 +271,4 @@ class TestCallbacks(unittest.TestCase): def testCallbackNone(self): # make sure this doesn't assert or crash - Everything.test_simple_callback(None)
\ No newline at end of file + Everything.test_simple_callback(None) |