summaryrefslogtreecommitdiff
path: root/tests/projects/swig/auto_include/src/example.cpp
diff options
context:
space:
mode:
authortokomine <[email protected]>2023-12-11 15:47:39 +0800
committertokomine <[email protected]>2023-12-12 13:41:19 +0800
commitb69f77d19a8eae5251968bad1703d21ea9b39f9b (patch)
tree9a421024f486cf5c48b14a66e685308550e3f5b8 /tests/projects/swig/auto_include/src/example.cpp
parent4262122871733078442170e9d9d656d30e2801fa (diff)
add includedirs for swig
Diffstat (limited to 'tests/projects/swig/auto_include/src/example.cpp')
-rw-r--r--tests/projects/swig/auto_include/src/example.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/projects/swig/auto_include/src/example.cpp b/tests/projects/swig/auto_include/src/example.cpp
new file mode 100644
index 000000000..b0ddc9c26
--- /dev/null
+++ b/tests/projects/swig/auto_include/src/example.cpp
@@ -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);
+}