mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-20 07:38:54 +02:00
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:
@@ -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);
|
||||
|
Reference in New Issue
Block a user