[gjs] Support new introspection short/ushort type tags
- From: Colin Walters <walters src gnome org>
- To: svn-commits-list gnome org
- Subject: [gjs] Support new introspection short/ushort type tags
- Date: Mon, 22 Jun 2009 15:22:03 -0400 (EDT)
commit affcec7fda9475e0b7b7a4d06251506b5bf50823
Author: Colin Walters <walters verbum org>
Date: Mon Jun 22 14:12:09 2009 -0400
Support new introspection short/ushort type tags
All we should need to do here is convert them to a fundamental type
as we're doing for the other traditional C types.
gi/arg.c | 2 ++
test/js/testEverythingBasic.js | 5 +++++
2 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/gi/arg.c b/gi/arg.c
index 008784d..e6c8054 100644
--- a/gi/arg.c
+++ b/gi/arg.c
@@ -123,6 +123,8 @@ normalize_int_types(GITypeTag type) {
switch (type) {
#define INT_TYPE(tag, ty, sign) \
case GI_TYPE_TAG_##tag: return type_tag_from_size(sizeof(ty), (sign));
+ INT_TYPE(SHORT, short, SIGNED);
+ INT_TYPE(USHORT, unsigned short, UNSIGNED);
INT_TYPE(INT, int, SIGNED);
INT_TYPE(UINT, unsigned int, UNSIGNED);
INT_TYPE(LONG, long, SIGNED);
diff --git a/test/js/testEverythingBasic.js b/test/js/testEverythingBasic.js
index f21ec97..875c525 100644
--- a/test/js/testEverythingBasic.js
+++ b/test/js/testEverythingBasic.js
@@ -45,6 +45,11 @@ function testLifeUniverseAndEverything() {
assertEquals(-42, Everything.test_int64(-42));
assertEquals(42, Everything.test_uint64(42));
+
+ assertEquals(42, Everything.test_short(42));
+ assertEquals(-42, Everything.test_short(-42));
+
+ assertEquals(42, Everything.test_ushort(42));
assertEquals(42, Everything.test_int(42));
assertEquals(-42, Everything.test_int(-42));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]