diff options
| author | Johan Dahlin <jdahlin@async.com.br> | 2008-05-23 16:54:58 +0000 |
|---|---|---|
| committer | Johan Dahlin <johan@src.gnome.org> | 2008-05-23 16:54:58 +0000 |
| commit | a1c2bc60bd137b0faecb75a22f8c96c952c4ada4 (patch) | |
| tree | 9c89705e7632e3579bbc68890da086a493f0e810 /gobject/gobjectmodule.c | |
| parent | 4689542d67328249508d78bc463866cd2a20fe34 (diff) | |
Merge from trunk:
2008-05-23 Johan Dahlin <jdahlin@async.com.br>
Merge from trunk:
* gobject/__init__.py:
* tests/test_properties.py:
Allow gobject.property work with subclasses. Add tests.
(#523352, Tomeu Vizoso)
* gobject/pygsource.c:
* tests/test_source.py:
Unbreak Source.prepare
(#523075, Bryan Silverthorn)
* gobject/gobjectmodule.c (REGISTER_TYPE): Never override customly
set 'tp_new' and 'tp_alloc'.
* configure.ac: Don't link against libffi if we cannot find libffi
on the system.
(#496006, Ed Catmur)
* Makefile.am: Dist .m4 files.
(#496011, Ed Catmur)
* gobject/pygenum.c (pyg_enum_richcompare): Don't return NULL
after warning; more useful warning message (bug #519631).
svn path=/branches/pygobject-2-14/; revision=781
Diffstat (limited to 'gobject/gobjectmodule.c')
| -rw-r--r-- | gobject/gobjectmodule.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gobject/gobjectmodule.c b/gobject/gobjectmodule.c index 4881120..9d30449 100644 --- a/gobject/gobjectmodule.c +++ b/gobject/gobjectmodule.c @@ -3506,8 +3506,10 @@ struct _PyGObject_Functions pygobject_api_functions = { #define REGISTER_TYPE(d, type, name) \ type.ob_type = &PyType_Type; \ - type.tp_alloc = PyType_GenericAlloc; \ - type.tp_new = PyType_GenericNew; \ + if (!type.tp_alloc) \ + type.tp_alloc = PyType_GenericAlloc; \ + if (!type.tp_new) \ + type.tp_new = PyType_GenericNew; \ if (PyType_Ready(&type)) \ return; \ PyDict_SetItemString(d, name, (PyObject *)&type); |
