diff --git a/gst/pygst.h b/gst/pygst.h index 01f717918c..83b6849551 100644 --- a/gst/pygst.h +++ b/gst/pygst.h @@ -25,6 +25,8 @@ #include #include +#include + #include "common.h" G_BEGIN_DECLS @@ -35,6 +37,16 @@ struct _PyGst_Functions { PyObject* (*miniobject_new) (GstMiniObject *obj); }; +#define pygstminiobject_get(v) (((PyGstMiniObject *)(v))->obj) +#define pygstminiobject_check(v,base) (PyObject_TypeCheck(v,base)) + +typedef struct { + PyObject_HEAD + GstMiniObject *obj; + PyObject *inst_dict; /* the instance dictionary -- must be last */ + PyObject *weakreflist; /* list of weak references */ +} PyGstMiniObject; + #ifndef _INSIDE_PYGST_ #if defined(NO_IMPORT_PYGOBJECT) diff --git a/gst/pygstminiobject.c b/gst/pygstminiobject.c index daa029e699..94f28fef14 100644 --- a/gst/pygstminiobject.c +++ b/gst/pygstminiobject.c @@ -21,7 +21,9 @@ */ #define NO_IMPORT_PYGOBJECT +#define _INSIDE_PYGST_ #include "pygstminiobject.h" +#include "pygst.h" #include static const gchar pygstminiobject_class_id[] = "PyGstMiniObject::class"; diff --git a/gst/pygstminiobject.h b/gst/pygstminiobject.h index 80e6b7e2fe..3eb3d4a745 100644 --- a/gst/pygstminiobject.h +++ b/gst/pygstminiobject.h @@ -20,15 +20,6 @@ G_BEGIN_DECLS #define PYGIL_API_IS_BUGGY FALSE #endif -typedef struct { - PyObject_HEAD - GstMiniObject *obj; - PyObject *inst_dict; /* the instance dictionary -- must be last */ - PyObject *weakreflist; /* list of weak references */ -} PyGstMiniObject; - -#define pygstminiobject_get(v) (((PyGstMiniObject *)(v))->obj) -#define pygstminiobject_check(v,base) (PyObject_TypeCheck(v,base)) void pygstminiobject_register_class(PyObject *dict, const gchar *type_name,