summaryrefslogtreecommitdiff
path: root/gir
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 /gir
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 'gir')
-rw-r--r--gir/Everything-1.0-expected.gir20
-rw-r--r--gir/everything.c10
-rw-r--r--gir/everything.h2
3 files changed, 32 insertions, 0 deletions
diff --git a/gir/Everything-1.0-expected.gir b/gir/Everything-1.0-expected.gir
index e3b352d2..1dacddef 100644
--- a/gir/Everything-1.0-expected.gir
+++ b/gir/Everything-1.0-expected.gir
@@ -1093,6 +1093,16 @@ call and can be released on return.">
</parameter>
</parameters>
</function>
+ <function name="test_short" c:identifier="test_short">
+ <return-value transfer-ownership="none">
+ <type name="short" c:type="gshort"/>
+ </return-value>
+ <parameters>
+ <parameter name="in" transfer-ownership="none">
+ <type name="short" c:type="gshort"/>
+ </parameter>
+ </parameters>
+ </function>
<function name="test_simple_boxed_a_const_return"
c:identifier="test_simple_boxed_a_const_return">
<return-value transfer-ownership="none">
@@ -1252,6 +1262,16 @@ call and can be released on return.">
</parameter>
</parameters>
</function>
+ <function name="test_ushort" c:identifier="test_ushort">
+ <return-value transfer-ownership="none">
+ <type name="ushort" c:type="gushort"/>
+ </return-value>
+ <parameters>
+ <parameter name="in" transfer-ownership="none">
+ <type name="ushort" c:type="gushort"/>
+ </parameter>
+ </parameters>
+ </function>
<function name="test_utf8_const_in" c:identifier="test_utf8_const_in">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
diff --git a/gir/everything.c b/gir/everything.c
index 8b0d0fb0..5e5bed80 100644
--- a/gir/everything.c
+++ b/gir/everything.c
@@ -47,6 +47,16 @@ guint64 test_uint64 (guint64 in)
return in;
}
+gshort test_short (gshort in)
+{
+ return in;
+}
+
+gushort test_ushort (gushort in)
+{
+ return in;
+}
+
gint test_int (gint in)
{
return in;
diff --git a/gir/everything.h b/gir/everything.h
index 2bbcf9e9..88f91f26 100644
--- a/gir/everything.h
+++ b/gir/everything.h
@@ -14,6 +14,8 @@ gint32 test_int32 (gint32 in);
guint32 test_uint32 (guint32 in);
gint64 test_int64 (gint64 in);
guint64 test_uint64 (guint64 in);
+gshort test_short (gshort in);
+gushort test_ushort (gushort in);
gint test_int (gint in);
guint test_uint (guint in);
glong test_long (glong in);