Commit 8b3a3baa authored by Tomeu Vizoso's avatar Tomeu Vizoso

Revert "correctly handle floating objects in gtk"

This reverts commit 60fdf4b8.

Conflicts:

	gi/gimodule.c
	tests/test_everything.py
parent 0f2a09d7
......@@ -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);
......
......@@ -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)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment