diff options
author | alexv-smirnov <alex@ydb.tech> | 2023-06-13 11:05:01 +0300 |
---|---|---|
committer | alexv-smirnov <alex@ydb.tech> | 2023-06-13 11:05:01 +0300 |
commit | bf0f13dd39ee3e65092ba3572bb5b1fcd125dcd0 (patch) | |
tree | 1d1df72c0541a59a81439842f46d95396d3e7189 /contrib/tools/cython/Cython/Includes/libc/stdlib.pxd | |
parent | 8bfdfa9a9bd19bddbc58d888e180fbd1218681be (diff) | |
download | ydb-bf0f13dd39ee3e65092ba3572bb5b1fcd125dcd0.tar.gz |
add ymake export to ydb
Diffstat (limited to 'contrib/tools/cython/Cython/Includes/libc/stdlib.pxd')
-rw-r--r-- | contrib/tools/cython/Cython/Includes/libc/stdlib.pxd | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/contrib/tools/cython/Cython/Includes/libc/stdlib.pxd b/contrib/tools/cython/Cython/Includes/libc/stdlib.pxd new file mode 100644 index 0000000000..e6fac821c7 --- /dev/null +++ b/contrib/tools/cython/Cython/Includes/libc/stdlib.pxd @@ -0,0 +1,72 @@ +# 7.20 General utilities <stdlib.h> + +# deprecated cimports for backwards compatibility: +from libc.string cimport const_char, const_void + + +cdef extern from "<stdlib.h>" nogil: + + # 7.20.1 Numeric conversion functions + int atoi (const char *string) + long atol (const char *string) + long long atoll (const char *string) + double atof (const char *string) + long strtol (const char *string, char **tailptr, int base) + unsigned long int strtoul (const char *string, char **tailptr, int base) + long long int strtoll (const char *string, char **tailptr, int base) + unsigned long long int strtoull (const char *string, char **tailptr, int base) + float strtof (const char *string, char **tailptr) + double strtod (const char *string, char **tailptr) + long double strtold (const char *string, char **tailptr) + + # 7.20.2 Pseudo-random sequence generation functions + enum: RAND_MAX + int rand () + void srand (unsigned int seed) + + # 7.20.3 Memory management functions + void *calloc (size_t count, size_t eltsize) + void free (void *ptr) + void *malloc (size_t size) + void *realloc (void *ptr, size_t newsize) + + # 7.20.4 Communication with the environment + enum: EXIT_FAILURE + enum: EXIT_SUCCESS + void exit (int status) + void _exit (int status) + int atexit (void (*function) ()) + void abort () + char *getenv (const char *name) + int system (const char *command) + + #7.20.5 Searching and sorting utilities + void *bsearch (const void *key, const void *array, + size_t count, size_t size, + int (*compare)(const void *, const void *)) + void qsort (void *array, size_t count, size_t size, + int (*compare)(const void *, const void *)) + + # 7.20.6 Integer arithmetic functions + int abs (int number) + long int labs (long int number) + long long int llabs (long long int number) + ctypedef struct div_t: + int quot + int rem + div_t div (int numerator, int denominator) + ctypedef struct ldiv_t: + long int quot + long int rem + ldiv_t ldiv (long int numerator, long int denominator) + ctypedef struct lldiv_t: + long long int quot + long long int rem + lldiv_t lldiv (long long int numerator, long long int denominator) + + + # 7.20.7 Multibyte/wide character conversion functions + # XXX TODO + + # 7.20.8 Multibyte/wide string conversion functions + # XXX TODO |