mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-28 13:12:10 +01:00
girepository: Use G_TYPE_TAG_IS_BASIC consistently
This is a preparatory patch for adding a new basic tag.
This commit is contained in:
parent
3d7bb7feaf
commit
aa154a1776
@ -636,7 +636,7 @@ g_ir_node_get_full_size_internal (GIrNode *parent,
|
||||
{
|
||||
GIrNodeType *type = (GIrNodeType *)node;
|
||||
size = sizeof (SimpleTypeBlob);
|
||||
if (type->tag >= GI_TYPE_TAG_ARRAY)
|
||||
if (!G_TYPE_TAG_IS_BASIC(type->tag))
|
||||
{
|
||||
g_debug ("node %p type tag '%s'", node,
|
||||
g_type_tag_to_string (type->tag));
|
||||
@ -1220,7 +1220,7 @@ serialize_type (GIrTypelibBuild *build,
|
||||
{
|
||||
gint i;
|
||||
|
||||
if (node->tag < GI_TYPE_TAG_ARRAY)
|
||||
if (G_TYPE_TAG_IS_BASIC(node->tag))
|
||||
{
|
||||
g_string_append_printf (str, "%s%s", g_type_tag_to_string (node->tag),
|
||||
node->is_pointer ? "*" : "");
|
||||
@ -1415,9 +1415,7 @@ g_ir_node_build_typelib (GIrNode *node,
|
||||
|
||||
*offset += sizeof (SimpleTypeBlob);
|
||||
|
||||
if (type->tag < GI_TYPE_TAG_ARRAY ||
|
||||
type->tag == GI_TYPE_TAG_UTF8 ||
|
||||
type->tag == GI_TYPE_TAG_FILENAME)
|
||||
if (G_TYPE_TAG_IS_BASIC(type->tag))
|
||||
{
|
||||
blob->flags.reserved = 0;
|
||||
blob->flags.reserved2 = 0;
|
||||
|
@ -642,7 +642,7 @@ validate_type_blob (GITypelib *typelib,
|
||||
if (simple->flags.reserved == 0 &&
|
||||
simple->flags.reserved2 == 0)
|
||||
{
|
||||
if (simple->flags.tag >= GI_TYPE_TAG_ARRAY)
|
||||
if (!G_TYPE_TAG_IS_BASIC(simple->flags.tag))
|
||||
{
|
||||
g_set_error (error,
|
||||
G_TYPELIB_ERROR,
|
||||
|
Loading…
x
Reference in New Issue
Block a user