[pygobject] don't calculate item_size using is_pointer



commit 11ea24dd30d8eeca11c8433c6bd75b06e52ae1ef
Author: John (J5) Palmieri <johnp redhat com>
Date:   Thu Aug 18 13:48:57 2011 -0400

    don't calculate item_size using is_pointer
    
     * is_pointer is poorly defined and cacluating item_size for
       arrays causes a crash in the tests because of this
     * disregaurd is_pointer when cacluating item sizes

 gi/pygi-info.c |    8 ++------
 1 files changed, 2 insertions(+), 6 deletions(-)
---
diff --git a/gi/pygi-info.c b/gi/pygi-info.c
index 007b609..30e1956 100644
--- a/gi/pygi-info.c
+++ b/gi/pygi-info.c
@@ -430,12 +430,8 @@ _pygi_g_type_info_size (GITypeInfo *type_info)
         case GI_TYPE_TAG_DOUBLE:
         case GI_TYPE_TAG_GTYPE:
         case GI_TYPE_TAG_UNICHAR:
-            if (g_type_info_is_pointer (type_info)) {
-                size = sizeof (gpointer);
-            } else {
-                size = _pygi_g_type_tag_size (type_tag);
-                g_assert (size > 0);
-            }
+            size = _pygi_g_type_tag_size (type_tag);
+            g_assert (size > 0);
             break;
         case GI_TYPE_TAG_INTERFACE:
         {



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