GI_TYPE_TAG_DOUBLE = 17,
GI_TYPE_TAG_UTF8 = 18,
GI_TYPE_TAG_FILENAME = 19,
- GI_TYPE_TAG_ARRAY = 20,
- GI_TYPE_TAG_INTERFACE = 21,
+ GI_TYPE_TAG_SYMBOL = 20,
+ GI_TYPE_TAG_ARRAY = 21,
GI_TYPE_TAG_GLIST = 22,
GI_TYPE_TAG_GSLIST = 23,
GI_TYPE_TAG_GHASH = 24,
#define ALIGN_VALUE(this, boundary) \
(( ((unsigned long)(this)) + (((unsigned long)(boundary)) -1)) & (~(((unsigned long)(boundary))-1)))
+static gboolean
+validate_blob (GMetadata *metadata,
+ guint32 offset,
+ GError **error);
+
DirEntry *
g_metadata_get_dir_entry (GMetadata *metadata,
signature_offset, return_type, error))
return FALSE;
break;
- case TYPE_TAG_INTERFACE:
- if (!validate_iface_type_blob (metadata, simple->offset,
- signature_offset, return_type, error))
+ case TYPE_TAG_SYMBOL:
+ if (!validate_blob (metadata, simple->offset,
+ error))
return FALSE;
break;
case TYPE_TAG_LIST:
tag = g_type_info_get_tag (info);
- if (tag < 18)
+ if (tag < TYPE_TAG_UTF8)
g_fprintf (file, "%s%s", basic[tag], g_type_info_is_pointer (info) ? "*" : "");
- else if (tag < 20)
+ else if (tag <= TYPE_TAG_FILENAME)
g_fprintf (file, "%s", basic[tag]);
- else if (tag == 20)
+ else if (tag == TYPE_TAG_ARRAY)
{
gint length;
g_fprintf (file, "]");
g_base_info_unref ((GIBaseInfo *)type);
}
- else if (tag == 21)
+ else if (tag == TYPE_TAG_SYMBOL)
{
GIBaseInfo *iface = g_type_info_get_interface (info);
write_type_name (namespace, iface, file);
g_fprintf (file, "*");
g_base_info_unref (iface);
}
- else if (tag == 22)
+ else if (tag == TYPE_TAG_LIST)
{
type = g_type_info_get_param_type (info, 0);
g_fprintf (file, "GList");
}
g_fprintf (file, "*");
}
- else if (tag == 23)
+ else if (tag == TYPE_TAG_SLIST)
{
type = g_type_info_get_param_type (info, 0);
g_fprintf (file, "GSList");
}
g_fprintf (file, "*");
}
- else if (tag == 24)
+ else if (tag == TYPE_TAG_HASH)
{
type = g_type_info_get_param_type (info, 0);
g_fprintf (file, "GHashTable");
}
g_fprintf (file, "*");
}
- else if (tag == 25)
+ else if (tag == TYPE_TAG_ERROR)
{
gint n;
case GI_TYPE_TAG_FILENAME:
g_fprintf (file, "%s", value->v_string);
break;
+ case GI_TYPE_TAG_SYMBOL:
+ g_fprintf (file, "%s", value->v_string);
+ break;
default:
- g_assert_not_reached ();
+ g_warning ("Could not get type tag for constant");
}
}