summaryrefslogtreecommitdiff
path: root/girepository/girnode.c
diff options
context:
space:
mode:
authorMark Lee <marklee@src.gnome.org>2009-06-19 16:53:03 -0700
committerColin Walters <walters@verbum.org>2009-06-22 14:01:56 -0400
commit7048d711b2787af81767bb472f5dbaf0f97d6db9 (patch)
tree1f5635988ec08dd7020c947e02f58cb32def5c90 /girepository/girnode.c
parent94bae77228d816a308c054357125713b746b687c (diff)
downloadgobject-introspection-7048d711b2787af81767bb472f5dbaf0f97d6db9.tar.gz
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>
Diffstat (limited to 'girepository/girnode.c')
-rw-r--r--girepository/girnode.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/girepository/girnode.c b/girepository/girnode.c
index 01e83ace..e4f889a7 100644
--- a/girepository/girnode.c
+++ b/girepository/girnode.c
@@ -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);