Lines Matching refs:cdef
70 ffi.cdef("void some_completely_unknown_function();")
89 ffi.cdef("double sin(double x);")
93 def _Wconversion(cdef, source, **kargs): argument
97 ffi.cdef(cdef)
132 ffi.cdef("double sinf(float x);")
140 ffi.cdef("double sin(float x);")
148 ffi.cdef("size_t strlen(const char *s);")
160 ffi.cdef("%s foo(signed char x);" % typename)
167 ffi.cdef("size_t strlen(char[]);")
173 ffi.cdef("long double sinl(long double x);")
186 ffi.cdef("long double step1(long double x);")
260 ffi.cdef('\n'.join(["%s foo_%s(%s);" % (tp, tp.replace(' ', '_'), tp)
289 ffi.cdef(csource)
308 ffi.cdef(csource)
329 ffi.cdef(cdefsrc)
349 ffi.cdef(cdefsrc)
368 ffi.cdef("char foo(char);")
383 ffi.cdef("wchar_t foo(wchar_t);")
393 ffi.cdef("int foo(void);")
399 ffi.cdef("int foo(int, int);")
405 ffi.cdef("int foo(int, int);")
411 ffi.cdef("int *foo(int *);")
421 ffi.cdef("int *foo(int *);")
432 ffi.cdef("typedef %s foo_t;" % cdefed)
441 ffi.cdef("typedef struct foo_s foo_t; int bar(foo_t *);")
448 ffi.cdef("struct foo_s { char x; int y; long *z; };")
485 ffi.cdef("""
504 ffi.cdef("struct foo_s { char x; ...; };")
514 ffi.cdef("struct foo_s { %s x; ...; };" % typename)
557 ffi.cdef("struct foo_s { int a[17]; ...; };")
565 ffi.cdef("struct foo_s { int a[]; int y; ...; };\n"
587 ffi.cdef("struct foo_s { int a[...]; };")
598 ffi.cdef("struct foo_s { int x; int a[]; };")
621 ffi.cdef("struct foo_s { int x; int a[]; ...; };")
637 ffi.cdef("struct foo_s { int (*a)[17]; ...; }; struct bar_s { ...; };")
646 ffi.cdef("struct foo_s { int a:2, b:3; };")
659 ffi.cdef(code)
667 py.test.raises(NotImplementedError, ffi.cdef,
674 ffi.cdef("static const int AA, BB, CC, DD;")
699 ffi.cdef("static const unsigned short AA;")
706 ffi.cdef("static char *const PP;")
713 ffi.cdef("enum ee { EE1, EE2, EE3, ... \n \t };")
728 ffi.cdef("enum ee { EE1, EE2, EE3 };")
740 ffi.cdef("enum ee { EE1,EE2 }; typedef struct { enum ee x; } *sp;")
750 ffi.cdef("enum { EE1 }; enum { EE2, EE3 };")
758 ffi.cdef("enum { EE1, ... }; enum { EE3, ... };")
765 ffi.cdef("enum ee { EE1, EE2=\t..., EE3 };")
772 ffi.cdef("enum ee { EE1, EE2=\t... };")
778 ffi.cdef("enum ee2 { EE4=..., EE5=..., ... };")
785 ffi.cdef("enum ee2 { EE4=..., EE5=... };")
786 ffi.cdef("enum ee6 { EE7=10, EE8=..., EE9=... };")
790 ffi.cdef("int foo(int);")
804 ffi.cdef("#define FOO ...\n"
816 ffi.cdef("int foo(void);\n"
834 ffi.cdef("int somenumber; static int *const somenumberptr;")
846 ffi.cdef("int foo(int);\n"
877 ffi.cdef("struct foo { int x; ...; };\n"
903 ffi.cdef("int (*cb)(int);\n"
920 ffi.cdef("typedef int mycallback_t(int);\n"
939 ffi.cdef("int func(int a);")
947 ffi.cdef("typedef struct { int x; ...; } foo_t; int foo(foo_t *);")
958 ffi.cdef("""
984 ffi.cdef("typedef ... token_t;")
990 ffi.cdef("""
1010 ffi.cdef("int foo(int x, ...);")
1027 ffi.cdef("int foo(int x, ...);")
1036 ffi.cdef("struct foo_s { char a; int b; }; int foo(int x, ...);")
1055 ffi.cdef("struct foo_s { long a; double b; ...; };\n"
1072 ffi.cdef("struct foo_s { long a; ...; };\n"
1096 ffi.cdef("""
1116 ffi.cdef("int *(*const fooptr)(void);")
1129 ffi.cdef("""
1137 ffi.cdef("""
1145 ffi.cdef("""
1152 ffi.cdef("""
1165 ffi.cdef("""
1177 ffi.cdef("enum enum1_e { AA, BB };")
1185 ffi.cdef("typedef enum { AA, BB } enum1_t;")
1193 ffi.cdef("typedef enum { AA, BB } enum1_t;")
1199 ffi.cdef("typedef enum { AA, BB, ... } enum1_t;")
1208 ffi.cdef("""
1221 ffi.cdef("""
1233 ffi.cdef("""
1249 ffi.cdef("""
1262 ffi.cdef("""
1276 ffi.cdef("""
1296 ffi.cdef("typedef struct { int x; } **sp; void foo(sp);")
1303 ffi.cdef("struct foo_s { struct { int x; } someone; };")
1311 ffi.cdef("""
1331 ffi.cdef("""
1343 ffi.cdef("""
1353 ffi.cdef("""
1363 ffi.cdef("union foo_u { char x; long *z; };")
1368 ffi.cdef("union foo_u { char x; ...; };")
1374 ffi.cdef("struct foo_s { int x; ...; }; union foo_u { struct foo_s s; };")
1382 ffi.cdef("typedef union { char x; ...; } u1;")
1388 ffi.cdef("typedef struct { int x; ...; } s1;"
1400 ffi.cdef("struct foo_s { int b; ...; };")
1413 ffi.cdef("int foo(int);")
1423 ffi.cdef("int foo(int);")
1434 ffi.cdef("""
1451 ffi.cdef("struct foo_s { _Bool x; };"
1507 ffi.cdef("long double square(long double f); _Bool opposite(_Bool);")
1526 ffi.cdef("struct foo_s { %s x; };\n"
1551 ffi.cdef("""
1590 ffi.cdef("int foobar(void);")
1603 ffi.cdef("int foobar(void);")
1618 ffi.cdef("int printf(const char *, ...); FILE *setstdout(FILE *);")
1649 ffi.cdef("int myprintf11(const char *, int); FILE *myfile;")
1675 ffi.cdef("int fooarray[];")
1681 ffi.cdef("int fooarray[...];")
1687 ffi.cdef("int fooarray[...];")
1692 ffi.cdef("struct foo_s { ...; }; struct bar_s { struct foo_s f; ...; };")
1696 ffi.cdef("struct foo_s { struct bar_s f; ...; }; struct bar_s { ...; };")
1701 ffi.cdef("typedef ... foo_t; foo_t myfunc(void);")
1710 ffi1.cdef("typedef struct { int x; ...; } foo_t;")
1714 ffi2.cdef("int myfunc(foo_t *);")
1724 ffi1.cdef("enum foo_e { AA, ... };")
1728 ffi2.cdef("int myfunc(enum foo_e);")
1736 ffi.cdef("typedef struct { int x; } *mystruct_p;\n"
1760 ffi.cdef("enum foo_e { AA, BB, ... };")
1785 ffi.cdef("enum foo_e { AA=%s };" % c1)
1793 ffi.cdef("int myfunc(void *);")
1807 ffi.cdef("""
1854 ffi.cdef("float sum3floats(float *);")
1866 ffi.cdef("char sum3chars(char *);")
1878 ffi.cdef("int seeme1(char *); int seeme2(int *);")
1903 ffi.cdef("int foo(int, char);")
1911 ffi.cdef("int f(void *);")
1917 ffi.cdef("""void somefunc(void);
1932 ffi.cdef("""struct s { int a; }; int foo(struct s);""")
1942 ffi.cdef("""const char *a[...];""")
1949 ffi.cdef("""const int a[];""")
1979 ffi.cdef(cdef_source)
2056 ffi.cdef("typedef ... foo_t; int f1(foo_t*); foo_t *f2(int);")
2102 ffi.cdef("int f(int);")
2123 ffi.cdef("void SetLastError(DWORD);")
2138 ffi1.cdef("int foo_verify_dlopen_flags;")
2152 ffi2.cdef("int foo_verify_dlopen_flags;")
2159 ffi.cdef("typedef union { int a; float b; } Data;"
2190 ffi.cdef("#define ABA ...")
2198 e = py.test.raises(FFIError, ffi.cdef, "int foo(LPTSTR);")
2204 ffi.cdef("""
2229 ffi.cdef("#define FOO 0x123")
2235 ffi.cdef("#define FOO 123")
2241 ffi.cdef("static const int FOO = 0x123;")
2247 ffi.cdef("static const int FOO = 123;")
2253 ffi.cdef("typedef struct { int x; ...; } T; const T myglob;")
2261 ffi.cdef("typedef int... t1;")
2266 ffi.cdef("typedef double ... t1;")
2273 ffi.cdef("""struct foo_s { const int a; void *const b; };""")
2283 ffi.cdef("""
2335 ffi.cdef("""
2377 ffi.cdef("""
2408 ffi.cdef("""
2471 ffi.cdef("void *malloc(size_t); void free(void *);")
2491 ffi.cdef("void *malloc(size_t); void free(void *);")
2513 ffi.cdef("")