diff options
-rw-r--r-- | gobject/gobjectmodule.c | 3 | ||||
-rw-r--r-- | gobject/pygobject-private.h | 13 | ||||
-rw-r--r-- | gobject/pygobject.h | 12 |
3 files changed, 18 insertions, 10 deletions
diff --git a/gobject/gobjectmodule.c b/gobject/gobjectmodule.c index d780923d..068e823f 100644 --- a/gobject/gobjectmodule.c +++ b/gobject/gobjectmodule.c @@ -1941,6 +1941,9 @@ struct _PyGObject_Functions pygobject_api_functions = { pyg_set_thread_block_funcs, (PyGThreadBlockFunc)0, /* block_threads */ (PyGThreadBlockFunc)0, /* unblock_threads */ + + &PyGParamSpec_Type, + pyg_param_spec_new, }; DL_EXPORT(void) diff --git a/gobject/pygobject-private.h b/gobject/pygobject-private.h index 130305aa..42509e10 100644 --- a/gobject/pygobject-private.h +++ b/gobject/pygobject-private.h @@ -26,16 +26,6 @@ void pyg_destroy_notify (gpointer user_data); typedef struct { PyObject_HEAD - GParamSpec *pspec; -} PyGParamSpec; -extern PyTypeObject PyGParamSpec_Type; -PyObject *pyg_param_spec_new(GParamSpec *pspec); - -#define PyGParamSpec_Check(v) (PyObject_TypeCheck(v, &PyGParamSpec_Type)) -#define PyGParamSpec_Get(v) (((PyGParamSpec *)v)->pspec) - -typedef struct { - PyObject_HEAD GMainLoop *loop; } PyGMainLoop; extern PyTypeObject PyGMainLoop_Type; @@ -106,4 +96,7 @@ void pyg_register_pointer (PyObject *dict, const gchar *class_name, GType pointer_type, PyTypeObject *type); PyObject * pyg_pointer_new (GType pointer_type, gpointer pointer); +extern PyTypeObject PyGParamSpec_Type; +PyObject *pyg_param_spec_new (GParamSpec *pspec); + #endif diff --git a/gobject/pygobject.h b/gobject/pygobject.h index 62c4cd2f..d6c681c8 100644 --- a/gobject/pygobject.h +++ b/gobject/pygobject.h @@ -40,6 +40,14 @@ typedef struct { typedef void (*PyGFatalExceptionFunc) (void); typedef void (*PyGThreadBlockFunc) (void); +typedef struct { + PyObject_HEAD + GParamSpec *pspec; +} PyGParamSpec; + +#define PyGParamSpec_Get(v) (((PyGParamSpec *)v)->pspec) +#define PyGParamSpec_Check(v) (PyObject_TypeCheck(v, &PyGParamSpec_Type)) + struct _PyGObject_Functions { void (* register_class)(PyObject *dict, const gchar *class_name, GType gtype, PyTypeObject *type, PyObject *bases); @@ -95,6 +103,8 @@ struct _PyGObject_Functions { PyGThreadBlockFunc unblock_threads_func); PyGThreadBlockFunc block_threads; PyGThreadBlockFunc unblock_threads; + PyTypeObject *paramspec_type; + PyObject *(* paramspec_new)(GParamSpec *spec); }; #ifndef _INSIDE_PYGOBJECT_ @@ -132,6 +142,8 @@ struct _PyGObject_Functions *_PyGObject_API; #define pyg_constant_strip_prefix (_PyGObject_API->constant_strip_prefix) #define pyg_error_check (_PyGObject_API->error_check) #define pyg_set_thread_block_funcs (_PyGObject_API->set_thread_block_funcs) +#define PyGParamSpec_Type (*_PyGObject_API->paramspec_type) +#define pyg_param_spec_new (_PyGObject_API->paramspec_new) #define pyg_block_threads() G_STMT_START { \ if (_PyGObject_API->block_threads != NULL) \ |