From c3b4b1882e06d80e2a3d2a81e4be594803d56c39 Mon Sep 17 00:00:00 2001 From: ruki Date: Fri, 24 Sep 2021 22:45:56 +0800 Subject: install swig scripts --- tests/projects/swig/python_cpp/src/example.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 tests/projects/swig/python_cpp/src/example.cpp (limited to 'tests/projects/swig/python_cpp/src/example.cpp') diff --git a/tests/projects/swig/python_cpp/src/example.cpp b/tests/projects/swig/python_cpp/src/example.cpp new file mode 100644 index 000000000..31c659bfa --- /dev/null +++ b/tests/projects/swig/python_cpp/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); +} -- cgit v1.3.1