[pygobject] Replace usage of PyGIBoxed_Type with PyGIStruct_Type



commit 7fb55f93e207378992cd9f3e0663604a4de2213f
Author: Simon Feltman <sfeltman src gnome org>
Date:   Thu Dec 12 01:35:11 2013 -0800

    Replace usage of PyGIBoxed_Type with PyGIStruct_Type
    
    Remove empty definition of PyGIBoxed_Type and use PyGIStruct_Type in its
    place for GI_INFO_TYPE_BOXED based infos in repositories. As noted in
    the docs: "GI_INFO_TYPE_BOXED boxed, see GIStructInfo or GIUnionInfo"
    we can use the GIStructInfo API for boxed types because we also dispatch
    base classes on GType checks as seen in:
    https://git.gnome.org/browse/pygobject/tree/gi/module.py?id=3.11.2#n186
    This fixes some of the issues noted in bug 581525.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=581525

 gi/pygi-info.c |   13 +------------
 1 files changed, 1 insertions(+), 12 deletions(-)
---
diff --git a/gi/pygi-info.c b/gi/pygi-info.c
index 0dd67b7..12f756c 100644
--- a/gi/pygi-info.c
+++ b/gi/pygi-info.c
@@ -437,10 +437,8 @@ _pygi_info_new (GIBaseInfo *info)
             type = &PyGICallbackInfo_Type;
             break;
         case GI_INFO_TYPE_STRUCT:
-            type = &PyGIStructInfo_Type;
-            break;
         case GI_INFO_TYPE_BOXED:
-            type = &PyGIBoxedInfo_Type;
+            type = &PyGIStructInfo_Type;
             break;
         case GI_INFO_TYPE_ENUM:
         case GI_INFO_TYPE_FLAGS:
@@ -770,13 +768,6 @@ static PyMethodDef _PyGICallbackInfo_methods[] = {
     { NULL, NULL, 0 }
 };
 
-/* BoxedInfo */
-PYGLIB_DEFINE_TYPE ("gi.BoxedInfo", PyGIBoxedInfo_Type, PyGIBaseInfo);
-
-static PyMethodDef _PyGIBoxedInfo_methods[] = {
-    { NULL, NULL, 0 }
-};
-
 /* ErrorDomainInfo */
 PYGLIB_DEFINE_TYPE ("gi.ErrorDomainInfo", PyGIErrorDomainInfo_Type, PyGIBaseInfo);
 
@@ -2258,8 +2249,6 @@ _pygi_info_register_types (PyObject *m)
                          PyGIBaseInfo_Type);
     _PyGI_REGISTER_TYPE (m, PyGIUnionInfo_Type, UnionInfo,
                          PyGIRegisteredTypeInfo_Type);
-    _PyGI_REGISTER_TYPE (m, PyGIBoxedInfo_Type, BoxedInfo,
-                         PyGIBaseInfo_Type);
     _PyGI_REGISTER_TYPE (m, PyGIErrorDomainInfo_Type, ErrorDomainInfo,
                          PyGIBaseInfo_Type);
     _PyGI_REGISTER_TYPE (m, PyGIPropertyInfo_Type, PropertyInfo,


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