Debian Codegraph @

extra_tests/cffi_tests/embedding/add_recursive-test.c

raw symbols SCIP
1 /* Generated by pypy/tool/import_cffi.py */
2 #include <stdio.h>
3
4 #ifdef _MSC_VER
5 # define DLLIMPORT __declspec(dllimport)
6 #else
7 # define DLLIMPORT extern
8 #endif
9
10 DLLIMPORT int add_rec(int, int);
11 DLLIMPORT int (*my_callback)(int);
12
13 static int some_callback(int x)
14 {
15 printf("some_callback(%d)\n", x);
16 fflush(stdout);
17 return add_rec(x, 9);
18 }
19
20 int main(void)
21 {
22 int x, y;
23 my_callback = some_callback;
24 x = add_rec(40, 2);
25 y = add_rec(100, -5);
26 printf("got: %d %d\n", x, y);
27 return 0;
28 }