mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-05-04 21:16:52 +02:00
More context information in validate
* girepository/gtypelib.c: Add more context during validate. svn path=/trunk/; revision=525
This commit is contained in:
parent
a633e4b1f3
commit
295fc99a40
17
gtypelib.c
17
gtypelib.c
@ -1246,11 +1246,12 @@ validate_struct_blob (ValidateContext *ctx,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
validate_enum_blob (GTypelib *typelib,
|
validate_enum_blob (ValidateContext *ctx,
|
||||||
guint32 offset,
|
guint32 offset,
|
||||||
guint16 blob_type,
|
guint16 blob_type,
|
||||||
GError **error)
|
GError **error)
|
||||||
{
|
{
|
||||||
|
GTypelib *typelib = ctx->typelib;
|
||||||
EnumBlob *blob;
|
EnumBlob *blob;
|
||||||
ValueBlob *v1, *v2;
|
ValueBlob *v1, *v2;
|
||||||
gint i, j;
|
gint i, j;
|
||||||
@ -1308,6 +1309,8 @@ validate_enum_blob (GTypelib *typelib,
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
push_context (ctx, get_string_nofail (typelib, blob->name));
|
||||||
|
|
||||||
for (i = 0; i < blob->n_values; i++)
|
for (i = 0; i < blob->n_values; i++)
|
||||||
{
|
{
|
||||||
if (!validate_value_blob (typelib,
|
if (!validate_value_blob (typelib,
|
||||||
@ -1338,6 +1341,8 @@ validate_enum_blob (GTypelib *typelib,
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pop_context (ctx);
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1457,6 +1462,8 @@ validate_object_blob (ValidateContext *ctx,
|
|||||||
|
|
||||||
offset2 += 2 * (blob->n_interfaces %2);
|
offset2 += 2 * (blob->n_interfaces %2);
|
||||||
|
|
||||||
|
push_context (ctx, get_string_nofail (typelib, blob->name));
|
||||||
|
|
||||||
for (i = 0; i < blob->n_fields; i++, offset2 += sizeof (FieldBlob))
|
for (i = 0; i < blob->n_fields; i++, offset2 += sizeof (FieldBlob))
|
||||||
{
|
{
|
||||||
if (!validate_field_blob (typelib, offset2, error))
|
if (!validate_field_blob (typelib, offset2, error))
|
||||||
@ -1493,6 +1500,8 @@ validate_object_blob (ValidateContext *ctx,
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pop_context (ctx);
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1586,6 +1595,8 @@ validate_interface_blob (ValidateContext *ctx,
|
|||||||
|
|
||||||
offset2 += 2 * (blob->n_prerequisites % 2);
|
offset2 += 2 * (blob->n_prerequisites % 2);
|
||||||
|
|
||||||
|
push_context (ctx, get_string_nofail (typelib, blob->name));
|
||||||
|
|
||||||
for (i = 0; i < blob->n_properties; i++, offset2 += sizeof (PropertyBlob))
|
for (i = 0; i < blob->n_properties; i++, offset2 += sizeof (PropertyBlob))
|
||||||
{
|
{
|
||||||
if (!validate_property_blob (typelib, offset2, error))
|
if (!validate_property_blob (typelib, offset2, error))
|
||||||
@ -1616,6 +1627,8 @@ validate_interface_blob (ValidateContext *ctx,
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pop_context (ctx);
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1671,7 +1684,7 @@ validate_blob (ValidateContext *ctx,
|
|||||||
break;
|
break;
|
||||||
case BLOB_TYPE_ENUM:
|
case BLOB_TYPE_ENUM:
|
||||||
case BLOB_TYPE_FLAGS:
|
case BLOB_TYPE_FLAGS:
|
||||||
if (!validate_enum_blob (typelib, offset, common->blob_type, error))
|
if (!validate_enum_blob (ctx, offset, common->blob_type, error))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
break;
|
break;
|
||||||
case BLOB_TYPE_OBJECT:
|
case BLOB_TYPE_OBJECT:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user