diff options
Diffstat (limited to 'glib/pyglib.h')
-rw-r--r-- | glib/pyglib.h | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/glib/pyglib.h b/glib/pyglib.h index 84bb36c..44ead47 100644 --- a/glib/pyglib.h +++ b/glib/pyglib.h @@ -53,6 +53,8 @@ PyObject * pyglib_float_from_timeval(GTimeVal timeval); /* Private: for gobject <-> glib interaction only. */ void _pyglib_notify_on_enabling_threads(PyGLibThreadsEnabledFunc callback); +PyObject* _pyglib_generic_ptr_richcompare(void* a, void *b, int op); +PyObject* _pyglib_generic_long_richcompare(long a, long b, int op); #define pyglib_begin_allow_threads \ G_STMT_START { \ @@ -65,20 +67,6 @@ void _pyglib_notify_on_enabling_threads(PyGLibThreadsEnabledFunc callback); PyEval_RestoreThread(_save); \ } G_STMT_END -#define PYGLIB_MODULE_START(symbol, modname) \ -DL_EXPORT(void) init##symbol(void) \ -{ \ - PyObject *module; \ - module = Py_InitModule(modname, symbol##_functions); -#define PYGLIB_MODULE_END } -#define PYGLIB_DEFINE_TYPE(typename, symbol, csymbol) \ -PyTypeObject symbol = { \ - PyObject_HEAD_INIT(NULL) \ - 0, \ - typename, \ - sizeof(csymbol), \ - 0, \ -}; #define PYGLIB_REGISTER_TYPE(d, type, name) \ if (!type.tp_alloc) \ type.tp_alloc = PyType_GenericAlloc; \ @@ -88,6 +76,7 @@ PyTypeObject symbol = { \ return; \ PyDict_SetItemString(d, name, (PyObject *)&type); + G_END_DECLS #endif /* __PYGLIB_H__ */ |