Bug 584423 – Add short/ushort support

Add type tags for short and ushort, plus all of the requisite code needed
to utilize them in libgirepository.
Add support in the scanner's AST files.
Add test functions to the everything library and the expected gir file.

gtypelib.c constant validation fixed by Colin Walters <walters@verbum.org>
This commit is contained in:
Mark Lee
2009-06-19 16:53:03 -07:00
committed by Colin Walters
parent 0a046b7aa0
commit 378350f3a9
8 changed files with 56 additions and 18 deletions

View File

@@ -2254,6 +2254,14 @@ g_ir_node_build_typelib (GIrNode *node,
blob->size = 8;
*(guint64*)&data[blob->offset] = (guint64) parse_uint_value (constant->value);
break;
case GI_TYPE_TAG_SHORT:
blob->size = sizeof (gshort);
*(gshort*)&data[blob->offset] = (gshort) parse_int_value (constant->value);
break;
case GI_TYPE_TAG_USHORT:
blob->size = sizeof (gushort);
*(gushort*)&data[blob->offset] = (gushort) parse_uint_value (constant->value);
break;
case GI_TYPE_TAG_INT:
blob->size = sizeof (gint);
*(gint*)&data[blob->offset] = (gint) parse_int_value (constant->value);