summaryrefslogtreecommitdiff
path: root/tests/projects/swig/python_c_with_soabi/src/example.c
diff options
context:
space:
mode:
authorruki <[email protected]>2021-12-23 22:37:46 +0800
committerruki <[email protected]>2021-12-23 22:37:46 +0800
commit95b63301dd11e16b5039aa9c10cda77e8ddc1036 (patch)
tree369d853039549d1548b577dcec1155bcdda1c69d /tests/projects/swig/python_c_with_soabi/src/example.c
parent65e93fa30d57ad5823cbfbb7b70df621a5cce4fa (diff)
add soabi for swig.python
Diffstat (limited to 'tests/projects/swig/python_c_with_soabi/src/example.c')
-rw-r--r--tests/projects/swig/python_c_with_soabi/src/example.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/projects/swig/python_c_with_soabi/src/example.c b/tests/projects/swig/python_c_with_soabi/src/example.c
new file mode 100644
index 000000000..b0ddc9c26
--- /dev/null
+++ b/tests/projects/swig/python_c_with_soabi/src/example.c
@@ -0,0 +1,14 @@
+double My_variable = 3.0;
+
+/* Compute factorial of n */
+int fact(int n) {
+ if (n <= 1)
+ return 1;
+ else
+ return n*fact(n-1);
+}
+
+/* Compute n mod m */
+int my_mod(int n, int m) {
+ return(n % m);
+}