Add some assertions, blacklist a few more methods
authorColin Walters <walters@src.gnome.org>
Sat, 30 Aug 2008 02:31:53 +0000 (02:31 +0000)
committerColin Walters <walters@src.gnome.org>
Sat, 30 Aug 2008 02:31:53 +0000 (02:31 +0000)
* girepository/ginfo.c: Add some assertions regarding
refcounts, just to be sure.
* giscanner/glibtransformer.py: Blacklist a few more
odd Gio methods.

svn path=/trunk/; revision=537

girepository/ginfo.c
giscanner/glibtransformer.py

index b48541a..4625e85 100644 (file)
@@ -203,6 +203,7 @@ g_base_info_ref (GIBaseInfo *info)
 void
 g_base_info_unref (GIBaseInfo *info)
 {
+  g_assert (info->ref_count > 0);
   info->ref_count--;
 
   if (!info->ref_count)
@@ -224,6 +225,7 @@ g_base_info_get_type (GIBaseInfo *info)
 const gchar *
 g_base_info_get_name (GIBaseInfo *info)
 {
+  g_assert (info->ref_count > 0);
   switch (info->type)
     {
     case GI_INFO_TYPE_FUNCTION:
@@ -302,6 +304,7 @@ g_base_info_get_name (GIBaseInfo *info)
 
     case GI_INFO_TYPE_TYPE:
     default: ;
+      g_assert_not_reached ();
       /* unnamed */
     }
 
@@ -311,7 +314,9 @@ g_base_info_get_name (GIBaseInfo *info)
 const gchar *
 g_base_info_get_namespace (GIBaseInfo *info)
 {
-  Header *header = (Header *)info->typelib->data;  
+  Header *header = (Header *)info->typelib->data;
+
+  g_assert (info->ref_count > 0);
 
   if (info->type == GI_INFO_TYPE_UNRESOLVED)
     {
index 6e60f4e..1e03eb6 100644 (file)
@@ -34,6 +34,8 @@ from .utils import extract_libtool, to_underscores
 SYMBOL_BLACKLIST = [
     # These ones break GError conventions
     'g_simple_async_result_new_from_error',
+    'g_simple_async_result_set_from_error',
+    'g_simple_async_result_propagate_error',
     'gtk_print_operation_get_error',
 ]