mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-15 16:56:14 +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
5
ginfo.c
5
ginfo.c
@ -203,6 +203,7 @@ g_base_info_ref (GIBaseInfo *info)
|
|||||||
void
|
void
|
||||||
g_base_info_unref (GIBaseInfo *info)
|
g_base_info_unref (GIBaseInfo *info)
|
||||||
{
|
{
|
||||||
|
g_assert (info->ref_count > 0);
|
||||||
info->ref_count--;
|
info->ref_count--;
|
||||||
|
|
||||||
if (!info->ref_count)
|
if (!info->ref_count)
|
||||||
@ -224,6 +225,7 @@ g_base_info_get_type (GIBaseInfo *info)
|
|||||||
const gchar *
|
const gchar *
|
||||||
g_base_info_get_name (GIBaseInfo *info)
|
g_base_info_get_name (GIBaseInfo *info)
|
||||||
{
|
{
|
||||||
|
g_assert (info->ref_count > 0);
|
||||||
switch (info->type)
|
switch (info->type)
|
||||||
{
|
{
|
||||||
case GI_INFO_TYPE_FUNCTION:
|
case GI_INFO_TYPE_FUNCTION:
|
||||||
@ -302,6 +304,7 @@ g_base_info_get_name (GIBaseInfo *info)
|
|||||||
|
|
||||||
case GI_INFO_TYPE_TYPE:
|
case GI_INFO_TYPE_TYPE:
|
||||||
default: ;
|
default: ;
|
||||||
|
g_assert_not_reached ();
|
||||||
/* unnamed */
|
/* unnamed */
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -313,6 +316,8 @@ 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)
|
if (info->type == GI_INFO_TYPE_UNRESOLVED)
|
||||||
{
|
{
|
||||||
GIUnresolvedInfo *unresolved = (GIUnresolvedInfo *)info;
|
GIUnresolvedInfo *unresolved = (GIUnresolvedInfo *)info;
|
||||||
|
Loading…
Reference in New Issue
Block a user