summaryrefslogtreecommitdiff
path: root/Examples/test-suite/grouping.i
diff options
context:
space:
mode:
Diffstat (limited to 'Examples/test-suite/grouping.i')
-rw-r--r--Examples/test-suite/grouping.i31
1 files changed, 31 insertions, 0 deletions
diff --git a/Examples/test-suite/grouping.i b/Examples/test-suite/grouping.i
new file mode 100644
index 0000000..5632231
--- /dev/null
+++ b/Examples/test-suite/grouping.i
@@ -0,0 +1,31 @@
+%module grouping
+
+%inline %{
+
+typedef int Integer;
+
+int (test1)(int x) {
+ return x;
+}
+
+int *(test2)(int x) {
+ static int y;
+ y = x;
+ return &y;
+}
+
+int (test3) = 37;
+
+typedef Integer (UnaryOp)(Integer);
+
+Integer do_unary(Integer x, UnaryOp *f) {
+ return (*f)(x);
+}
+
+int negate(int x) {
+ return -x;
+}
+
+%}
+
+%constant UnaryOp *NEGATE = negate;