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
This commit is contained in:
Colin Walters 2008-08-30 02:31:53 +00:00
parent ce86b80390
commit 2ee1470611

View 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)
{