From: Colin Walters Date: Sat, 30 Aug 2008 02:31:53 +0000 (+0000) Subject: Add some assertions, blacklist a few more methods X-Git-Tag: GOBJECT_INTROSPECTION_0_5_0~30 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a6568b74783d264d442f86d7c5cc10f9a8404805;p=platform%2Fupstream%2Fgobject-introspection.git Add some assertions, blacklist a few more methods * 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 --- diff --git a/girepository/ginfo.c b/girepository/ginfo.c index b48541a..4625e85 100644 --- a/girepository/ginfo.c +++ b/girepository/ginfo.c @@ -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) { diff --git a/giscanner/glibtransformer.py b/giscanner/glibtransformer.py index 6e60f4e..1e03eb6 100644 --- a/giscanner/glibtransformer.py +++ b/giscanner/glibtransformer.py @@ -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', ]