SimpleTypeBlob *type = (SimpleTypeBlob *)&typelib->data[offset];
return (GITypeInfo *) g_info_new (GI_INFO_TYPE_TYPE, container, typelib,
- (type->reserved == 0 && type->reserved2 == 0) ? offset : type->offset);
+ (type->flags.reserved == 0 && type->flags.reserved2 == 0) ? offset : type->offset);
}
/**
GIBaseInfo *base = (GIBaseInfo *)info;
SimpleTypeBlob *type = (SimpleTypeBlob *)&base->typelib->data[base->offset];
- if (type->reserved == 0 && type->reserved2 == 0)
- return type->pointer;
+ if (type->flags.reserved == 0 && type->flags.reserved2 == 0)
+ return type->flags.pointer;
else
{
InterfaceTypeBlob *iface = (InterfaceTypeBlob *)&base->typelib->data[base->offset];
GIBaseInfo *base = (GIBaseInfo *)info;
SimpleTypeBlob *type = (SimpleTypeBlob *)&base->typelib->data[base->offset];
- if (type->reserved == 0 && type->reserved2 == 0)
- return type->tag;
+ if (type->flags.reserved == 0 && type->flags.reserved2 == 0)
+ return type->flags.tag;
else
{
InterfaceTypeBlob *iface = (InterfaceTypeBlob *)&base->typelib->data[base->offset];
GIBaseInfo *base = (GIBaseInfo *)info;
SimpleTypeBlob *type = (SimpleTypeBlob *)&base->typelib->data[base->offset];
- if (!(type->reserved == 0 && type->reserved2 == 0))
+ if (!(type->flags.reserved == 0 && type->flags.reserved2 == 0))
{
ParamTypeBlob *param = (ParamTypeBlob *)&base->typelib->data[base->offset];
GIBaseInfo *base = (GIBaseInfo *)info;
SimpleTypeBlob *type = (SimpleTypeBlob *)&base->typelib->data[base->offset];
- if (!(type->reserved == 0 && type->reserved2 == 0))
+ if (!(type->flags.reserved == 0 && type->flags.reserved2 == 0))
{
InterfaceTypeBlob *blob = (InterfaceTypeBlob *)&base->typelib->data[base->offset];
GIBaseInfo *base = (GIBaseInfo *)info;
SimpleTypeBlob *type = (SimpleTypeBlob *)&base->typelib->data[base->offset];
- if (!(type->reserved == 0 && type->reserved2 == 0))
+ if (!(type->flags.reserved == 0 && type->flags.reserved2 == 0))
{
ArrayTypeBlob *blob = (ArrayTypeBlob *)&base->typelib->data[base->offset];
if (blob->tag == GI_TYPE_TAG_ARRAY)
{
if (blob->has_length)
- return blob->length;
+ return blob->dimensions.length;
}
}
GIBaseInfo *base = (GIBaseInfo *)info;
SimpleTypeBlob *type = (SimpleTypeBlob *)&base->typelib->data[base->offset];
- if (!(type->reserved == 0 && type->reserved2 == 0))
+ if (!(type->flags.reserved == 0 && type->flags.reserved2 == 0))
{
ArrayTypeBlob *blob = (ArrayTypeBlob *)&base->typelib->data[base->offset];
if (blob->tag == GI_TYPE_TAG_ARRAY)
{
if (blob->has_size)
- return blob->size;
+ return blob->dimensions.size;
}
}
GIBaseInfo *base = (GIBaseInfo *)info;
SimpleTypeBlob *type = (SimpleTypeBlob *)&base->typelib->data[base->offset];
- if (!(type->reserved == 0 && type->reserved2 == 0))
+ if (!(type->flags.reserved == 0 && type->flags.reserved2 == 0))
{
ArrayTypeBlob *blob = (ArrayTypeBlob *)&base->typelib->data[base->offset];
GIBaseInfo *base = (GIBaseInfo *)info;
SimpleTypeBlob *type = (SimpleTypeBlob *)&base->typelib->data[base->offset];
- if (!(type->reserved == 0 && type->reserved2 == 0))
+ if (!(type->flags.reserved == 0 && type->flags.reserved2 == 0))
{
ErrorTypeBlob *blob = (ErrorTypeBlob *)&base->typelib->data[base->offset];
GIBaseInfo *base = (GIBaseInfo *)info;
SimpleTypeBlob *type = (SimpleTypeBlob *)&base->typelib->data[base->offset];
- if (!(type->reserved == 0 && type->reserved2 == 0))
+ if (!(type->flags.reserved == 0 && type->flags.reserved2 == 0))
{
ErrorTypeBlob *blob = (ErrorTypeBlob *)&base->typelib->data[base->offset];
ConstantBlob *blob = (ConstantBlob *)&base->typelib->data[base->offset];
/* FIXME non-basic types ? */
- if (blob->type.reserved == 0 && blob->type.reserved2 == 0)
+ if (blob->type.flags.reserved == 0 && blob->type.flags.reserved2 == 0)
{
- if (blob->type.pointer)
+ if (blob->type.flags.pointer)
value->v_pointer = g_memdup (&base->typelib->data[blob->offset], blob->size);
else
{
- switch (blob->type.tag)
+ switch (blob->type.flags.tag)
{
case GI_TYPE_TAG_BOOLEAN:
value->v_boolean = *(gboolean*)&base->typelib->data[blob->offset];
type->tag == GI_TYPE_TAG_UTF8 ||
type->tag == GI_TYPE_TAG_FILENAME)
{
- blob->reserved = 0;
- blob->reserved2 = 0;
- blob->pointer = type->is_pointer;
- blob->reserved3 = 0;
- blob->tag = type->tag;
+ blob->flags.reserved = 0;
+ blob->flags.reserved2 = 0;
+ blob->flags.pointer = type->is_pointer;
+ blob->flags.reserved3 = 0;
+ blob->flags.tag = type->tag;
}
else
{
array->has_size = type->has_size;
array->reserved2 = 0;
if (array->has_length)
- array->length = type->length;
+ array->dimensions.length = type->length;
else if (array->has_size)
- array->size = type->size;
+ array->dimensions.size = type->size;
else
- array->length = -1;
+ array->dimensions.length = -1;
pos = *offset2 + G_STRUCT_OFFSET (ArrayTypeBlob, type);
*offset2 += sizeof (ArrayTypeBlob);
return FALSE;
}
- if (simple->reserved == 0 && simple->reserved2 == 0)
+ if (simple->flags.reserved == 0 && simple->flags.reserved2 == 0)
{
g_set_error (error,
G_TYPELIB_ERROR,
G_TYPELIB_ERROR_INVALID,
"Expected non-basic type but got %d",
- simple->tag);
+ simple->flags.tag);
return FALSE;
}
simple = (SimpleTypeBlob *)&typelib->data[offset];
- if (simple->reserved == 0 &&
- simple->reserved2 == 0)
+ if (simple->flags.reserved == 0 &&
+ simple->flags.reserved2 == 0)
{
- if (simple->tag >= GI_TYPE_TAG_ARRAY)
+ if (simple->flags.tag >= GI_TYPE_TAG_ARRAY)
{
g_set_error (error,
G_TYPELIB_ERROR,
return FALSE;
}
- if (simple->tag >= GI_TYPE_TAG_UTF8 &&
- !simple->pointer)
+ if (simple->flags.tag >= GI_TYPE_TAG_UTF8 &&
+ !simple->flags.pointer)
{
g_set_error (error,
G_TYPELIB_ERROR,
G_TYPELIB_ERROR_INVALID_BLOB,
- "Pointer type exected for tag %d", simple->tag);
+ "Pointer type exected for tag %d", simple->flags.tag);
return FALSE;
}
}
type = (SimpleTypeBlob *)&typelib->data[offset + G_STRUCT_OFFSET (ConstantBlob, type)];
- if (type->reserved == 0 && type->reserved2 == 0)
+ if (type->flags.reserved == 0 && type->flags.reserved2 == 0)
{
- if (type->tag == 0)
+ if (type->flags.tag == 0)
{
g_set_error (error,
G_TYPELIB_ERROR,
return FALSE;
}
- if (value_size[type->tag] != 0 &&
- blob->size != value_size[type->tag])
+ if (value_size[type->flags.tag] != 0 &&
+ blob->size != value_size[type->flags.tag])
{
g_set_error (error,
G_TYPELIB_ERROR,