mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-27 16:06:16 +01:00
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:
parent
ce86b80390
commit
2ee1470611
7
ginfo.c
7
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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user