[pygobject/gsoc2009: 31/160] Add object_type in _PyGObject_API to export PyGObject_Type



commit f2ab0bdce8547a05383237b43f49c80b7f6ca2c3
Author: Simon van der Linden <svdlinden src gnome org>
Date:   Tue Jul 14 14:11:39 2009 +0200

    Add object_type in _PyGObject_API to export PyGObject_Type

 gobject/gobjectmodule.c |    5 +++--
 gobject/pygobject.h     |    3 +++
 2 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/gobject/gobjectmodule.c b/gobject/gobjectmodule.c
index 73bfc3c..bef5bcf 100644
--- a/gobject/gobjectmodule.c
+++ b/gobject/gobjectmodule.c
@@ -2503,8 +2503,9 @@ struct _PyGObject_Functions pygobject_api_functions = {
   pyg_type_register_custom_callback,
   pyg_gerror_exception_check,
 
-  pyglib_option_group_new
-  
+  pyglib_option_group_new,
+
+  &PyGObject_Type
 };
 
 /* for addon libraries ... */
diff --git a/gobject/pygobject.h b/gobject/pygobject.h
index d7eba07..cf3ee53 100644
--- a/gobject/pygobject.h
+++ b/gobject/pygobject.h
@@ -198,6 +198,8 @@ struct _PyGObject_Functions {
 				      gpointer data);
     gboolean  (*gerror_exception_check) (GError **error);
     PyObject* (*option_group_new) (GOptionGroup *group);
+
+    PyTypeObject *object_type;
 };
 
 #ifndef _INSIDE_PYGOBJECT_
@@ -264,6 +266,7 @@ struct _PyGObject_Functions *_PyGObject_API;
 #define pyg_type_register_custom_callback (_PyGObject_API->type_register_custom)
 #define pyg_gerror_exception_check (_PyGObject_API->gerror_exception_check)
 #define pyg_option_group_new       (_PyGObject_API->option_group_new)
+#define PyGObject_Type             (*_PyGObject_API->object_type)
 
 #define pyg_block_threads()   G_STMT_START {   \
     if (_PyGObject_API->block_threads != NULL) \



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]