@@ -6841,18 +6841,15 @@ def test_ccall(self):
68416841 src = r'''
68426842 #include <stdio.h>
68436843
6844- // Optimizations might wipe out our functions without this
6845- #define KEEPALIVE __attribute__((used))
6846-
68476844 extern "C" {
6848- int KEEPALIVE get_int() { return 5; }
6849- float KEEPALIVE get_float() { return 3.14; }
6850- char * KEEPALIVE get_string() { return "hello world"; }
6851- void KEEPALIVE print_int(int x) { printf("%d\n", x); }
6852- void KEEPALIVE print_float(float x) { printf("%.2f\n", x); }
6853- void KEEPALIVE print_string(char *x) { printf("%s\n", x); }
6854- int KEEPALIVE multi(int x, float y, int z, char *str) { if (x) puts(str); return (x+y)*z; }
6855- int * KEEPALIVE pointer(int *in) { printf("%d\n", *in); static int ret = 21; return &ret; }
6845+ int get_int() { return 5; }
6846+ float get_float() { return 3.14; }
6847+ char * get_string() { return "hello world"; }
6848+ void print_int(int x) { printf("%d\n", x); }
6849+ void print_float(float x) { printf("%.2f\n", x); }
6850+ void print_string(char *x) { printf("%s\n", x); }
6851+ int multi(int x, float y, int z, char *str) { if (x) puts(str); return (x+y)*z; }
6852+ int * pointer(int *in) { printf("%d\n", *in); static int ret = 21; return &ret; }
68566853 }
68576854
68586855 int main(int argc, char **argv) {
0 commit comments