blob: 72c72d81518f3c5c2388847f5b8c52ea341d2e65 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
/* Link this program with libembedding_test.so.
E.g. with gcc:
gcc -o embedding_test embedding_test.c _embedding_cffi.so -lpython2.7
*/
#include <stdio.h>
extern int add(int x, int y);
int main(void)
{
int res = add(40, 2);
printf("result: %d\n", res);
res = add(100, -5);
printf("result: %d\n", res);
return 0;
}
|