summaryrefslogtreecommitdiff
path: root/bindgen-tests/tests/headers/wrap-static-fns.h
diff options
context:
space:
mode:
Diffstat (limited to 'bindgen-tests/tests/headers/wrap-static-fns.h')
-rw-r--r--bindgen-tests/tests/headers/wrap-static-fns.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/bindgen-tests/tests/headers/wrap-static-fns.h b/bindgen-tests/tests/headers/wrap-static-fns.h
new file mode 100644
index 00000000..8b90c7bc
--- /dev/null
+++ b/bindgen-tests/tests/headers/wrap-static-fns.h
@@ -0,0 +1,33 @@
+// bindgen-flags: --experimental --wrap-static-fns
+
+static inline int foo() {
+ return 11;
+}
+static int bar() {
+ return 1;
+}
+inline int baz() {
+ return 2;
+}
+
+static inline int takes_ptr(int* arg) {
+ return *arg + 1;
+}
+
+static inline int takes_fn_ptr(int (*f)(int)) {
+ return f(1);
+}
+
+static inline int takes_fn(int (f)(int)) {
+ return f(2);
+}
+
+typedef int (func)(int);
+
+static inline int takes_alias(func f) {
+ return f(3);
+}
+
+static inline int takes_qualified(const int *const *arg) {
+ return **arg;
+}