summaryrefslogtreecommitdiff
path: root/tests/projects/csharp/pinvoke/src/native/mathlib.c
blob: 3d28400738d37de13ad9e09906b6cb2df6ce24ca (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#ifdef _WIN32
#define EXPORT __declspec(dllexport)
#else
#define EXPORT __attribute__((visibility("default")))
#endif

EXPORT int add(int a, int b) {
    return a + b;
}

EXPORT int multiply(int a, int b) {
    return a * b;
}