|
| 1 | +from flint.flintlib.types.flint cimport flint_rand_t, slong |
| 2 | + |
| 3 | +# unknown type ... |
| 4 | +# unknown type FILE |
| 5 | +# unknown type flint_err_t |
| 6 | +# unknown type int ( cmp) ( void |
| 7 | +# unknown type size_t |
| 8 | +# unknown type va_list |
| 9 | +# unknown type va_list) |
| 10 | +# unknown type void ( |
| 11 | + |
| 12 | +# .. macro:: __FLINT_VERSION |
| 13 | +# .. macro:: __FLINT_RELEASE |
| 14 | +# .. macro:: FLINT_VERSION |
| 15 | +# .. macro:: FLINT_BITS |
| 16 | +# .. macro:: FLINT_D_BITS |
| 17 | +# .. macro:: FLINT_ABS(x) |
| 18 | +# .. macro:: FLINT_UABS(x) |
| 19 | +# .. macro:: FLINT_MIN(x, y) |
| 20 | +# .. macro:: FLINT_SWAP(T, x, y) |
| 21 | +# .. macro:: FLINT_SGN(x) |
| 22 | +# .. macro:: UWORD_MIN |
| 23 | + |
| 24 | +cdef extern from "flint/flint.h": |
| 25 | + # void * flint_malloc(size_t size) |
| 26 | + # void * flint_realloc(void * ptr, size_t size) |
| 27 | + # void * flint_calloc(size_t num, size_t size) |
| 28 | + void flint_free(void * ptr) |
| 29 | + void flint_rand_init(flint_rand_t state) |
| 30 | + void flint_rand_clear(flint_rand_t state) |
| 31 | + void flint_set_num_threads(int num_threads) |
| 32 | + # int flint_get_num_threads(void) |
| 33 | + int flint_set_num_workers(int num_workers) |
| 34 | + void flint_reset_num_workers(int num_workers) |
| 35 | + # int flint_printf(const char * format, ...) |
| 36 | + # int flint_fprintf(FILE * fs, const char * format, ...) |
| 37 | + # int flint_vprintf(const char * format, va_list vlist) |
| 38 | + # int flint_vfprintf(FILE * fs, const char * format, va_list vlist) |
| 39 | + # int flint_sprintf(char * s, const char * str, ...) |
| 40 | + # int flint_scanf(const char * str, ...) |
| 41 | + # int flint_fscanf(FILE * f, const char * str, ...) |
| 42 | + # int flint_sscanf(const char * s, const char * str, ...) |
| 43 | + # void flint_abort(void) |
| 44 | + # void flint_throw(flint_err_t exc, const char * msg, ...) |
| 45 | + # void flint_set_abort(void (* func)(void)) |
| 46 | + # void flint_set_throw(void (* func)(flint_err_t, const char *, va_list)) |
| 47 | + # void flint_merge_sort(void * buf, slong len, slong size, int (* cmp) (const void *, const void *, void *), void * data) |
| 48 | + # void flint_sort(void * buf, slong len, slong size, int (* cmp) (const void *, const void *, void *), void * data) |
0 commit comments