diff options
| author | Johan Dahlin <johan@src.gnome.org> | 2006-11-18 12:17:16 +0000 |
|---|---|---|
| committer | Johan Dahlin <johan@src.gnome.org> | 2006-11-18 12:17:16 +0000 |
| commit | 83816e8cbf9e24b5f9a2b52bb404961ba53b817b (patch) | |
| tree | ffaf58241d3886afe12cdcbf9d26e012445e14b7 | |
| parent | d5c99ec99e7b4f19b3ce533c33988fc81f19fccd (diff) | |
| download | pygobject-83816e8cbf9e24b5f9a2b52bb404961ba53b817b.tar.gz pygobject-83816e8cbf9e24b5f9a2b52bb404961ba53b817b.tar.xz pygobject-83816e8cbf9e24b5f9a2b52bb404961ba53b817b.zip | |
Add a test for #375589
| -rw-r--r-- | gobject/pygobject.c | 2 | ||||
| -rw-r--r-- | ltihooks.py | 2 | ||||
| -rw-r--r-- | tests/test_signal.py | 10 |
3 files changed, 12 insertions, 2 deletions
diff --git a/gobject/pygobject.c b/gobject/pygobject.c index 4cfe9e9..7ff25df 100644 --- a/gobject/pygobject.c +++ b/gobject/pygobject.c @@ -1677,7 +1677,7 @@ pygobject_disconnect_by_func(PyGObject *self, PyObject *args) PyString_AsString(PyObject_Repr((PyObject*)pyfunc))); return NULL; } - + retval = g_signal_handlers_disconnect_matched(self->obj, G_SIGNAL_MATCH_CLOSURE, 0, 0, diff --git a/ltihooks.py b/ltihooks.py index ae1d604..63f338d 100644 --- a/ltihooks.py +++ b/ltihooks.py @@ -26,7 +26,7 @@ class LibtoolHooks(ihooks.Hooks): ret.insert(0, ('.la', 'rb', 3)) return ret - def load_dynamic(self, name, filename, file=None): + def load_dynamic(self, name, filename, file=None, *args): """Like normal load_dynamic, but treat .la files specially""" if len(filename) > 3 and filename[-3:] == '.la': fp = open(filename, 'r') diff --git a/tests/test_signal.py b/tests/test_signal.py index a2018a9..6312711 100644 --- a/tests/test_signal.py +++ b/tests/test_signal.py @@ -257,6 +257,16 @@ class TestClosures(unittest.TestCase): data = c.emit("my_signal", "\01\00\02") self.assertEqual(data, "\02\00\01") + def _test_bug375589(self): + class A: + def callback(self, o): + o.handler_block_by_func(self.callback) + + e = E() + e.connect("signal", A().callback) + e.emit('signal') + gc.collect() + class SigPropClass(gobject.GObject): __gsignals__ = { 'my_signal': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE, (gobject.TYPE_INT,)) } |
