# 1 "./Modules/posixmodule.c" # 1 "/home/remi/dev/cpython_test//" # 1 "" # 1 "" # 1 "./Modules/posixmodule.c" # 28 "./Modules/posixmodule.c" # 1 "./Include/Python.h" 1 # 1 "./Include/patchlevel.h" 1 # 8 "./Include/Python.h" 2 # 1 "./pyconfig.h" 1 # 9 "./Include/Python.h" 2 # 1 "./Include/pymacconfig.h" 1 # 10 "./Include/Python.h" 2 # 1 "/usr/include/limits.h" 1 3 4 # 38 "/usr/include/limits.h" 3 4 # 1 "/usr/include/sys/cdefs.h" 1 3 4 # 41 "/usr/include/sys/cdefs.h" 3 4 # 1 "/usr/include/machine/cdefs.h" 1 3 4 # 42 "/usr/include/sys/cdefs.h" 2 3 4 # 39 "/usr/include/limits.h" 2 3 4 # 91 "/usr/include/limits.h" 3 4 # 1 "/usr/include/sys/limits.h" 1 3 4 # 43 "/usr/include/sys/limits.h" 3 4 # 1 "/usr/include/machine/internal_types.h" 1 3 4 # 44 "/usr/include/sys/limits.h" 2 3 4 # 1 "/usr/include/machine/limits.h" 1 3 4 # 47 "/usr/include/sys/limits.h" 2 3 4 # 92 "/usr/include/limits.h" 2 3 4 # 1 "/usr/include/sys/syslimits.h" 1 3 4 # 95 "/usr/include/limits.h" 2 3 4 # 12 "./Include/Python.h" 2 # 25 "./Include/Python.h" # 1 "/usr/include/stdio.h" 1 3 4 # 42 "/usr/include/stdio.h" 3 4 # 1 "/usr/include/sys/_types.h" 1 3 4 # 37 "/usr/include/sys/_types.h" 3 4 # 1 "/usr/include/machine/_types.h" 1 3 4 # 45 "/usr/include/machine/_types.h" 3 4 typedef signed char __int8_t; typedef unsigned char __uint8_t; typedef short __int16_t; typedef unsigned short __uint16_t; typedef int __int32_t; typedef unsigned int __uint32_t; typedef long long __int64_t; typedef unsigned long long __uint64_t; typedef __int8_t __int_least8_t; typedef __uint8_t __uint_least8_t; typedef __int16_t __int_least16_t; typedef __uint16_t __uint_least16_t; typedef __int32_t __int_least32_t; typedef __uint32_t __uint_least32_t; typedef __int64_t __int_least64_t; typedef __uint64_t __uint_least64_t; typedef __int32_t __int_fast8_t; typedef __uint32_t __uint_fast8_t; typedef __int32_t __int_fast16_t; typedef __uint32_t __uint_fast16_t; typedef __int32_t __int_fast32_t; typedef __uint32_t __uint_fast32_t; typedef __int64_t __int_fast64_t; typedef __uint64_t __uint_fast64_t; typedef long __intptr_t; typedef unsigned long __uintptr_t; typedef __int64_t __intmax_t; typedef __uint64_t __uintmax_t; typedef long __register_t; typedef unsigned long __vaddr_t; typedef unsigned long __paddr_t; typedef unsigned long __vsize_t; typedef unsigned long __psize_t; typedef int __clock_t; typedef int __clockid_t; typedef double __double_t; typedef float __float_t; typedef long long __off_t; typedef long __ptrdiff_t; typedef unsigned long __size_t; typedef long __ssize_t; typedef int __time_t; typedef int __timer_t; typedef __builtin_va_list __va_list; typedef int __wchar_t; typedef int __wint_t; typedef int __rune_t; typedef void * __wctrans_t; typedef void * __wctype_t; # 38 "/usr/include/sys/_types.h" 2 3 4 typedef unsigned long __cpuid_t; typedef __int32_t __dev_t; typedef __uint32_t __fixpt_t; typedef __uint32_t __gid_t; typedef __uint32_t __id_t; typedef __uint32_t __in_addr_t; typedef __uint16_t __in_port_t; typedef __uint32_t __ino_t; typedef long __key_t; typedef __uint32_t __mode_t; typedef __uint32_t __nlink_t; typedef __int32_t __pid_t; typedef __uint64_t __rlim_t; typedef __uint8_t __sa_family_t; typedef __int32_t __segsz_t; typedef __uint32_t __socklen_t; typedef __int32_t __swblk_t; typedef __uint32_t __uid_t; typedef __uint32_t __useconds_t; typedef __int32_t __suseconds_t; typedef __uint64_t __fsblkcnt_t; typedef __uint64_t __fsfilcnt_t; typedef union { char __mbstate8[128]; __int64_t __mbstateL; } __mbstate_t; # 43 "/usr/include/stdio.h" 2 3 4 # 1 "/usr/include/sys/types.h" 1 3 4 # 45 "/usr/include/sys/types.h" 3 4 # 1 "/usr/include/machine/endian.h" 1 3 4 # 59 "/usr/include/machine/endian.h" 3 4 # 1 "/usr/include/sys/endian.h" 1 3 4 # 161 "/usr/include/sys/endian.h" 3 4 __uint64_t htobe64(__uint64_t); __uint32_t htobe32(__uint32_t); __uint16_t htobe16(__uint16_t); __uint64_t betoh64(__uint64_t); __uint32_t betoh32(__uint32_t); __uint16_t betoh16(__uint16_t); __uint64_t htole64(__uint64_t); __uint32_t htole32(__uint32_t); __uint16_t htole16(__uint16_t); __uint64_t letoh64(__uint64_t); __uint32_t letoh32(__uint32_t); __uint16_t letoh16(__uint16_t); # 60 "/usr/include/machine/endian.h" 2 3 4 # 46 "/usr/include/sys/types.h" 2 3 4 typedef unsigned char u_char; typedef unsigned short u_short; typedef unsigned int u_int; typedef unsigned long u_long; typedef unsigned char unchar; typedef unsigned short ushort; typedef unsigned int uint; typedef unsigned long ulong; typedef __cpuid_t cpuid_t; typedef __register_t register_t; # 72 "/usr/include/sys/types.h" 3 4 typedef __int8_t int8_t; typedef __uint8_t uint8_t; typedef __int16_t int16_t; typedef __uint16_t uint16_t; typedef __int32_t int32_t; typedef __uint32_t uint32_t; typedef __int64_t int64_t; typedef __uint64_t uint64_t; typedef __uint8_t u_int8_t; typedef __uint16_t u_int16_t; typedef __uint32_t u_int32_t; typedef __uint64_t u_int64_t; typedef __int64_t quad_t; typedef __uint64_t u_quad_t; typedef quad_t * qaddr_t; typedef __vaddr_t vaddr_t; typedef __paddr_t paddr_t; typedef __vsize_t vsize_t; typedef __psize_t psize_t; typedef char * caddr_t; typedef __int32_t daddr32_t; typedef __int64_t daddr_t; typedef __int64_t daddr64_t; typedef __dev_t dev_t; typedef __fixpt_t fixpt_t; typedef __gid_t gid_t; typedef __id_t id_t; typedef __ino_t ino_t; typedef __key_t key_t; typedef __mode_t mode_t; typedef __nlink_t nlink_t; typedef __pid_t pid_t; typedef __rlim_t rlim_t; typedef __segsz_t segsz_t; typedef __swblk_t swblk_t; typedef __uid_t uid_t; typedef __useconds_t useconds_t; typedef __suseconds_t suseconds_t; typedef __fsblkcnt_t fsblkcnt_t; typedef __fsfilcnt_t fsfilcnt_t; # 160 "/usr/include/sys/types.h" 3 4 typedef __in_addr_t in_addr_t; typedef __in_port_t in_port_t; typedef __sa_family_t sa_family_t; typedef __socklen_t socklen_t; typedef __clock_t clock_t; typedef __clockid_t clockid_t; typedef __size_t size_t; typedef __ssize_t ssize_t; typedef __time_t time_t; typedef __timer_t timer_t; typedef __off_t off_t; # 209 "/usr/include/sys/types.h" 3 4 off_t lseek(int, off_t, int); int ftruncate(int, off_t); int truncate(const char *, off_t); # 224 "/usr/include/sys/types.h" 3 4 # 1 "/usr/include/sys/select.h" 1 3 4 # 38 "/usr/include/sys/select.h" 3 4 # 1 "/usr/include/sys/time.h" 1 3 4 # 39 "/usr/include/sys/time.h" 3 4 # 1 "/usr/include/sys/types.h" 1 3 4 # 40 "/usr/include/sys/time.h" 2 3 4 # 49 "/usr/include/sys/time.h" 3 4 struct timeval { long tv_sec; long tv_usec; }; struct timespec { time_t tv_sec; long tv_nsec; }; # 74 "/usr/include/sys/time.h" 3 4 struct timezone { int tz_minuteswest; int tz_dsttime; }; # 139 "/usr/include/sys/time.h" 3 4 struct bintime { time_t sec; uint64_t frac; }; static __inline void bintime_addx(struct bintime *bt, uint64_t x) { uint64_t u; u = bt->frac; bt->frac += x; if (u > bt->frac) bt->sec++; } static __inline void bintime_add(struct bintime *bt, struct bintime *bt2) { uint64_t u; u = bt->frac; bt->frac += bt2->frac; if (u > bt->frac) bt->sec++; bt->sec += bt2->sec; } static __inline void bintime_sub(struct bintime *bt, struct bintime *bt2) { uint64_t u; u = bt->frac; bt->frac -= bt2->frac; if (u < bt->frac) bt->sec--; bt->sec -= bt2->sec; } # 193 "/usr/include/sys/time.h" 3 4 static __inline void bintime2timespec(struct bintime *bt, struct timespec *ts) { ts->tv_sec = bt->sec; ts->tv_nsec = (long)(((uint64_t)1000000000 * (uint32_t)(bt->frac >> 32)) >> 32); } static __inline void timespec2bintime(struct timespec *ts, struct bintime *bt) { bt->sec = ts->tv_sec; bt->frac = (uint64_t)ts->tv_nsec * (uint64_t)18446744073ULL; } static __inline void bintime2timeval(struct bintime *bt, struct timeval *tv) { tv->tv_sec = bt->sec; tv->tv_usec = (long)(((uint64_t)1000000 * (uint32_t)(bt->frac >> 32)) >> 32); } static __inline void timeval2bintime(struct timeval *tv, struct bintime *bt) { bt->sec = (time_t)tv->tv_sec; bt->frac = (uint64_t)tv->tv_usec * (uint64_t)18446744073709ULL; } # 235 "/usr/include/sys/time.h" 3 4 struct itimerval { struct timeval it_interval; struct timeval it_value; }; struct itimerspec { struct timespec it_interval; struct timespec it_value; }; struct clockinfo { int hz; int tick; int tickadj; int stathz; int profhz; }; # 346 "/usr/include/sys/time.h" 3 4 # 1 "/usr/include/time.h" 1 3 4 # 90 "/usr/include/time.h" 3 4 struct tm { int tm_sec; int tm_min; int tm_hour; int tm_mday; int tm_mon; int tm_year; int tm_wday; int tm_yday; int tm_isdst; long tm_gmtoff; char *tm_zone; }; struct timespec; char *asctime(const struct tm *); clock_t clock(void); char *ctime(const time_t *); double difftime(time_t, time_t); struct tm *gmtime(const time_t *); struct tm *localtime(const time_t *); time_t mktime(struct tm *); size_t strftime(char *, size_t, const char *, const struct tm *) __attribute__ ((__bounded__(__string__,1,2))); char *strptime(const char *, const char *, struct tm *); time_t time(time_t *); char *asctime_r(const struct tm *, char *) __attribute__ ((__bounded__(__minbytes__,2,26))); char *ctime_r(const time_t *, char *) __attribute__ ((__bounded__(__minbytes__,2,26))); struct tm *gmtime_r(const time_t *, struct tm *); struct tm *localtime_r(const time_t *, struct tm *); int nanosleep(const struct timespec *, struct timespec *); extern char *tzname[2]; void tzset(void); char *timezone(int, int); void tzsetwall(void); time_t timelocal(struct tm *); time_t timegm(struct tm *); time_t timeoff(struct tm *, const long); # 347 "/usr/include/sys/time.h" 2 3 4 int adjtime(const struct timeval *, struct timeval *); int adjfreq(const int64_t *, int64_t *); int clock_getres(clockid_t, struct timespec *); int clock_gettime(clockid_t, struct timespec *); int clock_settime(clockid_t, const struct timespec *); int futimes(int, const struct timeval *); int getitimer(int, struct itimerval *); int gettimeofday(struct timeval *, struct timezone *); int setitimer(int, const struct itimerval *, struct itimerval *); int settimeofday(const struct timeval *, const struct timezone *); int utimes(const char *, const struct timeval *); # 39 "/usr/include/sys/select.h" 2 3 4 # 55 "/usr/include/sys/select.h" 3 4 typedef int32_t __fd_mask; typedef struct fd_set { __fd_mask fds_bits[(((1024) + ((((unsigned)(sizeof(__fd_mask) * 8))) - 1)) / (((unsigned)(sizeof(__fd_mask) * 8))))]; } fd_set; # 89 "/usr/include/sys/select.h" 3 4 struct timeval; int select(int, fd_set *, fd_set *, fd_set *, struct timeval *); # 225 "/usr/include/sys/types.h" 2 3 4 # 46 "/usr/include/stdio.h" 2 3 4 # 70 "/usr/include/stdio.h" 3 4 typedef off_t fpos_t; # 79 "/usr/include/stdio.h" 3 4 struct __sbuf { unsigned char *_base; int _size; }; # 108 "/usr/include/stdio.h" 3 4 typedef struct __sFILE { unsigned char *_p; int _r; int _w; short _flags; short _file; struct __sbuf _bf; int _lbfsize; void *_cookie; int (*_close)(void *); int (*_read)(void *, char *, int); fpos_t (*_seek)(void *, fpos_t, int); int (*_write)(void *, const char *, int); struct __sbuf _ext; unsigned char *_up; int _ur; unsigned char _ubuf[3]; unsigned char _nbuf[1]; struct __sbuf _lb; int _blksize; fpos_t _offset; } FILE; extern FILE __sF[]; # 213 "/usr/include/stdio.h" 3 4 void clearerr(FILE *); int fclose(FILE *); int feof(FILE *); int ferror(FILE *); int fflush(FILE *); int fgetc(FILE *); int fgetpos(FILE *, fpos_t *); char *fgets(char *, int, FILE *) __attribute__((__bounded__ (__string__,1,2))); FILE *fopen(const char *, const char *); int fprintf(FILE *, const char *, ...); int fputc(int, FILE *); int fputs(const char *, FILE *); size_t fread(void *, size_t, size_t, FILE *) __attribute__((__bounded__ (__size__,1,3,2))); FILE *freopen(const char *, const char *, FILE *); int fscanf(FILE *, const char *, ...); int fseek(FILE *, long, int); int fseeko(FILE *, off_t, int); int fsetpos(FILE *, const fpos_t *); long ftell(FILE *); off_t ftello(FILE *); size_t fwrite(const void *, size_t, size_t, FILE *) __attribute__((__bounded__ (__size__,1,3,2))); int getc(FILE *); int getchar(void); char *gets(char *); extern int sys_nerr; extern char *sys_errlist[]; void perror(const char *); int printf(const char *, ...); int putc(int, FILE *); int putchar(int); int puts(const char *); int remove(const char *); int rename(const char *, const char *); void rewind(FILE *); int scanf(const char *, ...); void setbuf(FILE *, char *); int setvbuf(FILE *, char *, int, size_t); int sprintf(char *, const char *, ...); int sscanf(const char *, const char *, ...); FILE *tmpfile(void); char *tmpnam(char *); int ungetc(int, FILE *); int vfprintf(FILE *, const char *, __va_list); int vprintf(const char *, __va_list); int vsprintf(char *, const char *, __va_list); int snprintf(char *, size_t, const char *, ...) __attribute__((__format__ (printf, 3, 4))) __attribute__((__nonnull__ (3))) __attribute__((__bounded__ (__string__,1,2))); int vfscanf(FILE *, const char *, __va_list) __attribute__((__format__ (scanf, 2, 0))) __attribute__((__nonnull__ (2))); int vscanf(const char *, __va_list) __attribute__((__format__ (scanf, 1, 0))) __attribute__((__nonnull__ (1))); int vsnprintf(char *, size_t, const char *, __va_list) __attribute__((__format__ (printf, 3, 0))) __attribute__((__nonnull__ (3))) __attribute__((__bounded__(__string__,1,2))); int vsscanf(const char *, const char *, __va_list) __attribute__((__format__ (scanf, 2, 0))) __attribute__((__nonnull__ (2))); # 300 "/usr/include/stdio.h" 3 4 char *ctermid(char *); char *cuserid(char *); FILE *fdopen(int, const char *); int fileno(FILE *); int pclose(FILE *); FILE *popen(const char *, const char *); void flockfile(FILE *); int ftrylockfile(FILE *); void funlockfile(FILE *); int getc_unlocked(FILE *); int getchar_unlocked(void); int putc_unlocked(int, FILE *); int putchar_unlocked(int); char *tempnam(const char *, const char *); int asprintf(char **, const char *, ...) __attribute__((__format__ (printf, 2, 3))) __attribute__((__nonnull__ (2))); char *fgetln(FILE *, size_t *); int fpurge(FILE *); int getw(FILE *); int putw(int, FILE *); void setbuffer(FILE *, char *, int); int setlinebuf(FILE *); int vasprintf(char **, const char *, __va_list) __attribute__((__format__ (printf, 2, 0))) __attribute__((__nonnull__ (2))); FILE *funopen(const void *, int (*)(void *, char *, int), int (*)(void *, const char *, int), fpos_t (*)(void *, fpos_t, int), int (*)(void *)); int __srget(FILE *); int __swbuf(int, FILE *); static __inline int __sputc(int _c, FILE *_p) { if (--_p->_w >= 0 || (_p->_w >= _p->_lbfsize && (char)_c != '\n')) return (*_p->_p++ = _c); else return (__swbuf(_c, _p)); } # 405 "/usr/include/stdio.h" 3 4 extern int __isthreaded; # 26 "./Include/Python.h" 2 # 1 "/usr/include/string.h" 1 3 4 # 56 "/usr/include/string.h" 3 4 void *memchr(const void *, int, size_t); void *memrchr(const void *, int, size_t); int memcmp(const void *, const void *, size_t); void *memcpy(void *, const void *, size_t) __attribute__ ((__bounded__(__buffer__,1,3))) __attribute__ ((__bounded__(__buffer__,2,3))); void *memmove(void *, const void *, size_t) __attribute__ ((__bounded__(__buffer__,1,3))) __attribute__ ((__bounded__(__buffer__,2,3))); void *memset(void *, int, size_t) __attribute__ ((__bounded__(__buffer__,1,3))); char *strcat(char *, const char *); char *strchr(const char *, int); int strcmp(const char *, const char *); int strcoll(const char *, const char *); char *strcpy(char *, const char *); size_t strcspn(const char *, const char *); char *strerror(int); size_t strlen(const char *); char *strncat(char *, const char *, size_t) __attribute__ ((__bounded__(__string__,1,3))); int strncmp(const char *, const char *, size_t); char *strncpy(char *, const char *, size_t) __attribute__ ((__bounded__(__string__,1,3))); char *strpbrk(const char *, const char *); char *strrchr(const char *, int); size_t strspn(const char *, const char *); char *strstr(const char *, const char *); char *strtok(char *, const char *); char *strtok_r(char *, const char *, char **); size_t strxfrm(char *, const char *, size_t) __attribute__ ((__bounded__(__string__,1,3))); void *memccpy(void *, const void *, int, size_t) __attribute__ ((__bounded__(__buffer__,1,4))); int bcmp(const void *, const void *, size_t); void bcopy(const void *, void *, size_t) __attribute__ ((__bounded__(__buffer__,1,3))) __attribute__ ((__bounded__(__buffer__,2,3))); void bzero(void *, size_t) __attribute__ ((__bounded__(__buffer__,1,2))); int ffs(int); char *index(const char *, int); char *rindex(const char *, int); int strcasecmp(const char *, const char *); int strncasecmp(const char *, const char *, size_t); char *strdup(const char *); int strerror_r(int, char *, size_t) __attribute__ ((__bounded__(__string__,2,3))); # 121 "/usr/include/string.h" 3 4 char *strcasestr(const char *, const char *); size_t strlcat(char *, const char *, size_t) __attribute__ ((__bounded__(__string__,1,3))); size_t strlcpy(char *, const char *, size_t) __attribute__ ((__bounded__(__string__,1,3))); void strmode(int, char *); char *strsep(char **, const char *); char *strsignal(int); int timingsafe_bcmp(const void *, const void *, size_t); # 31 "./Include/Python.h" 2 # 1 "/usr/include/errno.h" 1 3 4 # 43 "/usr/include/errno.h" 3 4 # 1 "/usr/include/sys/errno.h" 1 3 4 # 44 "/usr/include/errno.h" 2 3 4 # 55 "/usr/include/errno.h" 3 4 int *__errno(void); int *___errno(void); # 33 "./Include/Python.h" 2 # 1 "/usr/include/stdlib.h" 1 3 4 # 52 "/usr/include/stdlib.h" 3 4 typedef __wchar_t wchar_t; typedef struct { int quot; int rem; } div_t; typedef struct { long quot; long rem; } ldiv_t; typedef struct { long long quot; long long rem; } lldiv_t; typedef struct { quad_t quot; quad_t rem; } qdiv_t; # 95 "/usr/include/stdlib.h" 3 4 extern size_t __mb_cur_max; # 109 "/usr/include/stdlib.h" 3 4 __attribute__((__noreturn__)) void abort(void); int abs(int); int atexit(void (*)(void)); double atof(const char *); int atoi(const char *); long atol(const char *); void *bsearch(const void *, const void *, size_t, size_t, int (*)(const void *, const void *)); void *calloc(size_t, size_t); div_t div(int, int); char *ecvt(double, int, int *, int *); __attribute__((__noreturn__)) void exit(int); __attribute__((__noreturn__)) void _Exit(int); char *fcvt(double, int, int *, int *); void free(void *); char *gcvt(double, int, char *); char *getenv(const char *); long labs(long); ldiv_t ldiv(long, long); void *malloc(size_t); int posix_memalign(void **, size_t, size_t); void qsort(void *, size_t, size_t, int (*)(const void *, const void *)); int rand(void); void *realloc(void *, size_t); void srand(unsigned); double strtod(const char *, char **); float strtof(const char *, char **); long strtol(const char *, char **, int); long double strtold(const char *, char **); unsigned long strtoul(const char *, char **, int); int system(const char *); int mblen(const char *, size_t); size_t mbstowcs(wchar_t *, const char *, size_t); int wctomb(char *, wchar_t); int mbtowc(wchar_t *, const char *, size_t); size_t wcstombs(char *, const wchar_t *, size_t); int rand_r(unsigned int *); double drand48(void); double erand48(unsigned short[3]); long jrand48(unsigned short[3]); void lcong48(unsigned short[7]); long lrand48(void); long mrand48(void); long nrand48(unsigned short[3]); unsigned short *seed48(unsigned short[3]); void srand48(long); int putenv(char *); long a64l(const char *); char *l64a(long); char *initstate(unsigned int, char *, size_t) __attribute__((__bounded__ (__string__,2,3))); long random(void); char *setstate(const char *); void srandom(unsigned int); int mkstemp(char *); char *mktemp(char *); char *realpath(const char *, char *); int setkey(const char *); int ttyslot(void); void *valloc(size_t); long long atoll(const char *); long long llabs(long long); lldiv_t lldiv(long long, long long); long long strtoll(const char *, char **, int); unsigned long long strtoull(const char *, char **, int); int setenv(const char *, const char *, int); int unsetenv(const char *); void *alloca(size_t); char *getbsize(int *, long *); char *cgetcap(char *, const char *, int); int cgetclose(void); int cgetent(char **, char **, const char *); int cgetfirst(char **, char **); int cgetmatch(char *, const char *); int cgetnext(char **, char **); int cgetnum(char *, const char *, long *); int cgetset(const char *); int cgetusedb(int); int cgetstr(char *, const char *, char **); int cgetustr(char *, const char *, char **); int daemon(int, int); char *devname(int, mode_t); int getloadavg(double [], int); void cfree(void *); int getopt(int, char * const *, const char *); extern char *optarg; extern int opterr, optind, optopt, optreset; int getsubopt(char **, char * const *, char **); extern char *suboptarg; char *mkdtemp(char *); int mkstemps(char *, int); int heapsort(void *, size_t, size_t, int (*)(const void *, const void *)); int mergesort(void *, size_t, size_t, int (*)(const void *, const void *)); int radixsort(const unsigned char **, int, const unsigned char *, unsigned); int sradixsort(const unsigned char **, int, const unsigned char *, unsigned); void srandomdev(void); long long strtonum(const char *, long long, long long, const char **); void setproctitle(const char *, ...) __attribute__((__format__ (__printf__, 1, 2))); quad_t qabs(quad_t); qdiv_t qdiv(quad_t, quad_t); quad_t strtoq(const char *, char **, int); u_quad_t strtouq(const char *, char **, int); u_int32_t arc4random(void); void arc4random_stir(void); void arc4random_addrandom(unsigned char *, int) __attribute__((__bounded__ (__string__,1,2))); u_int32_t arc4random_uniform(u_int32_t); void arc4random_buf(void *, size_t) __attribute__((__bounded__ (__string__,1,2))); # 35 "./Include/Python.h" 2 # 1 "/usr/include/unistd.h" 1 3 4 # 40 "/usr/include/unistd.h" 3 4 # 1 "/usr/include/sys/unistd.h" 1 3 4 # 41 "/usr/include/unistd.h" 2 3 4 # 68 "/usr/include/unistd.h" 3 4 __attribute__((__noreturn__)) void _exit(int); int access(const char *, int); unsigned int alarm(unsigned int); int chdir(const char *); int chown(const char *, uid_t, gid_t); int close(int); int dup(int); int dup2(int, int); int execl(const char *, const char *, ...) __attribute__((sentinel)); int execle(const char *, const char *, ...); int execlp(const char *, const char *, ...) __attribute__((sentinel)); int execv(const char *, char * const *); int execve(const char *, char * const *, char * const *); int execvp(const char *, char * const *); pid_t fork(void); long fpathconf(int, int); char *getcwd(char *, size_t) __attribute__((__bounded__(__string__,1,2))) __attribute__((__bounded__(__minbytes__,1,1024))); gid_t getegid(void); uid_t geteuid(void); gid_t getgid(void); int getgroups(int, gid_t *); char *getlogin(void); pid_t getpgrp(void); pid_t getpid(void); pid_t getppid(void); uid_t getuid(void); int isatty(int); int link(const char *, const char *); off_t lseek(int, off_t, int); long pathconf(const char *, int); int pause(void); int pipe(int *); ssize_t read(int, void *, size_t) __attribute__((__bounded__(__buffer__,2,3))); int rmdir(const char *); int setgid(gid_t); int setuid(uid_t); unsigned int sleep(unsigned int); long sysconf(int); pid_t tcgetpgrp(int); int tcsetpgrp(int, pid_t); char *ttyname(int); int unlink(const char *); ssize_t write(int, const void *, size_t) __attribute__((__bounded__(__buffer__,2,3))); pid_t setsid(void); int setpgid(pid_t, pid_t); size_t confstr(int, char *, size_t) __attribute__((__bounded__(__string__,2,3))); # 139 "/usr/include/unistd.h" 3 4 int fsync(int); int ftruncate(int, off_t); int getlogin_r(char *, size_t) __attribute__((__bounded__(__string__,1,2))) __attribute__((__bounded__(__minbytes__,1,32))); char *crypt(const char *, const char *); int encrypt(char *, int); int fchdir(int); int fchown(int, uid_t, gid_t); long gethostid(void); char *getwd(char *) __attribute__ ((__bounded__(__minbytes__,1,1024))); int lchown(const char *, uid_t, gid_t); int mkstemp(char *); char *mktemp(char *); int nice(int); int readlink(const char *, char *, size_t) __attribute__ ((__bounded__(__string__,2,3))); int setkey(const char *); int setpgrp(pid_t pid, pid_t pgrp); int setregid(gid_t, gid_t); int setreuid(uid_t, uid_t); void swab(const void *, void *, size_t); void sync(void); int truncate(const char *, off_t); unsigned int ualarm(unsigned int, unsigned int); int usleep(useconds_t); pid_t vfork(void); pid_t getpgid(pid_t); pid_t getsid(pid_t); ssize_t pread(int, void *, size_t, off_t); ssize_t pwrite(int, const void *, size_t, off_t); int ttyname_r(int, char *, size_t) __attribute__((__bounded__(__string__,2,3))); int brk(void *); int chroot(const char *); int getdtablesize(void); int getpagesize(void); char *getpass(const char *); void *sbrk(int); int lockf(int, int, off_t); int symlink(const char *, const char *); int gethostname(char *, size_t) __attribute__ ((__bounded__(__string__,1,2))); int setegid(gid_t); int seteuid(uid_t); # 216 "/usr/include/unistd.h" 3 4 int acct(const char *); int closefrom(int); int des_cipher(const char *, char *, int32_t, int); int des_setkey(const char *); void endusershell(void); int exect(const char *, char * const *, char * const *); char *fflagstostr(u_int32_t); int getdomainname(char *, size_t) __attribute__ ((__bounded__(__string__,1,2))); int getgrouplist(const char *, gid_t, gid_t *, int *); mode_t getmode(const void *, mode_t); int getresgid(gid_t *, gid_t *, gid_t *); int getresuid(uid_t *, uid_t *, uid_t *); char *getusershell(void); int initgroups(const char *, gid_t); int iruserok(u_int32_t, int, const char *, const char *); int iruserok_sa(const void *, int, int, const char *, const char *); int issetugid(void); char *mkdtemp(char *); int mkstemps(char *, int); int nfssvc(int, void *); int profil(char *, size_t, unsigned long, unsigned int) __attribute__ ((__bounded__(__string__,1,2))); int quotactl(const char *, int, int, char *); int rcmd(char **, int, const char *, const char *, const char *, int *); int rcmd_af(char **, int, const char *, const char *, const char *, int *, int); int rcmdsh(char **, int, const char *, const char *, const char *, char *); char *re_comp(const char *); int re_exec(const char *); int reboot(int); int revoke(const char *); int rfork(int opts); int rresvport(int *); int rresvport_af(int *, int); int ruserok(const char *, int, const char *, const char *); int setdomainname(const char *, size_t); int setgroups(int, const gid_t *); int sethostid(long); int sethostname(const char *, size_t); int setlogin(const char *); void *setmode(const char *); int setresgid(gid_t, gid_t, gid_t); int setresuid(uid_t, uid_t, uid_t); int setrgid(gid_t); int setruid(uid_t); void setusershell(void); int strtofflags(char **, u_int32_t *, u_int32_t *); int swapctl(int cmd, const void *arg, int misc); int syscall(int, ...); # 37 "./Include/Python.h" 2 # 48 "./Include/Python.h" # 1 "/usr/include/assert.h" 1 3 4 # 64 "/usr/include/assert.h" 3 4 __attribute__((__noreturn__)) void __assert(const char *, int, const char *); __attribute__((__noreturn__)) void __assert2(const char *, int, const char *, const char *); # 49 "./Include/Python.h" 2 # 1 "./Include/pyport.h" 1 # 9 "./Include/pyport.h" # 1 "/usr/include/inttypes.h" 1 3 4 # 22 "/usr/include/inttypes.h" 3 4 # 1 "/usr/include/sys/stdint.h" 1 3 4 # 71 "/usr/include/sys/stdint.h" 3 4 typedef __int_least8_t int_least8_t; typedef __uint_least8_t uint_least8_t; typedef __int_least16_t int_least16_t; typedef __uint_least16_t uint_least16_t; typedef __int_least32_t int_least32_t; typedef __uint_least32_t uint_least32_t; typedef __int_least64_t int_least64_t; typedef __uint_least64_t uint_least64_t; typedef __int_fast8_t int_fast8_t; typedef __uint_fast8_t uint_fast8_t; typedef __int_fast16_t int_fast16_t; typedef __uint_fast16_t uint_fast16_t; typedef __int_fast32_t int_fast32_t; typedef __uint_fast32_t uint_fast32_t; typedef __int_fast64_t int_fast64_t; typedef __uint_fast64_t uint_fast64_t; typedef __intptr_t intptr_t; typedef __uintptr_t uintptr_t; typedef __intmax_t intmax_t; typedef __uintmax_t uintmax_t; # 23 "/usr/include/inttypes.h" 2 3 4 # 249 "/usr/include/inttypes.h" 3 4 typedef struct { intmax_t quot; intmax_t rem; } imaxdiv_t; intmax_t imaxabs(intmax_t); imaxdiv_t imaxdiv(intmax_t, intmax_t); intmax_t strtoimax(const char *, char **, int); uintmax_t strtoumax(const char *, char **, int); intmax_t wcstoimax(const __wchar_t * __restrict, __wchar_t ** __restrict, int); uintmax_t wcstoumax(const __wchar_t * __restrict, __wchar_t ** __restrict, int); # 10 "./Include/pyport.h" 2 # 1 "/usr/include/stdint.h" 1 3 4 # 14 "./Include/pyport.h" 2 # 154 "./Include/pyport.h" typedef uintptr_t Py_uintptr_t; typedef intptr_t Py_intptr_t; # 178 "./Include/pyport.h" typedef ssize_t Py_ssize_t; typedef Py_ssize_t Py_hash_t; typedef size_t Py_uhash_t; # 321 "./Include/pyport.h" # 1 "/usr/include/ieeefp.h" 1 3 4 # 12 "/usr/include/ieeefp.h" 3 4 # 1 "/usr/include/machine/ieeefp.h" 1 3 4 # 11 "/usr/include/machine/ieeefp.h" 3 4 typedef int fp_except; typedef enum { FP_RN=0, FP_RM=1, FP_RP=2, FP_RZ=3 } fp_rnd; # 13 "/usr/include/ieeefp.h" 2 3 4 extern fp_rnd fpgetround(void); extern fp_rnd fpsetround(fp_rnd); extern fp_except fpgetmask(void); extern fp_except fpsetmask(fp_except); extern fp_except fpgetsticky(void); extern fp_except fpsetsticky(fp_except); # 322 "./Include/pyport.h" 2 # 1 "/usr/include/math.h" 1 3 4 # 24 "/usr/include/math.h" 3 4 extern char __infinity[]; # 39 "/usr/include/math.h" 3 4 typedef __double_t double_t; typedef __float_t float_t; # 142 "/usr/include/math.h" 3 4 extern int signgam; # 152 "/usr/include/math.h" 3 4 double acos(double); double asin(double); double atan(double); double atan2(double, double); double cos(double); double sin(double); double tan(double); double cosh(double); double sinh(double); double tanh(double); double exp(double); double frexp(double, int *); double ldexp(double, int); double log(double); double log10(double); double modf(double, double *); double pow(double, double); double sqrt(double); double ceil(double); double fabs(double); double floor(double); double fmod(double, double); double acosh(double); double asinh(double); double atanh(double); double exp2(double); double expm1(double); int ilogb(double); double log1p(double); double log2(double); double logb(double); double scalbn(double, int); double scalbln(double, long int); double cbrt(double); double hypot(double, double); double erf(double); double erfc(double); double lgamma(double); double tgamma(double); double nearbyint(double); double rint(double); long int lrint(double); long long int llrint(double); double round(double); long int lround(double); long long int llround(double); double trunc(double); double remainder(double, double); double remquo(double, double, int *); double copysign(double, double); double nan(const char *); double nextafter(double, double); double nexttoward(double, long double); double fdim(double, double); double fmax(double, double); double fmin(double, double); double fma(double, double, double); double j0(double); double j1(double); double jn(int, double); double scalb(double, double); double y0(double); double y1(double); double yn(int, double); double gamma(double); double drem(double, double); int finite(double); double gamma_r(double, int *); double lgamma_r(double, int *); double significand(double); float acosf(float); float asinf(float); float atanf(float); float atan2f(float, float); float cosf(float); float sinf(float); float tanf(float); float acoshf(float); float asinhf(float); float atanhf(float); float coshf(float); float sinhf(float); float tanhf(float); float expf(float); float exp2f(float); float expm1f(float); float frexpf(float, int *); int ilogbf(float); float ldexpf(float, int); float logf(float); float log10f(float); float log1pf(float); float log2f(float); float logbf(float); float modff(float, float *); float scalbnf(float, int); float scalblnf(float, long int); float cbrtf(float); float fabsf(float); float hypotf(float, float); float powf(float, float); float sqrtf(float); float erff(float); float erfcf(float); float lgammaf(float); float tgammaf(float); float ceilf(float); float floorf(float); float nearbyintf(float); float rintf(float); long int lrintf(float); long long int llrintf(float); float roundf(float); long int lroundf(float); long long int llroundf(float); float truncf(float); float fmodf(float, float); float remainderf(float, float); float remquof(float, float, int *); float copysignf(float, float); float nanf(const char *); float nextafterf(float, float); float nexttowardf(float, long double); float fdimf(float, float); float fmaxf(float, float); float fminf(float, float); float fmaf(float, float, float); float j0f(float); float j1f(float); float jnf(int, float); float scalbf(float, float); float y0f(float); float y1f(float); float ynf(int, float); float gammaf(float); float dremf(float, float); int finitef(float); int isinff(float); int isnanf(float); float gammaf_r(float, int *); float lgammaf_r(float, int *); float significandf(float); long double acosl(long double); long double asinl(long double); long double atanl(long double); long double atan2l(long double, long double); long double cosl(long double); long double sinl(long double); long double tanl(long double); long double acoshl(long double); long double asinhl(long double); long double atanhl(long double); long double coshl(long double); long double sinhl(long double); long double tanhl(long double); long double expl(long double); long double exp2l(long double); long double expm1l(long double); long double frexpl(long double, int *); int ilogbl(long double); long double ldexpl(long double, int); long double logl(long double); long double log10l(long double); long double log1pl(long double); long double log2l(long double); long double logbl(long double); long double modfl(long double, long double *); long double scalbnl(long double, int); long double scalblnl(long double, long int); long double cbrtl(long double); long double fabsl(long double); long double hypotl(long double, long double); long double powl(long double, long double); long double sqrtl(long double); long double erfl(long double); long double erfcl(long double); long double lgammal(long double); long double tgammal(long double); long double ceill(long double); long double floorl(long double); long double nearbyintl(long double); long double rintl(long double); long int lrintl(long double); long long int llrintl(long double); long double roundl(long double); long int lroundl(long double); long long int llroundl(long double); long double truncl(long double); long double fmodl(long double, long double); long double remainderl(long double, long double); long double remquol(long double, long double, int *); long double copysignl(long double, long double); long double nanl(const char *); long double nextafterl(long double, long double); long double nexttowardl(long double, long double); long double fdiml(long double, long double); long double fmaxl(long double, long double); long double fminl(long double, long double); long double fmal(long double, long double, long double); int __fpclassify(double); int __fpclassifyf(float); int __fpclassifyl(long double); int __isfinite(double); int __isfinitef(float); int __isfinitel(long double); int __isinf(double); int __isinff(float); int __isinfl(long double); int __isnan(double); int __isnanf(float); int __isnanl(long double); int __isnormal(double); int __isnormalf(float); int __isnormall(long double); int __signbit(double); int __signbitf(float); int __signbitl(long double); # 325 "./Include/pyport.h" 2 # 382 "./Include/pyport.h" # 1 "/usr/include/sys/stat.h" 1 3 4 # 46 "/usr/include/sys/stat.h" 3 4 struct stat { dev_t st_dev; ino_t st_ino; mode_t st_mode; nlink_t st_nlink; uid_t st_uid; gid_t st_gid; dev_t st_rdev; int32_t st_lspare0; struct timespec st_atim; struct timespec st_mtim; struct timespec st_ctim; # 67 "/usr/include/sys/stat.h" 3 4 off_t st_size; int64_t st_blocks; u_int32_t st_blksize; u_int32_t st_flags; u_int32_t st_gen; int32_t st_lspare1; struct timespec __st_birthtim; int64_t st_qspare[2]; }; # 190 "/usr/include/sys/stat.h" 3 4 int chmod(const char *, mode_t); int fstat(int, struct stat *); int mknod(const char *, mode_t, dev_t); int mkdir(const char *, mode_t); int mkfifo(const char *, mode_t); int stat(const char *, struct stat *); mode_t umask(mode_t); # 208 "/usr/include/sys/stat.h" 3 4 int chflags(const char *, unsigned int); int fchflags(int, unsigned int); int fchmod(int, mode_t); int lstat(const char *, struct stat *); int isfdtype(int, int); # 383 "./Include/pyport.h" 2 # 633 "./Include/pyport.h" # 1 "/usr/include/termios.h" 1 3 4 # 185 "/usr/include/termios.h" 3 4 typedef unsigned int tcflag_t; typedef unsigned char cc_t; typedef unsigned int speed_t; struct termios { tcflag_t c_iflag; tcflag_t c_oflag; tcflag_t c_cflag; tcflag_t c_lflag; cc_t c_cc[20]; int c_ispeed; int c_ospeed; }; # 252 "/usr/include/termios.h" 3 4 speed_t cfgetispeed(const struct termios *); speed_t cfgetospeed(const struct termios *); int cfsetispeed(struct termios *, speed_t); int cfsetospeed(struct termios *, speed_t); int tcgetattr(int, struct termios *); int tcsetattr(int, int, const struct termios *); int tcdrain(int); int tcflow(int, int); int tcflush(int, int); int tcsendbreak(int, int); void cfmakeraw(struct termios *); int cfsetspeed(struct termios *, speed_t); # 278 "/usr/include/termios.h" 3 4 # 1 "/usr/include/sys/ttycom.h" 1 3 4 # 43 "/usr/include/sys/ttycom.h" 3 4 # 1 "/usr/include/sys/ioccom.h" 1 3 4 # 44 "/usr/include/sys/ttycom.h" 2 3 4 # 54 "/usr/include/sys/ttycom.h" 3 4 struct winsize { unsigned short ws_row; unsigned short ws_col; unsigned short ws_xpixel; unsigned short ws_ypixel; }; struct tstamps { int ts_set; int ts_clr; }; # 279 "/usr/include/termios.h" 2 3 4 # 287 "/usr/include/termios.h" 3 4 # 1 "/usr/include/sys/ttydefaults.h" 1 3 4 # 288 "/usr/include/termios.h" 2 3 4 # 634 "./Include/pyport.h" 2 extern int openpty(int *, int *, char *, struct termios *, struct winsize *); extern pid_t forkpty(int *, char *, struct termios *, struct winsize *); # 51 "./Include/Python.h" 2 # 1 "./Include/pyatomic.h" 1 # 1 "./Include/dynamic_annotations.h" 1 # 375 "./Include/dynamic_annotations.h" void AnnotateRWLockCreate(const char *file, int line, const volatile void *lock); void AnnotateRWLockDestroy(const char *file, int line, const volatile void *lock); void AnnotateRWLockAcquired(const char *file, int line, const volatile void *lock, long is_w); void AnnotateRWLockReleased(const char *file, int line, const volatile void *lock, long is_w); void AnnotateBarrierInit(const char *file, int line, const volatile void *barrier, long count, long reinitialization_allowed); void AnnotateBarrierWaitBefore(const char *file, int line, const volatile void *barrier); void AnnotateBarrierWaitAfter(const char *file, int line, const volatile void *barrier); void AnnotateBarrierDestroy(const char *file, int line, const volatile void *barrier); void AnnotateCondVarWait(const char *file, int line, const volatile void *cv, const volatile void *lock); void AnnotateCondVarSignal(const char *file, int line, const volatile void *cv); void AnnotateCondVarSignalAll(const char *file, int line, const volatile void *cv); void AnnotatePublishMemoryRange(const char *file, int line, const volatile void *address, long size); void AnnotateUnpublishMemoryRange(const char *file, int line, const volatile void *address, long size); void AnnotatePCQCreate(const char *file, int line, const volatile void *pcq); void AnnotatePCQDestroy(const char *file, int line, const volatile void *pcq); void AnnotatePCQPut(const char *file, int line, const volatile void *pcq); void AnnotatePCQGet(const char *file, int line, const volatile void *pcq); void AnnotateNewMemory(const char *file, int line, const volatile void *address, long size); void AnnotateExpectRace(const char *file, int line, const volatile void *address, const char *description); void AnnotateBenignRace(const char *file, int line, const volatile void *address, const char *description); void AnnotateBenignRaceSized(const char *file, int line, const volatile void *address, long size, const char *description); void AnnotateMutexIsUsedAsCondVar(const char *file, int line, const volatile void *mu); void AnnotateTraceMemory(const char *file, int line, const volatile void *arg); void AnnotateThreadName(const char *file, int line, const char *name); void AnnotateIgnoreReadsBegin(const char *file, int line); void AnnotateIgnoreReadsEnd(const char *file, int line); void AnnotateIgnoreWritesBegin(const char *file, int line); void AnnotateIgnoreWritesEnd(const char *file, int line); void AnnotateEnableRaceDetection(const char *file, int line, int enable); void AnnotateNoOp(const char *file, int line, const volatile void *arg); void AnnotateFlushState(const char *file, int line); # 456 "./Include/dynamic_annotations.h" int RunningOnValgrind(void); # 9 "./Include/pyatomic.h" 2 # 23 "./Include/pyatomic.h" typedef enum _Py_memory_order { _Py_memory_order_relaxed, _Py_memory_order_acquire, _Py_memory_order_release, _Py_memory_order_acq_rel, _Py_memory_order_seq_cst } _Py_memory_order; typedef struct _Py_atomic_address { void *_value; } _Py_atomic_address; typedef struct _Py_atomic_int { int _value; } _Py_atomic_int; static __inline__ void _Py_atomic_signal_fence(_Py_memory_order order) { if (order != _Py_memory_order_relaxed) __asm__ volatile("":::"memory"); } static __inline__ void _Py_atomic_thread_fence(_Py_memory_order order) { if (order != _Py_memory_order_relaxed) __asm__ volatile("mfence":::"memory"); } static __inline__ void _Py_ANNOTATE_MEMORY_ORDER(const volatile void *address, _Py_memory_order order) { switch(order) { case _Py_memory_order_release: case _Py_memory_order_acq_rel: case _Py_memory_order_seq_cst: ; break; default: break; } switch(order) { case _Py_memory_order_acquire: case _Py_memory_order_acq_rel: case _Py_memory_order_seq_cst: ; break; default: break; } } # 53 "./Include/Python.h" 2 # 63 "./Include/Python.h" # 1 "./Include/pymath.h" 1 # 77 "./Include/pymath.h" unsigned short _Py_get_387controlword(void); void _Py_set_387controlword(unsigned short); # 64 "./Include/Python.h" 2 # 1 "./Include/pytime.h" 1 # 16 "./Include/pytime.h" typedef struct timeval _PyTime_timeval; # 27 "./Include/pytime.h" void _PyTime_gettimeofday(_PyTime_timeval *tp); # 41 "./Include/pytime.h" void _PyTime_Init(void); # 65 "./Include/Python.h" 2 # 1 "./Include/pymem.h" 1 # 52 "./Include/pymem.h" void * PyMem_Malloc(size_t); void * PyMem_Realloc(void *, size_t); void PyMem_Free(void *); # 66 "./Include/Python.h" 2 # 1 "./Include/object.h" 1 # 105 "./Include/object.h" typedef struct _object { Py_ssize_t ob_refcnt; struct _typeobject *ob_type; } PyObject; typedef struct { PyObject ob_base; Py_ssize_t ob_size; } PyVarObject; # 135 "./Include/object.h" typedef PyObject * (*unaryfunc)(PyObject *); typedef PyObject * (*binaryfunc)(PyObject *, PyObject *); typedef PyObject * (*ternaryfunc)(PyObject *, PyObject *, PyObject *); typedef int (*inquiry)(PyObject *); typedef Py_ssize_t (*lenfunc)(PyObject *); typedef PyObject *(*ssizeargfunc)(PyObject *, Py_ssize_t); typedef PyObject *(*ssizessizeargfunc)(PyObject *, Py_ssize_t, Py_ssize_t); typedef int(*ssizeobjargproc)(PyObject *, Py_ssize_t, PyObject *); typedef int(*ssizessizeobjargproc)(PyObject *, Py_ssize_t, Py_ssize_t, PyObject *); typedef int(*objobjargproc)(PyObject *, PyObject *, PyObject *); typedef struct bufferinfo { void *buf; PyObject *obj; Py_ssize_t len; Py_ssize_t itemsize; int readonly; int ndim; char *format; Py_ssize_t *shape; Py_ssize_t *strides; Py_ssize_t *suboffsets; Py_ssize_t smalltable[2]; void *internal; } Py_buffer; typedef int (*getbufferproc)(PyObject *, Py_buffer *, int); typedef void (*releasebufferproc)(PyObject *, Py_buffer *); # 200 "./Include/object.h" typedef int (*objobjproc)(PyObject *, PyObject *); typedef int (*visitproc)(PyObject *, void *); typedef int (*traverseproc)(PyObject *, visitproc, void *); typedef struct { binaryfunc nb_add; binaryfunc nb_subtract; binaryfunc nb_multiply; binaryfunc nb_remainder; binaryfunc nb_divmod; ternaryfunc nb_power; unaryfunc nb_negative; unaryfunc nb_positive; unaryfunc nb_absolute; inquiry nb_bool; unaryfunc nb_invert; binaryfunc nb_lshift; binaryfunc nb_rshift; binaryfunc nb_and; binaryfunc nb_xor; binaryfunc nb_or; unaryfunc nb_int; void *nb_reserved; unaryfunc nb_float; binaryfunc nb_inplace_add; binaryfunc nb_inplace_subtract; binaryfunc nb_inplace_multiply; binaryfunc nb_inplace_remainder; ternaryfunc nb_inplace_power; binaryfunc nb_inplace_lshift; binaryfunc nb_inplace_rshift; binaryfunc nb_inplace_and; binaryfunc nb_inplace_xor; binaryfunc nb_inplace_or; binaryfunc nb_floor_divide; binaryfunc nb_true_divide; binaryfunc nb_inplace_floor_divide; binaryfunc nb_inplace_true_divide; unaryfunc nb_index; } PyNumberMethods; typedef struct { lenfunc sq_length; binaryfunc sq_concat; ssizeargfunc sq_repeat; ssizeargfunc sq_item; void *was_sq_slice; ssizeobjargproc sq_ass_item; void *was_sq_ass_slice; objobjproc sq_contains; binaryfunc sq_inplace_concat; ssizeargfunc sq_inplace_repeat; } PySequenceMethods; typedef struct { lenfunc mp_length; binaryfunc mp_subscript; objobjargproc mp_ass_subscript; } PyMappingMethods; typedef struct { getbufferproc bf_getbuffer; releasebufferproc bf_releasebuffer; } PyBufferProcs; typedef void (*freefunc)(void *); typedef void (*destructor)(PyObject *); typedef int (*printfunc)(PyObject *, FILE *, int); typedef PyObject *(*getattrfunc)(PyObject *, char *); typedef PyObject *(*getattrofunc)(PyObject *, PyObject *); typedef int (*setattrfunc)(PyObject *, char *, PyObject *); typedef int (*setattrofunc)(PyObject *, PyObject *, PyObject *); typedef PyObject *(*reprfunc)(PyObject *); typedef Py_hash_t (*hashfunc)(PyObject *); typedef PyObject *(*richcmpfunc) (PyObject *, PyObject *, int); typedef PyObject *(*getiterfunc) (PyObject *); typedef PyObject *(*iternextfunc) (PyObject *); typedef PyObject *(*descrgetfunc) (PyObject *, PyObject *, PyObject *); typedef int (*descrsetfunc) (PyObject *, PyObject *, PyObject *); typedef int (*initproc)(PyObject *, PyObject *, PyObject *); typedef PyObject *(*newfunc)(struct _typeobject *, PyObject *, PyObject *); typedef PyObject *(*allocfunc)(struct _typeobject *, Py_ssize_t); typedef struct _typeobject { PyVarObject ob_base; const char *tp_name; Py_ssize_t tp_basicsize, tp_itemsize; destructor tp_dealloc; printfunc tp_print; getattrfunc tp_getattr; setattrfunc tp_setattr; void *tp_reserved; reprfunc tp_repr; PyNumberMethods *tp_as_number; PySequenceMethods *tp_as_sequence; PyMappingMethods *tp_as_mapping; hashfunc tp_hash; ternaryfunc tp_call; reprfunc tp_str; getattrofunc tp_getattro; setattrofunc tp_setattro; PyBufferProcs *tp_as_buffer; long tp_flags; const char *tp_doc; traverseproc tp_traverse; inquiry tp_clear; richcmpfunc tp_richcompare; Py_ssize_t tp_weaklistoffset; getiterfunc tp_iter; iternextfunc tp_iternext; struct PyMethodDef *tp_methods; struct PyMemberDef *tp_members; struct PyGetSetDef *tp_getset; struct _typeobject *tp_base; PyObject *tp_dict; descrgetfunc tp_descr_get; descrsetfunc tp_descr_set; Py_ssize_t tp_dictoffset; initproc tp_init; allocfunc tp_alloc; newfunc tp_new; freefunc tp_free; inquiry tp_is_gc; PyObject *tp_bases; PyObject *tp_mro; PyObject *tp_cache; PyObject *tp_subclasses; PyObject *tp_weaklist; destructor tp_del; unsigned int tp_version_tag; # 389 "./Include/object.h" } PyTypeObject; typedef struct{ int slot; void *pfunc; } PyType_Slot; typedef struct{ const char* name; int basicsize; int itemsize; int flags; PyType_Slot *slots; } PyType_Spec; PyObject* PyType_FromSpec(PyType_Spec*); typedef struct _heaptypeobject { PyTypeObject ht_type; PyNumberMethods as_number; PyMappingMethods as_mapping; PySequenceMethods as_sequence; PyBufferProcs as_buffer; PyObject *ht_name, *ht_slots; } PyHeapTypeObject; int PyType_IsSubtype(PyTypeObject *, PyTypeObject *); extern PyTypeObject PyType_Type; extern PyTypeObject PyBaseObject_Type; extern PyTypeObject PySuper_Type; long PyType_GetFlags(PyTypeObject*); int PyType_Ready(PyTypeObject *); PyObject * PyType_GenericAlloc(PyTypeObject *, Py_ssize_t); PyObject * PyType_GenericNew(PyTypeObject *, PyObject *, PyObject *); PyObject * _PyType_Lookup(PyTypeObject *, PyObject *); PyObject * _PyObject_LookupSpecial(PyObject *, char *, PyObject **); unsigned int PyType_ClearCache(void); void PyType_Modified(PyTypeObject *); int PyObject_Print(PyObject *, FILE *, int); void _Py_BreakPoint(void); void _PyObject_Dump(PyObject *); PyObject * PyObject_Repr(PyObject *); PyObject * PyObject_Str(PyObject *); PyObject * PyObject_ASCII(PyObject *); PyObject * PyObject_Bytes(PyObject *); PyObject * PyObject_RichCompare(PyObject *, PyObject *, int); int PyObject_RichCompareBool(PyObject *, PyObject *, int); PyObject * PyObject_GetAttrString(PyObject *, const char *); int PyObject_SetAttrString(PyObject *, const char *, PyObject *); int PyObject_HasAttrString(PyObject *, const char *); PyObject * PyObject_GetAttr(PyObject *, PyObject *); int PyObject_SetAttr(PyObject *, PyObject *, PyObject *); int PyObject_HasAttr(PyObject *, PyObject *); PyObject ** _PyObject_GetDictPtr(PyObject *); PyObject * PyObject_SelfIter(PyObject *); PyObject * _PyObject_NextNotImplemented(PyObject *); PyObject * PyObject_GenericGetAttr(PyObject *, PyObject *); int PyObject_GenericSetAttr(PyObject *, PyObject *, PyObject *); Py_hash_t PyObject_Hash(PyObject *); Py_hash_t PyObject_HashNotImplemented(PyObject *); int PyObject_IsTrue(PyObject *); int PyObject_Not(PyObject *); int PyCallable_Check(PyObject *); void PyObject_ClearWeakRefs(PyObject *); PyObject * _PyObject_GenericGetAttrWithDict(PyObject *, PyObject *, PyObject *); int _PyObject_GenericSetAttrWithDict(PyObject *, PyObject *, PyObject *, PyObject *); PyObject * PyObject_Dir(PyObject *); int Py_ReprEnter(PyObject *); void Py_ReprLeave(PyObject *); Py_hash_t _Py_HashDouble(double); Py_hash_t _Py_HashPointer(void*); # 773 "./Include/object.h" void Py_IncRef(PyObject *); void Py_DecRef(PyObject *); extern PyObject _Py_NoneStruct; # 792 "./Include/object.h" extern PyObject _Py_NotImplementedStruct; # 810 "./Include/object.h" extern int _Py_SwappedOp[]; # 907 "./Include/object.h" void _PyTrash_deposit_object(PyObject*); void _PyTrash_destroy_chain(void); extern int _PyTrash_delete_nesting; extern PyObject * _PyTrash_delete_later; # 68 "./Include/Python.h" 2 # 1 "./Include/objimpl.h" 1 # 97 "./Include/objimpl.h" void * PyObject_Malloc(size_t); void * PyObject_Realloc(void *, size_t); void PyObject_Free(void *); # 147 "./Include/objimpl.h" PyObject * PyObject_Init(PyObject *, PyTypeObject *); PyVarObject * PyObject_InitVar(PyVarObject *, PyTypeObject *, Py_ssize_t); PyObject * _PyObject_New(PyTypeObject *); PyVarObject * _PyObject_NewVar(PyTypeObject *, Py_ssize_t); # 232 "./Include/objimpl.h" Py_ssize_t PyGC_Collect(void); # 241 "./Include/objimpl.h" PyVarObject * _PyObject_GC_Resize(PyVarObject *, Py_ssize_t); typedef union _gc_head { struct { union _gc_head *gc_next; union _gc_head *gc_prev; Py_ssize_t gc_refs; } gc; long double dummy; } PyGC_Head; extern PyGC_Head *_PyGC_generation0; # 301 "./Include/objimpl.h" PyObject * _PyObject_GC_Malloc(size_t); PyObject * _PyObject_GC_New(PyTypeObject *); PyVarObject * _PyObject_GC_NewVar(PyTypeObject *, Py_ssize_t); void PyObject_GC_Track(void *); void PyObject_GC_UnTrack(void *); void PyObject_GC_Del(void *); # 69 "./Include/Python.h" 2 # 1 "./Include/typeslots.h" 1 # 70 "./Include/Python.h" 2 # 1 "./Include/pydebug.h" 1 extern int Py_DebugFlag; extern int Py_VerboseFlag; extern int Py_QuietFlag; extern int Py_InteractiveFlag; extern int Py_InspectFlag; extern int Py_OptimizeFlag; extern int Py_NoSiteFlag; extern int Py_BytesWarningFlag; extern int Py_UseClassExceptionsFlag; extern int Py_FrozenFlag; extern int Py_IgnoreEnvironmentFlag; extern int Py_DontWriteBytecodeFlag; extern int Py_NoUserSiteDirectory; extern int Py_UnbufferedStdioFlag; # 72 "./Include/Python.h" 2 # 1 "./Include/bytearrayobject.h" 1 # 9 "./Include/bytearrayobject.h" # 1 "/usr/include/stdarg.h" 1 3 4 # 29 "/usr/include/stdarg.h" 3 4 typedef __builtin_va_list __gnuc_va_list; # 41 "/usr/include/stdarg.h" 3 4 typedef __gnuc_va_list va_list; # 10 "./Include/bytearrayobject.h" 2 # 23 "./Include/bytearrayobject.h" typedef struct { PyVarObject ob_base; int ob_exports; Py_ssize_t ob_alloc; char *ob_bytes; } PyByteArrayObject; extern PyTypeObject PyByteArray_Type; extern PyTypeObject PyByteArrayIter_Type; PyObject * PyByteArray_FromObject(PyObject *); PyObject * PyByteArray_Concat(PyObject *, PyObject *); PyObject * PyByteArray_FromStringAndSize(const char *, Py_ssize_t); Py_ssize_t PyByteArray_Size(PyObject *); char * PyByteArray_AsString(PyObject *); int PyByteArray_Resize(PyObject *, Py_ssize_t); # 55 "./Include/bytearrayobject.h" extern char _PyByteArray_empty_string[]; # 74 "./Include/Python.h" 2 # 1 "./Include/bytesobject.h" 1 # 31 "./Include/bytesobject.h" typedef struct { PyVarObject ob_base; Py_hash_t ob_shash; char ob_sval[1]; } PyBytesObject; extern PyTypeObject PyBytes_Type; extern PyTypeObject PyBytesIter_Type; PyObject * PyBytes_FromStringAndSize(const char *, Py_ssize_t); PyObject * PyBytes_FromString(const char *); PyObject * PyBytes_FromObject(PyObject *); PyObject * PyBytes_FromFormatV(const char*, va_list) __attribute__((format(printf, 1, 0))); PyObject * PyBytes_FromFormat(const char*, ...) __attribute__((format(printf, 1, 2))); Py_ssize_t PyBytes_Size(PyObject *); char * PyBytes_AsString(PyObject *); PyObject * PyBytes_Repr(PyObject *, int); void PyBytes_Concat(PyObject **, PyObject *); void PyBytes_ConcatAndDel(PyObject **, PyObject *); int _PyBytes_Resize(PyObject **, Py_ssize_t); PyObject * _PyBytes_FormatLong(PyObject*, int, int, int, char**, int*); PyObject * PyBytes_DecodeEscape(const char *, Py_ssize_t, const char *, Py_ssize_t, const char *); # 82 "./Include/bytesobject.h" PyObject * _PyBytes_Join(PyObject *sep, PyObject *x); int PyBytes_AsStringAndSize( register PyObject *obj, register char **s, register Py_ssize_t *len ); Py_ssize_t _PyBytes_InsertThousandsGroupingLocale(char *buffer, Py_ssize_t n_buffer, char *digits, Py_ssize_t n_digits, Py_ssize_t min_width); Py_ssize_t _PyBytes_InsertThousandsGrouping(char *buffer, Py_ssize_t n_buffer, char *digits, Py_ssize_t n_digits, Py_ssize_t min_width, const char *grouping, const char *thousands_sep); # 75 "./Include/Python.h" 2 # 1 "./Include/unicodeobject.h" 1 # 58 "./Include/unicodeobject.h" # 1 "/usr/include/ctype.h" 1 3 4 # 54 "/usr/include/ctype.h" 3 4 extern const char *_ctype_; extern const short *_tolower_tab_; extern const short *_toupper_tab_; int isalnum(int); int isalpha(int); int iscntrl(int); int isdigit(int); int isgraph(int); int islower(int); int isprint(int); int ispunct(int); int isspace(int); int isupper(int); int isxdigit(int); int tolower(int); int toupper(int); int isblank(int); int isascii(int); int toascii(int); int _tolower(int); int _toupper(int); extern __inline __attribute__((__gnu_inline__)) int isalnum(int c) { return (c == -1 ? 0 : ((_ctype_ + 1)[(unsigned char)c] & (0x01|0x02|0x04))); } extern __inline __attribute__((__gnu_inline__)) int isalpha(int c) { return (c == -1 ? 0 : ((_ctype_ + 1)[(unsigned char)c] & (0x01|0x02))); } extern __inline __attribute__((__gnu_inline__)) int iscntrl(int c) { return (c == -1 ? 0 : ((_ctype_ + 1)[(unsigned char)c] & 0x20)); } extern __inline __attribute__((__gnu_inline__)) int isdigit(int c) { return (c == -1 ? 0 : ((_ctype_ + 1)[(unsigned char)c] & 0x04)); } extern __inline __attribute__((__gnu_inline__)) int isgraph(int c) { return (c == -1 ? 0 : ((_ctype_ + 1)[(unsigned char)c] & (0x10|0x01|0x02|0x04))); } extern __inline __attribute__((__gnu_inline__)) int islower(int c) { return (c == -1 ? 0 : ((_ctype_ + 1)[(unsigned char)c] & 0x02)); } extern __inline __attribute__((__gnu_inline__)) int isprint(int c) { return (c == -1 ? 0 : ((_ctype_ + 1)[(unsigned char)c] & (0x10|0x01|0x02|0x04|0x80))); } extern __inline __attribute__((__gnu_inline__)) int ispunct(int c) { return (c == -1 ? 0 : ((_ctype_ + 1)[(unsigned char)c] & 0x10)); } extern __inline __attribute__((__gnu_inline__)) int isspace(int c) { return (c == -1 ? 0 : ((_ctype_ + 1)[(unsigned char)c] & 0x08)); } extern __inline __attribute__((__gnu_inline__)) int isupper(int c) { return (c == -1 ? 0 : ((_ctype_ + 1)[(unsigned char)c] & 0x01)); } extern __inline __attribute__((__gnu_inline__)) int isxdigit(int c) { return (c == -1 ? 0 : ((_ctype_ + 1)[(unsigned char)c] & (0x04|0x40))); } extern __inline __attribute__((__gnu_inline__)) int tolower(int c) { if ((unsigned int)c > 255) return (c); return ((_tolower_tab_ + 1)[c]); } extern __inline __attribute__((__gnu_inline__)) int toupper(int c) { if ((unsigned int)c > 255) return (c); return ((_toupper_tab_ + 1)[c]); } extern __inline __attribute__((__gnu_inline__)) int isblank(int c) { return (c == ' ' || c == '\t'); } extern __inline __attribute__((__gnu_inline__)) int isascii(int c) { return ((unsigned int)c <= 0177); } extern __inline __attribute__((__gnu_inline__)) int toascii(int c) { return (c & 0177); } extern __inline __attribute__((__gnu_inline__)) int _tolower(int c) { return (c - 'A' + 'a'); } extern __inline __attribute__((__gnu_inline__)) int _toupper(int c) { return (c - 'a' + 'A'); } # 59 "./Include/unicodeobject.h" 2 # 121 "./Include/unicodeobject.h" # 1 "/usr/include/wchar.h" 1 3 4 # 84 "/usr/include/wchar.h" 3 4 typedef __mbstate_t mbstate_t; typedef __wint_t wint_t; # 101 "/usr/include/wchar.h" 3 4 wint_t btowc(int); size_t mbrlen(const char * __restrict, size_t, mbstate_t * __restrict); size_t mbrtowc(wchar_t * __restrict, const char * __restrict, size_t, mbstate_t * __restrict); int mbsinit(const mbstate_t *); size_t mbsrtowcs(wchar_t * __restrict, const char ** __restrict, size_t, mbstate_t * __restrict); size_t wcrtomb(char * __restrict, wchar_t, mbstate_t * __restrict); wchar_t *wcscat(wchar_t * __restrict, const wchar_t * __restrict); wchar_t *wcschr(const wchar_t *, wchar_t); int wcscmp(const wchar_t *, const wchar_t *); int wcscoll(const wchar_t *, const wchar_t *); wchar_t *wcscpy(wchar_t * __restrict, const wchar_t * __restrict); size_t wcscspn(const wchar_t *, const wchar_t *); size_t wcslen(const wchar_t *); wchar_t *wcsncat(wchar_t * __restrict, const wchar_t * __restrict, size_t); int wcsncmp(const wchar_t *, const wchar_t *, size_t); wchar_t *wcsncpy(wchar_t * __restrict , const wchar_t * __restrict, size_t); wchar_t *wcspbrk(const wchar_t *, const wchar_t *); wchar_t *wcsrchr(const wchar_t *, wchar_t); size_t wcsrtombs(char * __restrict, const wchar_t ** __restrict, size_t, mbstate_t * __restrict); size_t wcsspn(const wchar_t *, const wchar_t *); wchar_t *wcsstr(const wchar_t *, const wchar_t *); wchar_t *wcstok(wchar_t * __restrict, const wchar_t * __restrict, wchar_t ** __restrict); size_t wcsxfrm(wchar_t *, const wchar_t *, size_t); wchar_t *wcswcs(const wchar_t *, const wchar_t *); wchar_t *wmemchr(const wchar_t *, wchar_t, size_t); int wmemcmp(const wchar_t *, const wchar_t *, size_t); wchar_t *wmemcpy(wchar_t * __restrict, const wchar_t * __restrict, size_t); wchar_t *wmemmove(wchar_t *, const wchar_t *, size_t); wchar_t *wmemset(wchar_t *, wchar_t, size_t); size_t wcslcat(wchar_t *, const wchar_t *, size_t); size_t wcslcpy(wchar_t *, const wchar_t *, size_t); int wcswidth(const wchar_t *, size_t); int wctob(wint_t); int wcwidth(wchar_t); double wcstod(const wchar_t * __restrict, wchar_t ** __restrict); long int wcstol(const wchar_t * __restrict, wchar_t ** __restrict, int base); unsigned long int wcstoul(const wchar_t * __restrict, wchar_t ** __restrict, int base); # 157 "/usr/include/wchar.h" 3 4 float wcstof(const wchar_t * __restrict, wchar_t ** __restrict); long double wcstold(const wchar_t * __restrict, wchar_t ** __restrict); long long int wcstoll(const wchar_t * __restrict, wchar_t ** __restrict, int base); unsigned long long int wcstoull(const wchar_t * __restrict, wchar_t ** __restrict, int base); wint_t ungetwc(wint_t, FILE *); wint_t fgetwc(FILE *); wchar_t *fgetws(wchar_t * __restrict, int, FILE * __restrict); wint_t getwc(FILE *); wint_t getwchar(void); wint_t fputwc(wchar_t, FILE *); int fputws(const wchar_t * __restrict, FILE * __restrict); wint_t putwc(wchar_t, FILE *); wint_t putwchar(wchar_t); int fwide(FILE *, int); int fwprintf(FILE * __restrict, const wchar_t * __restrict, ...); int swprintf(wchar_t * __restrict, size_t, const wchar_t * __restrict, ...); int vfwprintf(FILE * __restrict, const wchar_t * __restrict, __va_list); int vswprintf(wchar_t * __restrict, size_t, const wchar_t * __restrict, __va_list); int vwprintf(const wchar_t * __restrict, __va_list); int wprintf(const wchar_t * __restrict, ...); # 122 "./Include/unicodeobject.h" 2 typedef unsigned int Py_UCS4; # 139 "./Include/unicodeobject.h" typedef unsigned short Py_UNICODE; # 390 "./Include/unicodeobject.h" typedef struct { PyObject ob_base; Py_ssize_t length; Py_UNICODE *str; Py_hash_t hash; int state; PyObject *defenc; } PyUnicodeObject; extern PyTypeObject PyUnicode_Type; extern PyTypeObject PyUnicodeIter_Type; # 451 "./Include/unicodeobject.h" PyObject* PyUnicodeUCS2_FromUnicode( const Py_UNICODE *u, Py_ssize_t size ); PyObject* PyUnicodeUCS2_FromStringAndSize( const char *u, Py_ssize_t size ); PyObject* PyUnicodeUCS2_FromString( const char *u ); Py_UNICODE * PyUnicodeUCS2_AsUnicode( PyObject *unicode ); Py_ssize_t PyUnicodeUCS2_GetSize( PyObject *unicode ); Py_UNICODE PyUnicodeUCS2_GetMax(void); # 503 "./Include/unicodeobject.h" int PyUnicodeUCS2_Resize( PyObject **unicode, Py_ssize_t length ); # 525 "./Include/unicodeobject.h" PyObject* PyUnicodeUCS2_FromEncodedObject( register PyObject *obj, const char *encoding, const char *errors ); # 544 "./Include/unicodeobject.h" PyObject* PyUnicodeUCS2_FromObject( register PyObject *obj ); PyObject * PyUnicodeUCS2_FromFormatV( const char *format, va_list vargs ); PyObject * PyUnicodeUCS2_FromFormat( const char *format, ... ); PyObject * _PyUnicode_FormatAdvanced(PyObject *obj, Py_UNICODE *format_spec, Py_ssize_t format_spec_len); void PyUnicode_InternInPlace(PyObject **); void PyUnicode_InternImmortal(PyObject **); PyObject * PyUnicode_InternFromString( const char *u ); void _Py_ReleaseInternedUnicodeStrings(void); # 586 "./Include/unicodeobject.h" PyObject* PyUnicodeUCS2_FromWideChar( register const wchar_t *w, Py_ssize_t size ); # 603 "./Include/unicodeobject.h" Py_ssize_t PyUnicodeUCS2_AsWideChar( PyObject *unicode, register wchar_t *w, Py_ssize_t size ); # 617 "./Include/unicodeobject.h" wchar_t* PyUnicodeUCS2_AsWideCharString( PyObject *unicode, Py_ssize_t *size ); # 634 "./Include/unicodeobject.h" PyObject* PyUnicodeUCS2_FromOrdinal(int ordinal); # 645 "./Include/unicodeobject.h" int PyUnicodeUCS2_ClearFreelist(void); # 683 "./Include/unicodeobject.h" PyObject * _PyUnicodeUCS2_AsDefaultEncodedString( PyObject *unicode); # 702 "./Include/unicodeobject.h" char * _PyUnicode_AsStringAndSize( PyObject *unicode, Py_ssize_t *size); # 722 "./Include/unicodeobject.h" char * _PyUnicode_AsString(PyObject *unicode); const char* PyUnicodeUCS2_GetDefaultEncoding(void); PyObject* PyUnicodeUCS2_Decode( const char *s, Py_ssize_t size, const char *encoding, const char *errors ); PyObject* PyUnicodeUCS2_AsDecodedObject( PyObject *unicode, const char *encoding, const char *errors ); PyObject* PyUnicodeUCS2_AsDecodedUnicode( PyObject *unicode, const char *encoding, const char *errors ); PyObject* PyUnicodeUCS2_Encode( const Py_UNICODE *s, Py_ssize_t size, const char *encoding, const char *errors ); PyObject* PyUnicodeUCS2_AsEncodedObject( PyObject *unicode, const char *encoding, const char *errors ); PyObject* PyUnicodeUCS2_AsEncodedString( PyObject *unicode, const char *encoding, const char *errors ); PyObject* PyUnicodeUCS2_AsEncodedUnicode( PyObject *unicode, const char *encoding, const char *errors ); PyObject* PyUnicode_BuildEncodingMap( PyObject* string ); PyObject* PyUnicode_DecodeUTF7( const char *string, Py_ssize_t length, const char *errors ); PyObject* PyUnicode_DecodeUTF7Stateful( const char *string, Py_ssize_t length, const char *errors, Py_ssize_t *consumed ); PyObject* PyUnicode_EncodeUTF7( const Py_UNICODE *data, Py_ssize_t length, int base64SetO, int base64WhiteSpace, const char *errors ); PyObject* PyUnicodeUCS2_DecodeUTF8( const char *string, Py_ssize_t length, const char *errors ); PyObject* PyUnicodeUCS2_DecodeUTF8Stateful( const char *string, Py_ssize_t length, const char *errors, Py_ssize_t *consumed ); PyObject* PyUnicodeUCS2_AsUTF8String( PyObject *unicode ); PyObject* PyUnicodeUCS2_EncodeUTF8( const Py_UNICODE *data, Py_ssize_t length, const char *errors ); # 881 "./Include/unicodeobject.h" PyObject* PyUnicodeUCS2_DecodeUTF32( const char *string, Py_ssize_t length, const char *errors, int *byteorder ); PyObject* PyUnicodeUCS2_DecodeUTF32Stateful( const char *string, Py_ssize_t length, const char *errors, int *byteorder, Py_ssize_t *consumed ); PyObject* PyUnicodeUCS2_AsUTF32String( PyObject *unicode ); # 924 "./Include/unicodeobject.h" PyObject* PyUnicodeUCS2_EncodeUTF32( const Py_UNICODE *data, Py_ssize_t length, const char *errors, int byteorder ); # 957 "./Include/unicodeobject.h" PyObject* PyUnicodeUCS2_DecodeUTF16( const char *string, Py_ssize_t length, const char *errors, int *byteorder ); PyObject* PyUnicodeUCS2_DecodeUTF16Stateful( const char *string, Py_ssize_t length, const char *errors, int *byteorder, Py_ssize_t *consumed ); PyObject* PyUnicodeUCS2_AsUTF16String( PyObject *unicode ); # 1004 "./Include/unicodeobject.h" PyObject* PyUnicodeUCS2_EncodeUTF16( const Py_UNICODE *data, Py_ssize_t length, const char *errors, int byteorder ); PyObject* PyUnicodeUCS2_DecodeUnicodeEscape( const char *string, Py_ssize_t length, const char *errors ); PyObject* PyUnicodeUCS2_AsUnicodeEscapeString( PyObject *unicode ); PyObject* PyUnicodeUCS2_EncodeUnicodeEscape( const Py_UNICODE *data, Py_ssize_t length ); PyObject* PyUnicodeUCS2_DecodeRawUnicodeEscape( const char *string, Py_ssize_t length, const char *errors ); PyObject* PyUnicodeUCS2_AsRawUnicodeEscapeString( PyObject *unicode ); PyObject* PyUnicodeUCS2_EncodeRawUnicodeEscape( const Py_UNICODE *data, Py_ssize_t length ); PyObject *_PyUnicode_DecodeUnicodeInternal( const char *string, Py_ssize_t length, const char *errors ); # 1068 "./Include/unicodeobject.h" PyObject* PyUnicodeUCS2_DecodeLatin1( const char *string, Py_ssize_t length, const char *errors ); PyObject* PyUnicodeUCS2_AsLatin1String( PyObject *unicode ); PyObject* PyUnicodeUCS2_EncodeLatin1( const Py_UNICODE *data, Py_ssize_t length, const char *errors ); # 1092 "./Include/unicodeobject.h" PyObject* PyUnicodeUCS2_DecodeASCII( const char *string, Py_ssize_t length, const char *errors ); PyObject* PyUnicodeUCS2_AsASCIIString( PyObject *unicode ); PyObject* PyUnicodeUCS2_EncodeASCII( const Py_UNICODE *data, Py_ssize_t length, const char *errors ); # 1132 "./Include/unicodeobject.h" PyObject* PyUnicodeUCS2_DecodeCharmap( const char *string, Py_ssize_t length, PyObject *mapping, const char *errors ); PyObject* PyUnicodeUCS2_AsCharmapString( PyObject *unicode, PyObject *mapping ); PyObject* PyUnicodeUCS2_EncodeCharmap( const Py_UNICODE *data, Py_ssize_t length, PyObject *mapping, const char *errors ); # 1170 "./Include/unicodeobject.h" PyObject * PyUnicodeUCS2_TranslateCharmap( const Py_UNICODE *data, Py_ssize_t length, PyObject *table, const char *errors ); # 1234 "./Include/unicodeobject.h" int PyUnicodeUCS2_EncodeDecimal( Py_UNICODE *s, Py_ssize_t length, char *output, const char *errors ); # 1249 "./Include/unicodeobject.h" PyObject* PyUnicode_TransformDecimalToASCII( Py_UNICODE *s, Py_ssize_t length ); int PyUnicodeUCS2_FSConverter(PyObject*, void*); int PyUnicodeUCS2_FSDecoder(PyObject*, void*); # 1276 "./Include/unicodeobject.h" PyObject* PyUnicodeUCS2_DecodeFSDefault( const char *s ); # 1287 "./Include/unicodeobject.h" PyObject* PyUnicodeUCS2_DecodeFSDefaultAndSize( const char *s, Py_ssize_t size ); # 1299 "./Include/unicodeobject.h" PyObject* PyUnicode_EncodeFSDefault( PyObject *unicode ); # 1311 "./Include/unicodeobject.h" PyObject* PyUnicodeUCS2_Concat( PyObject *left, PyObject *right ); void PyUnicodeUCS2_Append( PyObject **pleft, PyObject *right ); void PyUnicodeUCS2_AppendAndDel( PyObject **pleft, PyObject *right ); # 1343 "./Include/unicodeobject.h" PyObject* PyUnicodeUCS2_Split( PyObject *s, PyObject *sep, Py_ssize_t maxsplit ); PyObject* PyUnicodeUCS2_Splitlines( PyObject *s, int keepends ); PyObject* PyUnicodeUCS2_Partition( PyObject *s, PyObject *sep ); PyObject* PyUnicodeUCS2_RPartition( PyObject *s, PyObject *sep ); # 1387 "./Include/unicodeobject.h" PyObject* PyUnicodeUCS2_RSplit( PyObject *s, PyObject *sep, Py_ssize_t maxsplit ); # 1405 "./Include/unicodeobject.h" PyObject * PyUnicodeUCS2_Translate( PyObject *str, PyObject *table, const char *errors ); PyObject* PyUnicodeUCS2_Join( PyObject *separator, PyObject *seq ); Py_ssize_t PyUnicodeUCS2_Tailmatch( PyObject *str, PyObject *substr, Py_ssize_t start, Py_ssize_t end, int direction ); Py_ssize_t PyUnicodeUCS2_Find( PyObject *str, PyObject *substr, Py_ssize_t start, Py_ssize_t end, int direction ); Py_ssize_t PyUnicodeUCS2_Count( PyObject *str, PyObject *substr, Py_ssize_t start, Py_ssize_t end ); PyObject * PyUnicodeUCS2_Replace( PyObject *str, PyObject *substr, PyObject *replstr, Py_ssize_t maxcount ); int PyUnicodeUCS2_Compare( PyObject *left, PyObject *right ); int PyUnicodeUCS2_CompareWithASCIIString( PyObject *left, const char *right ); # 1491 "./Include/unicodeobject.h" PyObject * PyUnicodeUCS2_RichCompare( PyObject *left, PyObject *right, int op ); PyObject * PyUnicodeUCS2_Format( PyObject *format, PyObject *args ); int PyUnicodeUCS2_Contains( PyObject *container, PyObject *element ); int PyUnicodeUCS2_IsIdentifier(PyObject *s); PyObject * _PyUnicode_XStrip( PyUnicodeObject *self, int striptype, PyObject *sepobj ); Py_ssize_t _PyUnicode_InsertThousandsGroupingLocale(Py_UNICODE *buffer, Py_ssize_t n_buffer, Py_UNICODE *digits, Py_ssize_t n_digits, Py_ssize_t min_width); Py_ssize_t _PyUnicode_InsertThousandsGrouping(Py_UNICODE *buffer, Py_ssize_t n_buffer, Py_UNICODE *digits, Py_ssize_t n_digits, Py_ssize_t min_width, const char *grouping, const char *thousands_sep); extern const unsigned char _Py_ascii_whitespace[]; # 1567 "./Include/unicodeobject.h" int _PyUnicode_IsLowercase( Py_UCS4 ch ); int _PyUnicode_IsUppercase( Py_UCS4 ch ); int _PyUnicode_IsTitlecase( Py_UCS4 ch ); int _PyUnicode_IsXidStart( Py_UCS4 ch ); int _PyUnicode_IsXidContinue( Py_UCS4 ch ); int _PyUnicode_IsWhitespace( const Py_UCS4 ch ); int _PyUnicode_IsLinebreak( const Py_UCS4 ch ); Py_UCS4 _PyUnicode_ToLowercase( Py_UCS4 ch ); Py_UCS4 _PyUnicode_ToUppercase( Py_UCS4 ch ); Py_UCS4 _PyUnicode_ToTitlecase( Py_UCS4 ch ); int _PyUnicode_ToDecimalDigit( Py_UCS4 ch ); int _PyUnicode_ToDigit( Py_UCS4 ch ); double _PyUnicode_ToNumeric( Py_UCS4 ch ); int _PyUnicode_IsDecimalDigit( Py_UCS4 ch ); int _PyUnicode_IsDigit( Py_UCS4 ch ); int _PyUnicode_IsNumeric( Py_UCS4 ch ); int _PyUnicode_IsPrintable( Py_UCS4 ch ); int _PyUnicode_IsAlpha( Py_UCS4 ch ); size_t Py_UNICODE_strlen( const Py_UNICODE *u ); Py_UNICODE* Py_UNICODE_strcpy( Py_UNICODE *s1, const Py_UNICODE *s2); Py_UNICODE* Py_UNICODE_strcat( Py_UNICODE *s1, const Py_UNICODE *s2); Py_UNICODE* Py_UNICODE_strncpy( Py_UNICODE *s1, const Py_UNICODE *s2, size_t n); int Py_UNICODE_strcmp( const Py_UNICODE *s1, const Py_UNICODE *s2 ); int Py_UNICODE_strncmp( const Py_UNICODE *s1, const Py_UNICODE *s2, size_t n ); Py_UNICODE* Py_UNICODE_strchr( const Py_UNICODE *s, Py_UNICODE c ); Py_UNICODE* Py_UNICODE_strrchr( const Py_UNICODE *s, Py_UNICODE c ); Py_UNICODE* PyUnicode_AsUnicodeCopy( PyObject *unicode ); # 76 "./Include/Python.h" 2 # 1 "./Include/longobject.h" 1 # 10 "./Include/longobject.h" typedef struct _longobject PyLongObject; extern PyTypeObject PyLong_Type; PyObject * PyLong_FromLong(long); PyObject * PyLong_FromUnsignedLong(unsigned long); PyObject * PyLong_FromSize_t(size_t); PyObject * PyLong_FromSsize_t(Py_ssize_t); PyObject * PyLong_FromDouble(double); long PyLong_AsLong(PyObject *); long PyLong_AsLongAndOverflow(PyObject *, int *); Py_ssize_t PyLong_AsSsize_t(PyObject *); size_t PyLong_AsSize_t(PyObject *); unsigned long PyLong_AsUnsignedLong(PyObject *); unsigned long PyLong_AsUnsignedLongMask(PyObject *); PyObject * PyLong_GetInfo(void); # 54 "./Include/longobject.h" extern unsigned char _PyLong_DigitValue[256]; # 64 "./Include/longobject.h" double _PyLong_Frexp(PyLongObject *a, Py_ssize_t *e); double PyLong_AsDouble(PyObject *); PyObject * PyLong_FromVoidPtr(void *); void * PyLong_AsVoidPtr(PyObject *); PyObject * PyLong_FromLongLong(long long); PyObject * PyLong_FromUnsignedLongLong(unsigned long long); long long PyLong_AsLongLong(PyObject *); unsigned long long PyLong_AsUnsignedLongLong(PyObject *); unsigned long long PyLong_AsUnsignedLongLongMask(PyObject *); long long PyLong_AsLongLongAndOverflow(PyObject *, int *); PyObject * PyLong_FromString(char *, char **, int); PyObject * PyLong_FromUnicode(Py_UNICODE*, Py_ssize_t, int); int _PyLong_Sign(PyObject *v); # 100 "./Include/longobject.h" size_t _PyLong_NumBits(PyObject *v); PyObject * _PyLong_DivmodNear(PyObject *, PyObject *); # 123 "./Include/longobject.h" PyObject * _PyLong_FromByteArray( const unsigned char* bytes, size_t n, int little_endian, int is_signed); # 146 "./Include/longobject.h" int _PyLong_AsByteArray(PyLongObject* v, unsigned char* bytes, size_t n, int little_endian, int is_signed); PyObject * _PyLong_Format(PyObject *aa, int base); PyObject * _PyLong_FormatAdvanced(PyObject *obj, Py_UNICODE *format_spec, Py_ssize_t format_spec_len); unsigned long PyOS_strtoul(char *, char **, int); long PyOS_strtol(char *, char **, int); # 77 "./Include/Python.h" 2 # 1 "./Include/longintrepr.h" 1 # 49 "./Include/longintrepr.h" typedef uint32_t digit; typedef int32_t sdigit; typedef uint64_t twodigits; typedef int64_t stwodigits; # 89 "./Include/longintrepr.h" struct _longobject { PyVarObject ob_base; digit ob_digit[1]; }; PyLongObject * _PyLong_New(Py_ssize_t); PyObject * _PyLong_Copy(PyLongObject *src); # 78 "./Include/Python.h" 2 # 1 "./Include/boolobject.h" 1 # 10 "./Include/boolobject.h" extern PyTypeObject PyBool_Type; extern struct _longobject _Py_FalseStruct, _Py_TrueStruct; # 29 "./Include/boolobject.h" PyObject * PyBool_FromLong(long); # 79 "./Include/Python.h" 2 # 1 "./Include/floatobject.h" 1 # 15 "./Include/floatobject.h" typedef struct { PyObject ob_base; double ob_fval; } PyFloatObject; extern PyTypeObject PyFloat_Type; # 37 "./Include/floatobject.h" double PyFloat_GetMax(void); double PyFloat_GetMin(void); PyObject * PyFloat_GetInfo(void); PyObject * PyFloat_FromString(PyObject*); PyObject * PyFloat_FromDouble(double); double PyFloat_AsDouble(PyObject *); # 87 "./Include/floatobject.h" int _PyFloat_Pack4(double x, unsigned char *p, int le); int _PyFloat_Pack8(double x, unsigned char *p, int le); int _PyFloat_Repr(double x, char *p, size_t len); int _PyFloat_Digits(char *buf, double v, int *signum); void _PyFloat_DigitsInit(void); # 107 "./Include/floatobject.h" double _PyFloat_Unpack4(const unsigned char *p, int le); double _PyFloat_Unpack8(const unsigned char *p, int le); int PyFloat_ClearFreeList(void); PyObject * _PyFloat_FormatAdvanced(PyObject *obj, Py_UNICODE *format_spec, Py_ssize_t format_spec_len); # 80 "./Include/Python.h" 2 # 1 "./Include/complexobject.h" 1 # 10 "./Include/complexobject.h" typedef struct { double real; double imag; } Py_complex; # 25 "./Include/complexobject.h" Py_complex _Py_c_sum(Py_complex, Py_complex); Py_complex _Py_c_diff(Py_complex, Py_complex); Py_complex _Py_c_neg(Py_complex); Py_complex _Py_c_prod(Py_complex, Py_complex); Py_complex _Py_c_quot(Py_complex, Py_complex); Py_complex _Py_c_pow(Py_complex, Py_complex); double _Py_c_abs(Py_complex); # 41 "./Include/complexobject.h" typedef struct { PyObject ob_base; Py_complex cval; } PyComplexObject; extern PyTypeObject PyComplex_Type; PyObject * PyComplex_FromCComplex(Py_complex); PyObject * PyComplex_FromDoubles(double real, double imag); double PyComplex_RealAsDouble(PyObject *op); double PyComplex_ImagAsDouble(PyObject *op); Py_complex PyComplex_AsCComplex(PyObject *op); PyObject * _PyComplex_FormatAdvanced(PyObject *obj, Py_UNICODE *format_spec, Py_ssize_t format_spec_len); # 81 "./Include/Python.h" 2 # 1 "./Include/rangeobject.h" 1 # 18 "./Include/rangeobject.h" extern PyTypeObject PyRange_Type; extern PyTypeObject PyRangeIter_Type; extern PyTypeObject PyLongRangeIter_Type; # 82 "./Include/Python.h" 2 # 1 "./Include/memoryobject.h" 1 # 9 "./Include/memoryobject.h" extern PyTypeObject PyMemoryView_Type; # 21 "./Include/memoryobject.h" PyObject * PyMemoryView_GetContiguous(PyObject *base, int buffertype, char fort); # 56 "./Include/memoryobject.h" PyObject * PyMemoryView_FromObject(PyObject *base); PyObject * PyMemoryView_FromBuffer(Py_buffer *info); # 69 "./Include/memoryobject.h" typedef struct { PyObject ob_base; Py_buffer view; } PyMemoryViewObject; # 83 "./Include/Python.h" 2 # 1 "./Include/tupleobject.h" 1 # 25 "./Include/tupleobject.h" typedef struct { PyVarObject ob_base; PyObject *ob_item[1]; } PyTupleObject; extern PyTypeObject PyTuple_Type; extern PyTypeObject PyTupleIter_Type; PyObject * PyTuple_New(Py_ssize_t size); Py_ssize_t PyTuple_Size(PyObject *); PyObject * PyTuple_GetItem(PyObject *, Py_ssize_t); int PyTuple_SetItem(PyObject *, Py_ssize_t, PyObject *); PyObject * PyTuple_GetSlice(PyObject *, Py_ssize_t, Py_ssize_t); int _PyTuple_Resize(PyObject **, Py_ssize_t); PyObject * PyTuple_Pack(Py_ssize_t, ...); void _PyTuple_MaybeUntrack(PyObject *); # 65 "./Include/tupleobject.h" int PyTuple_ClearFreeList(void); # 84 "./Include/Python.h" 2 # 1 "./Include/listobject.h" 1 # 23 "./Include/listobject.h" typedef struct { PyVarObject ob_base; PyObject **ob_item; # 39 "./Include/listobject.h" Py_ssize_t allocated; } PyListObject; extern PyTypeObject PyList_Type; extern PyTypeObject PyListIter_Type; extern PyTypeObject PyListRevIter_Type; extern PyTypeObject PySortWrapper_Type; PyObject * PyList_New(Py_ssize_t size); Py_ssize_t PyList_Size(PyObject *); PyObject * PyList_GetItem(PyObject *, Py_ssize_t); int PyList_SetItem(PyObject *, Py_ssize_t, PyObject *); int PyList_Insert(PyObject *, Py_ssize_t, PyObject *); int PyList_Append(PyObject *, PyObject *); PyObject * PyList_GetSlice(PyObject *, Py_ssize_t, Py_ssize_t); int PyList_SetSlice(PyObject *, Py_ssize_t, Py_ssize_t, PyObject *); int PyList_Sort(PyObject *); int PyList_Reverse(PyObject *); PyObject * PyList_AsTuple(PyObject *); PyObject * _PyList_Extend(PyListObject *, PyObject *); # 85 "./Include/Python.h" 2 # 1 "./Include/dictobject.h" 1 # 51 "./Include/dictobject.h" typedef struct { Py_hash_t me_hash; PyObject *me_key; PyObject *me_value; } PyDictEntry; # 67 "./Include/dictobject.h" typedef struct _dictobject PyDictObject; struct _dictobject { PyObject ob_base; Py_ssize_t ma_fill; Py_ssize_t ma_used; Py_ssize_t ma_mask; PyDictEntry *ma_table; PyDictEntry *(*ma_lookup)(PyDictObject *mp, PyObject *key, Py_hash_t hash); PyDictEntry ma_smalltable[8]; }; extern PyTypeObject PyDict_Type; extern PyTypeObject PyDictIterKey_Type; extern PyTypeObject PyDictIterValue_Type; extern PyTypeObject PyDictIterItem_Type; extern PyTypeObject PyDictKeys_Type; extern PyTypeObject PyDictItems_Type; extern PyTypeObject PyDictValues_Type; # 109 "./Include/dictobject.h" PyObject * PyDict_New(void); PyObject * PyDict_GetItem(PyObject *mp, PyObject *key); PyObject * PyDict_GetItemWithError(PyObject *mp, PyObject *key); int PyDict_SetItem(PyObject *mp, PyObject *key, PyObject *item); int PyDict_DelItem(PyObject *mp, PyObject *key); void PyDict_Clear(PyObject *mp); int PyDict_Next( PyObject *mp, Py_ssize_t *pos, PyObject **key, PyObject **value); int _PyDict_Next( PyObject *mp, Py_ssize_t *pos, PyObject **key, PyObject **value, Py_hash_t *hash); PyObject * PyDict_Keys(PyObject *mp); PyObject * PyDict_Values(PyObject *mp); PyObject * PyDict_Items(PyObject *mp); Py_ssize_t PyDict_Size(PyObject *mp); PyObject * PyDict_Copy(PyObject *mp); int PyDict_Contains(PyObject *mp, PyObject *key); int _PyDict_Contains(PyObject *mp, PyObject *key, Py_hash_t hash); PyObject * _PyDict_NewPresized(Py_ssize_t minused); void _PyDict_MaybeUntrack(PyObject *mp); int _PyDict_HasOnlyStringKeys(PyObject *mp); int PyDict_Update(PyObject *mp, PyObject *other); int PyDict_Merge(PyObject *mp, PyObject *other, int override); int PyDict_MergeFromSeq2(PyObject *d, PyObject *seq2, int override); PyObject * PyDict_GetItemString(PyObject *dp, const char *key); int PyDict_SetItemString(PyObject *dp, const char *key, PyObject *item); int PyDict_DelItemString(PyObject *dp, const char *key); # 86 "./Include/Python.h" 2 # 1 "./Include/enumobject.h" 1 # 10 "./Include/enumobject.h" extern PyTypeObject PyEnum_Type; extern PyTypeObject PyReversed_Type; # 87 "./Include/Python.h" 2 # 1 "./Include/setobject.h" 1 # 24 "./Include/setobject.h" typedef struct { Py_hash_t hash; PyObject *key; } setentry; typedef struct _setobject PySetObject; struct _setobject { PyObject ob_base; Py_ssize_t fill; Py_ssize_t used; Py_ssize_t mask; setentry *table; setentry *(*lookup)(PySetObject *so, PyObject *key, Py_hash_t hash); setentry smalltable[8]; Py_hash_t hash; PyObject *weakreflist; }; extern PyTypeObject PySet_Type; extern PyTypeObject PyFrozenSet_Type; extern PyTypeObject PySetIter_Type; # 86 "./Include/setobject.h" PyObject * PySet_New(PyObject *); PyObject * PyFrozenSet_New(PyObject *); Py_ssize_t PySet_Size(PyObject *anyset); int PySet_Clear(PyObject *set); int PySet_Contains(PyObject *anyset, PyObject *key); int PySet_Discard(PyObject *set, PyObject *key); int PySet_Add(PyObject *set, PyObject *key); int _PySet_NextEntry(PyObject *set, Py_ssize_t *pos, PyObject **key, Py_hash_t *hash); PyObject * PySet_Pop(PyObject *set); int _PySet_Update(PyObject *set, PyObject *iterable); # 88 "./Include/Python.h" 2 # 1 "./Include/methodobject.h" 1 # 14 "./Include/methodobject.h" extern PyTypeObject PyCFunction_Type; typedef PyObject *(*PyCFunction)(PyObject *, PyObject *); typedef PyObject *(*PyCFunctionWithKeywords)(PyObject *, PyObject *, PyObject *); typedef PyObject *(*PyNoArgsFunction)(PyObject *); PyCFunction PyCFunction_GetFunction(PyObject *); PyObject * PyCFunction_GetSelf(PyObject *); int PyCFunction_GetFlags(PyObject *); # 37 "./Include/methodobject.h" PyObject * PyCFunction_Call(PyObject *, PyObject *, PyObject *); struct PyMethodDef { const char *ml_name; PyCFunction ml_meth; int ml_flags; const char *ml_doc; }; typedef struct PyMethodDef PyMethodDef; PyObject * PyCFunction_NewEx(PyMethodDef *, PyObject *, PyObject *); # 74 "./Include/methodobject.h" typedef struct { PyObject ob_base; PyMethodDef *m_ml; PyObject *m_self; PyObject *m_module; } PyCFunctionObject; int PyCFunction_ClearFreeList(void); # 89 "./Include/Python.h" 2 # 1 "./Include/moduleobject.h" 1 # 10 "./Include/moduleobject.h" extern PyTypeObject PyModule_Type; PyObject * PyModule_NewObject( PyObject *name ); PyObject * PyModule_New( const char *name ); PyObject * PyModule_GetDict(PyObject *); PyObject * PyModule_GetNameObject(PyObject *); const char * PyModule_GetName(PyObject *); const char * PyModule_GetFilename(PyObject *); PyObject * PyModule_GetFilenameObject(PyObject *); void _PyModule_Clear(PyObject *); struct PyModuleDef* PyModule_GetDef(PyObject*); void* PyModule_GetState(PyObject*); typedef struct PyModuleDef_Base { PyObject ob_base; PyObject* (*m_init)(void); Py_ssize_t m_index; PyObject* m_copy; } PyModuleDef_Base; # 46 "./Include/moduleobject.h" typedef struct PyModuleDef{ PyModuleDef_Base m_base; const char* m_name; const char* m_doc; Py_ssize_t m_size; PyMethodDef *m_methods; inquiry m_reload; traverseproc m_traverse; inquiry m_clear; freefunc m_free; }PyModuleDef; # 90 "./Include/Python.h" 2 # 1 "./Include/funcobject.h" 1 # 21 "./Include/funcobject.h" typedef struct { PyObject ob_base; PyObject *func_code; PyObject *func_globals; PyObject *func_defaults; PyObject *func_kwdefaults; PyObject *func_closure; PyObject *func_doc; PyObject *func_name; PyObject *func_dict; PyObject *func_weakreflist; PyObject *func_module; PyObject *func_annotations; } PyFunctionObject; extern PyTypeObject PyFunction_Type; PyObject * PyFunction_New(PyObject *, PyObject *); PyObject * PyFunction_GetCode(PyObject *); PyObject * PyFunction_GetGlobals(PyObject *); PyObject * PyFunction_GetModule(PyObject *); PyObject * PyFunction_GetDefaults(PyObject *); int PyFunction_SetDefaults(PyObject *, PyObject *); PyObject * PyFunction_GetKwDefaults(PyObject *); int PyFunction_SetKwDefaults(PyObject *, PyObject *); PyObject * PyFunction_GetClosure(PyObject *); int PyFunction_SetClosure(PyObject *, PyObject *); PyObject * PyFunction_GetAnnotations(PyObject *); int PyFunction_SetAnnotations(PyObject *, PyObject *); # 77 "./Include/funcobject.h" extern PyTypeObject PyClassMethod_Type; extern PyTypeObject PyStaticMethod_Type; PyObject * PyClassMethod_New(PyObject *); PyObject * PyStaticMethod_New(PyObject *); # 91 "./Include/Python.h" 2 # 1 "./Include/classobject.h" 1 # 12 "./Include/classobject.h" typedef struct { PyObject ob_base; PyObject *im_func; PyObject *im_self; PyObject *im_weakreflist; } PyMethodObject; extern PyTypeObject PyMethod_Type; PyObject * PyMethod_New(PyObject *, PyObject *); PyObject * PyMethod_Function(PyObject *); PyObject * PyMethod_Self(PyObject *); # 35 "./Include/classobject.h" int PyMethod_ClearFreeList(void); typedef struct { PyObject ob_base; PyObject *func; } PyInstanceMethodObject; extern PyTypeObject PyInstanceMethod_Type; PyObject * PyInstanceMethod_New(PyObject *); PyObject * PyInstanceMethod_Function(PyObject *); # 92 "./Include/Python.h" 2 # 1 "./Include/fileobject.h" 1 # 11 "./Include/fileobject.h" PyObject * PyFile_FromFd(int, char *, char *, int, char *, char *, char *, int); PyObject * PyFile_GetLine(PyObject *, int); int PyFile_WriteObject(PyObject *, PyObject *, int); int PyFile_WriteString(const char *, PyObject *); int PyObject_AsFileDescriptor(PyObject *); char * Py_UniversalNewlineFgets(char *, int, FILE*, PyObject *); extern const char * Py_FileSystemDefaultEncoding; extern int Py_HasFileSystemDefaultEncoding; PyObject * PyFile_NewStdPrinter(int); extern PyTypeObject PyStdPrinter_Type; # 93 "./Include/Python.h" 2 # 1 "./Include/pycapsule.h" 1 # 21 "./Include/pycapsule.h" extern PyTypeObject PyCapsule_Type; typedef void (*PyCapsule_Destructor)(PyObject *); PyObject * PyCapsule_New( void *pointer, const char *name, PyCapsule_Destructor destructor); void * PyCapsule_GetPointer(PyObject *capsule, const char *name); PyCapsule_Destructor PyCapsule_GetDestructor(PyObject *capsule); const char * PyCapsule_GetName(PyObject *capsule); void * PyCapsule_GetContext(PyObject *capsule); int PyCapsule_IsValid(PyObject *capsule, const char *name); int PyCapsule_SetPointer(PyObject *capsule, void *pointer); int PyCapsule_SetDestructor(PyObject *capsule, PyCapsule_Destructor destructor); int PyCapsule_SetName(PyObject *capsule, const char *name); int PyCapsule_SetContext(PyObject *capsule, void *context); void * PyCapsule_Import( const char *name, int no_block); # 94 "./Include/Python.h" 2 # 1 "./Include/traceback.h" 1 # 1 "./Include/pystate.h" 1 # 13 "./Include/pystate.h" struct _ts; struct _is; typedef struct _is { struct _is *next; struct _ts *tstate_head; PyObject *modules; PyObject *modules_by_index; PyObject *sysdict; PyObject *builtins; PyObject *modules_reloading; PyObject *codec_search_path; PyObject *codec_search_cache; PyObject *codec_error_registry; int codecs_initialized; int fscodec_initialized; int dlopenflags; } PyInterpreterState; struct _frame; typedef int (*Py_tracefunc)(PyObject *, struct _frame *, int, PyObject *); # 68 "./Include/pystate.h" typedef struct _ts { struct _ts *next; PyInterpreterState *interp; struct _frame *frame; int recursion_depth; char overflowed; char recursion_critical; int tracing; int use_tracing; Py_tracefunc c_profilefunc; Py_tracefunc c_tracefunc; PyObject *c_profileobj; PyObject *c_traceobj; PyObject *curexc_type; PyObject *curexc_value; PyObject *curexc_traceback; PyObject *exc_type; PyObject *exc_value; PyObject *exc_traceback; PyObject *dict; # 109 "./Include/pystate.h" int tick_counter; int gilstate_counter; PyObject *async_exc; long thread_id; } PyThreadState; PyInterpreterState * PyInterpreterState_New(void); void PyInterpreterState_Clear(PyInterpreterState *); void PyInterpreterState_Delete(PyInterpreterState *); int _PyState_AddModule(PyObject*, struct PyModuleDef*); PyObject* PyState_FindModule(struct PyModuleDef*); PyThreadState * PyThreadState_New(PyInterpreterState *); PyThreadState * _PyThreadState_Prealloc(PyInterpreterState *); void _PyThreadState_Init(PyThreadState *); void PyThreadState_Clear(PyThreadState *); void PyThreadState_Delete(PyThreadState *); void PyThreadState_DeleteCurrent(void); void _PyGILState_Reinit(void); PyThreadState * PyThreadState_Get(void); PyThreadState * PyThreadState_Swap(PyThreadState *); PyObject * PyThreadState_GetDict(void); int PyThreadState_SetAsyncExc(long, PyObject *); extern _Py_atomic_address _PyThreadState_Current; # 159 "./Include/pystate.h" typedef enum {PyGILState_LOCKED, PyGILState_UNLOCKED} PyGILState_STATE; # 186 "./Include/pystate.h" PyGILState_STATE PyGILState_Ensure(void); # 196 "./Include/pystate.h" void PyGILState_Release(PyGILState_STATE); PyThreadState * PyGILState_GetThisThreadState(void); PyObject * _PyThread_CurrentFrames(void); PyInterpreterState * PyInterpreterState_Head(void); PyInterpreterState * PyInterpreterState_Next(PyInterpreterState *); PyThreadState * PyInterpreterState_ThreadHead(PyInterpreterState *); PyThreadState * PyThreadState_Next(PyThreadState *); typedef struct _frame *(*PyThreadFrameGetter)(PyThreadState *self_); extern PyThreadFrameGetter _PyThreadState_GetFrame; # 9 "./Include/traceback.h" 2 struct _frame; typedef struct _traceback { PyObject ob_base; struct _traceback *tb_next; struct _frame *tb_frame; int tb_lasti; int tb_lineno; } PyTracebackObject; int PyTraceBack_Here(struct _frame *); int PyTraceBack_Print(PyObject *, PyObject *); int _Py_DisplaySourceLine(PyObject *, PyObject *, int, int); extern PyTypeObject PyTraceBack_Type; # 50 "./Include/traceback.h" extern void _Py_DumpTraceback( int fd, PyThreadState *tstate); # 64 "./Include/traceback.h" extern const char* _Py_DumpTracebackThreads( int fd, PyInterpreterState *interp, PyThreadState *current_thread); # 95 "./Include/Python.h" 2 # 1 "./Include/sliceobject.h" 1 # 9 "./Include/sliceobject.h" extern PyObject _Py_EllipsisObject; # 22 "./Include/sliceobject.h" typedef struct { PyObject ob_base; PyObject *start, *stop, *step; } PySliceObject; extern PyTypeObject PySlice_Type; extern PyTypeObject PyEllipsis_Type; PyObject * PySlice_New(PyObject* start, PyObject* stop, PyObject* step); PyObject * _PySlice_FromIndices(Py_ssize_t start, Py_ssize_t stop); int PySlice_GetIndices(PyObject *r, Py_ssize_t length, Py_ssize_t *start, Py_ssize_t *stop, Py_ssize_t *step); int PySlice_GetIndicesEx(PyObject *r, Py_ssize_t length, Py_ssize_t *start, Py_ssize_t *stop, Py_ssize_t *step, Py_ssize_t *slicelength); # 96 "./Include/Python.h" 2 # 1 "./Include/cellobject.h" 1 # 9 "./Include/cellobject.h" typedef struct { PyObject ob_base; PyObject *ob_ref; } PyCellObject; extern PyTypeObject PyCell_Type; PyObject * PyCell_New(PyObject *); PyObject * PyCell_Get(PyObject *); int PyCell_Set(PyObject *, PyObject *); # 97 "./Include/Python.h" 2 # 1 "./Include/iterobject.h" 1 extern PyTypeObject PySeqIter_Type; extern PyTypeObject PyCallIter_Type; extern PyTypeObject PyCmpWrapper_Type; PyObject * PySeqIter_New(PyObject *); PyObject * PyCallIter_New(PyObject *, PyObject *); # 98 "./Include/Python.h" 2 # 1 "./Include/genobject.h" 1 # 11 "./Include/genobject.h" struct _frame; typedef struct { PyObject ob_base; struct _frame *gi_frame; int gi_running; PyObject *gi_code; PyObject *gi_weakreflist; } PyGenObject; extern PyTypeObject PyGen_Type; PyObject * PyGen_New(struct _frame *); int PyGen_NeedsFinalizing(PyGenObject *); # 99 "./Include/Python.h" 2 # 1 "./Include/descrobject.h" 1 typedef PyObject *(*getter)(PyObject *, void *); typedef int (*setter)(PyObject *, PyObject *, void *); typedef struct PyGetSetDef { char *name; getter get; setter set; char *doc; void *closure; } PyGetSetDef; typedef PyObject *(*wrapperfunc)(PyObject *self, PyObject *args, void *wrapped); typedef PyObject *(*wrapperfunc_kwds)(PyObject *self, PyObject *args, void *wrapped, PyObject *kwds); struct wrapperbase { char *name; int offset; void *function; wrapperfunc wrapper; char *doc; int flags; PyObject *name_strobj; }; typedef struct { PyObject ob_base; PyTypeObject *d_type; PyObject *d_name; } PyDescrObject; typedef struct { PyDescrObject d_common; PyMethodDef *d_method; } PyMethodDescrObject; typedef struct { PyDescrObject d_common; struct PyMemberDef *d_member; } PyMemberDescrObject; typedef struct { PyDescrObject d_common; PyGetSetDef *d_getset; } PyGetSetDescrObject; typedef struct { PyDescrObject d_common; struct wrapperbase *d_base; void *d_wrapped; } PyWrapperDescrObject; extern PyTypeObject PyClassMethodDescr_Type; extern PyTypeObject PyGetSetDescr_Type; extern PyTypeObject PyMemberDescr_Type; extern PyTypeObject PyMethodDescr_Type; extern PyTypeObject PyWrapperDescr_Type; extern PyTypeObject PyDictProxy_Type; PyObject * PyDescr_NewMethod(PyTypeObject *, PyMethodDef *); PyObject * PyDescr_NewClassMethod(PyTypeObject *, PyMethodDef *); struct PyMemberDef; PyObject * PyDescr_NewMember(PyTypeObject *, struct PyMemberDef *); PyObject * PyDescr_NewGetSet(PyTypeObject *, struct PyGetSetDef *); PyObject * PyDescr_NewWrapper(PyTypeObject *, struct wrapperbase *, void *); PyObject * PyDictProxy_New(PyObject *); PyObject * PyWrapper_New(PyObject *, PyObject *); extern PyTypeObject PyProperty_Type; # 100 "./Include/Python.h" 2 # 1 "./Include/warnings.h" 1 PyObject* _PyWarnings_Init(void); int PyErr_WarnEx( PyObject *category, const char *message, Py_ssize_t stack_level); int PyErr_WarnFormat( PyObject *category, Py_ssize_t stack_level, const char *format, ...); int PyErr_WarnExplicit( PyObject *category, const char *message, const char *filename, int lineno, const char *module, PyObject *registry); # 101 "./Include/Python.h" 2 # 1 "./Include/weakrefobject.h" 1 # 10 "./Include/weakrefobject.h" typedef struct _PyWeakReference PyWeakReference; struct _PyWeakReference { PyObject ob_base; PyObject *wr_object; PyObject *wr_callback; Py_hash_t hash; PyWeakReference *wr_prev; PyWeakReference *wr_next; }; extern PyTypeObject _PyWeakref_RefType; extern PyTypeObject _PyWeakref_ProxyType; extern PyTypeObject _PyWeakref_CallableProxyType; # 61 "./Include/weakrefobject.h" PyObject * PyWeakref_NewRef(PyObject *ob, PyObject *callback); PyObject * PyWeakref_NewProxy(PyObject *ob, PyObject *callback); PyObject * PyWeakref_GetObject(PyObject *ref); Py_ssize_t _PyWeakref_GetWeakrefCount(PyWeakReference *head); void _PyWeakref_ClearRef(PyWeakReference *self); # 102 "./Include/Python.h" 2 # 1 "./Include/structseq.h" 1 # 10 "./Include/structseq.h" typedef struct PyStructSequence_Field { char *name; char *doc; } PyStructSequence_Field; typedef struct PyStructSequence_Desc { char *name; char *doc; struct PyStructSequence_Field *fields; int n_in_sequence; } PyStructSequence_Desc; extern char* PyStructSequence_UnnamedField; void PyStructSequence_InitType(PyTypeObject *type, PyStructSequence_Desc *desc); PyTypeObject* PyStructSequence_NewType(PyStructSequence_Desc *desc); PyObject * PyStructSequence_New(PyTypeObject* type); typedef PyTupleObject PyStructSequence; void PyStructSequence_SetItem(PyObject*, Py_ssize_t, PyObject*); PyObject* PyStructSequence_GetItem(PyObject*, Py_ssize_t); # 103 "./Include/Python.h" 2 # 1 "./Include/codecs.h" 1 # 26 "./Include/codecs.h" int PyCodec_Register( PyObject *search_function ); # 49 "./Include/codecs.h" PyObject * _PyCodec_Lookup( const char *encoding ); # 61 "./Include/codecs.h" int PyCodec_KnownEncoding( const char *encoding ); # 75 "./Include/codecs.h" PyObject * PyCodec_Encode( PyObject *object, const char *encoding, const char *errors ); # 91 "./Include/codecs.h" PyObject * PyCodec_Decode( PyObject *object, const char *encoding, const char *errors ); # 107 "./Include/codecs.h" PyObject * PyCodec_Encoder( const char *encoding ); PyObject * PyCodec_Decoder( const char *encoding ); PyObject * PyCodec_IncrementalEncoder( const char *encoding, const char *errors ); PyObject * PyCodec_IncrementalDecoder( const char *encoding, const char *errors ); PyObject * PyCodec_StreamReader( const char *encoding, PyObject *stream, const char *errors ); PyObject * PyCodec_StreamWriter( const char *encoding, PyObject *stream, const char *errors ); # 155 "./Include/codecs.h" int PyCodec_RegisterError(const char *name, PyObject *error); PyObject * PyCodec_LookupError(const char *name); PyObject * PyCodec_StrictErrors(PyObject *exc); PyObject * PyCodec_IgnoreErrors(PyObject *exc); PyObject * PyCodec_ReplaceErrors(PyObject *exc); PyObject * PyCodec_XMLCharRefReplaceErrors(PyObject *exc); PyObject * PyCodec_BackslashReplaceErrors(PyObject *exc); # 106 "./Include/Python.h" 2 # 1 "./Include/pyerrors.h" 1 # 15 "./Include/pyerrors.h" typedef struct { PyObject ob_base; PyObject *dict; PyObject *args; PyObject *traceback; PyObject *context; PyObject *cause; } PyBaseExceptionObject; typedef struct { PyObject ob_base; PyObject *dict; PyObject *args; PyObject *traceback; PyObject *context; PyObject *cause; PyObject *msg; PyObject *filename; PyObject *lineno; PyObject *offset; PyObject *text; PyObject *print_file_and_line; } PySyntaxErrorObject; typedef struct { PyObject ob_base; PyObject *dict; PyObject *args; PyObject *traceback; PyObject *context; PyObject *cause; PyObject *encoding; PyObject *object; Py_ssize_t start; Py_ssize_t end; PyObject *reason; } PyUnicodeErrorObject; typedef struct { PyObject ob_base; PyObject *dict; PyObject *args; PyObject *traceback; PyObject *context; PyObject *cause; PyObject *code; } PySystemExitObject; typedef struct { PyObject ob_base; PyObject *dict; PyObject *args; PyObject *traceback; PyObject *context; PyObject *cause; PyObject *myerrno; PyObject *strerror; PyObject *filename; } PyEnvironmentErrorObject; # 63 "./Include/pyerrors.h" void PyErr_SetNone(PyObject *); void PyErr_SetObject(PyObject *, PyObject *); void PyErr_SetString( PyObject *exception, const char *string ); PyObject * PyErr_Occurred(void); void PyErr_Clear(void); void PyErr_Fetch(PyObject **, PyObject **, PyObject **); void PyErr_Restore(PyObject *, PyObject *, PyObject *); # 83 "./Include/pyerrors.h" void Py_FatalError(const char *message) ; # 92 "./Include/pyerrors.h" int PyErr_GivenExceptionMatches(PyObject *, PyObject *); int PyErr_ExceptionMatches(PyObject *); void PyErr_NormalizeException(PyObject**, PyObject**, PyObject**); int PyException_SetTraceback(PyObject *, PyObject *); PyObject * PyException_GetTraceback(PyObject *); PyObject * PyException_GetCause(PyObject *); void PyException_SetCause(PyObject *, PyObject *); PyObject * PyException_GetContext(PyObject *); void PyException_SetContext(PyObject *, PyObject *); # 126 "./Include/pyerrors.h" extern PyObject * PyExc_BaseException; extern PyObject * PyExc_Exception; extern PyObject * PyExc_StopIteration; extern PyObject * PyExc_GeneratorExit; extern PyObject * PyExc_ArithmeticError; extern PyObject * PyExc_LookupError; extern PyObject * PyExc_AssertionError; extern PyObject * PyExc_AttributeError; extern PyObject * PyExc_EOFError; extern PyObject * PyExc_FloatingPointError; extern PyObject * PyExc_EnvironmentError; extern PyObject * PyExc_IOError; extern PyObject * PyExc_OSError; extern PyObject * PyExc_ImportError; extern PyObject * PyExc_IndexError; extern PyObject * PyExc_KeyError; extern PyObject * PyExc_KeyboardInterrupt; extern PyObject * PyExc_MemoryError; extern PyObject * PyExc_NameError; extern PyObject * PyExc_OverflowError; extern PyObject * PyExc_RuntimeError; extern PyObject * PyExc_NotImplementedError; extern PyObject * PyExc_SyntaxError; extern PyObject * PyExc_IndentationError; extern PyObject * PyExc_TabError; extern PyObject * PyExc_ReferenceError; extern PyObject * PyExc_SystemError; extern PyObject * PyExc_SystemExit; extern PyObject * PyExc_TypeError; extern PyObject * PyExc_UnboundLocalError; extern PyObject * PyExc_UnicodeError; extern PyObject * PyExc_UnicodeEncodeError; extern PyObject * PyExc_UnicodeDecodeError; extern PyObject * PyExc_UnicodeTranslateError; extern PyObject * PyExc_ValueError; extern PyObject * PyExc_ZeroDivisionError; extern PyObject * PyExc_BufferError; extern PyObject * PyExc_RecursionErrorInst; extern PyObject * PyExc_Warning; extern PyObject * PyExc_UserWarning; extern PyObject * PyExc_DeprecationWarning; extern PyObject * PyExc_PendingDeprecationWarning; extern PyObject * PyExc_SyntaxWarning; extern PyObject * PyExc_RuntimeWarning; extern PyObject * PyExc_FutureWarning; extern PyObject * PyExc_ImportWarning; extern PyObject * PyExc_UnicodeWarning; extern PyObject * PyExc_BytesWarning; extern PyObject * PyExc_ResourceWarning; int PyErr_BadArgument(void); PyObject * PyErr_NoMemory(void); PyObject * PyErr_SetFromErrno(PyObject *); PyObject * PyErr_SetFromErrnoWithFilenameObject( PyObject *, PyObject *); PyObject * PyErr_SetFromErrnoWithFilename( PyObject *exc, const char *filename ); PyObject * PyErr_Format( PyObject *exception, const char *format, ... ); # 236 "./Include/pyerrors.h" void PyErr_BadInternalCall(void); void _PyErr_BadInternalCall(const char *filename, int lineno); PyObject * PyErr_NewException( const char *name, PyObject *base, PyObject *dict); PyObject * PyErr_NewExceptionWithDoc( const char *name, const char *doc, PyObject *base, PyObject *dict); void PyErr_WriteUnraisable(PyObject *); int PyErr_CheckSignals(void); void PyErr_SetInterrupt(void); int PySignal_SetWakeupFd(int fd); void PyErr_SyntaxLocation( const char *filename, int lineno); void PyErr_SyntaxLocationEx( const char *filename, int lineno, int col_offset); PyObject * PyErr_ProgramText( const char *filename, int lineno); PyObject * PyUnicodeDecodeError_Create( const char *encoding, const char *object, Py_ssize_t length, Py_ssize_t start, Py_ssize_t end, const char *reason ); PyObject * PyUnicodeEncodeError_Create( const char *encoding, const Py_UNICODE *object, Py_ssize_t length, Py_ssize_t start, Py_ssize_t end, const char *reason ); PyObject * PyUnicodeTranslateError_Create( const Py_UNICODE *object, Py_ssize_t length, Py_ssize_t start, Py_ssize_t end, const char *reason ); PyObject * PyUnicodeEncodeError_GetEncoding(PyObject *); PyObject * PyUnicodeDecodeError_GetEncoding(PyObject *); PyObject * PyUnicodeEncodeError_GetObject(PyObject *); PyObject * PyUnicodeDecodeError_GetObject(PyObject *); PyObject * PyUnicodeTranslateError_GetObject(PyObject *); int PyUnicodeEncodeError_GetStart(PyObject *, Py_ssize_t *); int PyUnicodeDecodeError_GetStart(PyObject *, Py_ssize_t *); int PyUnicodeTranslateError_GetStart(PyObject *, Py_ssize_t *); int PyUnicodeEncodeError_SetStart(PyObject *, Py_ssize_t); int PyUnicodeDecodeError_SetStart(PyObject *, Py_ssize_t); int PyUnicodeTranslateError_SetStart(PyObject *, Py_ssize_t); int PyUnicodeEncodeError_GetEnd(PyObject *, Py_ssize_t *); int PyUnicodeDecodeError_GetEnd(PyObject *, Py_ssize_t *); int PyUnicodeTranslateError_GetEnd(PyObject *, Py_ssize_t *); int PyUnicodeEncodeError_SetEnd(PyObject *, Py_ssize_t); int PyUnicodeDecodeError_SetEnd(PyObject *, Py_ssize_t); int PyUnicodeTranslateError_SetEnd(PyObject *, Py_ssize_t); PyObject * PyUnicodeEncodeError_GetReason(PyObject *); PyObject * PyUnicodeDecodeError_GetReason(PyObject *); PyObject * PyUnicodeTranslateError_GetReason(PyObject *); int PyUnicodeEncodeError_SetReason( PyObject *exc, const char *reason ); int PyUnicodeDecodeError_SetReason( PyObject *exc, const char *reason ); int PyUnicodeTranslateError_SetReason( PyObject *exc, const char *reason ); # 375 "./Include/pyerrors.h" int PyOS_snprintf(char *str, size_t size, const char *format, ...) __attribute__((format(printf, 3, 4))); int PyOS_vsnprintf(char *str, size_t size, const char *format, va_list va) __attribute__((format(printf, 3, 0))); # 107 "./Include/Python.h" 2 # 1 "./Include/pyarena.h" 1 # 12 "./Include/pyarena.h" typedef struct _arena PyArena; # 36 "./Include/pyarena.h" PyArena * PyArena_New(void); void PyArena_Free(PyArena *); # 51 "./Include/pyarena.h" void * PyArena_Malloc(PyArena *, size_t size); int PyArena_AddPyObject(PyArena *, PyObject *); # 111 "./Include/Python.h" 2 # 1 "./Include/modsupport.h" 1 # 26 "./Include/modsupport.h" int _PyArg_Parse_SizeT(PyObject *, const char *, ...); int _PyArg_ParseTuple_SizeT(PyObject *, const char *, ...) ; int _PyArg_ParseTupleAndKeywords_SizeT(PyObject *, PyObject *, const char *, char **, ...); int PyArg_ValidateKeywordArguments(PyObject *); int PyArg_UnpackTuple(PyObject *, const char *, Py_ssize_t, Py_ssize_t, ...); PyObject * _Py_BuildValue_SizeT(const char *, ...); PyObject * _Py_BuildValue_SizeT(const char *, ...); int _PyArg_NoKeywords(const char *funcname, PyObject *kw); int _PyArg_VaParse_SizeT(PyObject *, const char *, va_list); int _PyArg_VaParseTupleAndKeywords_SizeT(PyObject *, PyObject *, const char *, char **, va_list); PyObject * _Py_VaBuildValue_SizeT(const char *, va_list); int PyModule_AddObject(PyObject *, const char *, PyObject *); int PyModule_AddIntConstant(PyObject *, const char *, long); int PyModule_AddStringConstant(PyObject *, const char *, const char *); # 110 "./Include/modsupport.h" PyObject * PyModule_Create2(struct PyModuleDef*, int apiver); # 122 "./Include/modsupport.h" extern char * _Py_PackageContext; # 112 "./Include/Python.h" 2 # 1 "./Include/pythonrun.h" 1 # 20 "./Include/pythonrun.h" typedef struct { int cf_flags; } PyCompilerFlags; void Py_SetProgramName(wchar_t *); wchar_t * Py_GetProgramName(void); void Py_SetPythonHome(wchar_t *); wchar_t * Py_GetPythonHome(void); void Py_Initialize(void); void Py_InitializeEx(int); void Py_Finalize(void); int Py_IsInitialized(void); PyThreadState * Py_NewInterpreter(void); void Py_EndInterpreter(PyThreadState *); int PyRun_SimpleStringFlags(const char *, PyCompilerFlags *); int PyRun_AnyFileFlags(FILE *, const char *, PyCompilerFlags *); int PyRun_AnyFileExFlags( FILE *fp, const char *filename, int closeit, PyCompilerFlags *flags); int PyRun_SimpleFileExFlags( FILE *fp, const char *filename, int closeit, PyCompilerFlags *flags); int PyRun_InteractiveOneFlags( FILE *fp, const char *filename, PyCompilerFlags *flags); int PyRun_InteractiveLoopFlags( FILE *fp, const char *filename, PyCompilerFlags *flags); struct _mod * PyParser_ASTFromString( const char *s, const char *filename, int start, PyCompilerFlags *flags, PyArena *arena); struct _mod * PyParser_ASTFromFile( FILE *fp, const char *filename, const char* enc, int start, char *ps1, char *ps2, PyCompilerFlags *flags, int *errcode, PyArena *arena); # 84 "./Include/pythonrun.h" struct _node * PyParser_SimpleParseStringFlags(const char *, int, int); struct _node * PyParser_SimpleParseFileFlags(FILE *, const char *, int, int); PyObject * PyRun_StringFlags(const char *, int, PyObject *, PyObject *, PyCompilerFlags *); PyObject * PyRun_FileExFlags( FILE *fp, const char *filename, int start, PyObject *globals, PyObject *locals, int closeit, PyCompilerFlags *flags); PyObject * Py_CompileStringExFlags( const char *str, const char *filename, int start, PyCompilerFlags *flags, int optimize); struct symtable * Py_SymtableString( const char *str, const char *filename, int start); void PyErr_Print(void); void PyErr_PrintEx(int); void PyErr_Display(PyObject *, PyObject *, PyObject *); void _Py_PyAtExit(void (*func)(void)); int Py_AtExit(void (*func)(void)); void Py_Exit(int); void _Py_RestoreSignals(void); int Py_FdIsInteractive(FILE *, const char *); int Py_Main(int argc, wchar_t **argv); # 166 "./Include/pythonrun.h" wchar_t * Py_GetProgramFullPath(void); wchar_t * Py_GetPrefix(void); wchar_t * Py_GetExecPrefix(void); wchar_t * Py_GetPath(void); void Py_SetPath(const wchar_t *); const char * Py_GetVersion(void); const char * Py_GetPlatform(void); const char * Py_GetCopyright(void); const char * Py_GetCompiler(void); const char * Py_GetBuildInfo(void); const char * _Py_hgidentifier(void); const char * _Py_hgversion(void); PyObject * _PyBuiltin_Init(void); PyObject * _PySys_Init(void); void _PyImport_Init(void); void _PyExc_Init(void); void _PyImportHooks_Init(void); int _PyFrame_Init(void); void _PyFloat_Init(void); int PyByteArray_Init(void); void _PyExc_Fini(void); void _PyImport_Fini(void); void PyMethod_Fini(void); void PyFrame_Fini(void); void PyCFunction_Fini(void); void PyDict_Fini(void); void PyTuple_Fini(void); void PyList_Fini(void); void PySet_Fini(void); void PyBytes_Fini(void); void PyByteArray_Fini(void); void PyFloat_Fini(void); void PyOS_FiniInterrupts(void); void _PyGC_Fini(void); extern PyThreadState * _Py_Finalizing; char * PyOS_Readline(FILE *, FILE *, char *); extern int (*PyOS_InputHook)(void); extern char *(*PyOS_ReadlineFunctionPointer)(FILE *, FILE *, char *); extern PyThreadState* _PyOS_ReadlineTState; # 244 "./Include/pythonrun.h" typedef void (*PyOS_sighandler_t)(int); PyOS_sighandler_t PyOS_getsig(int); PyOS_sighandler_t PyOS_setsig(int, PyOS_sighandler_t); # 113 "./Include/Python.h" 2 # 1 "./Include/ceval.h" 1 # 10 "./Include/ceval.h" PyObject * PyEval_CallObjectWithKeywords( PyObject *, PyObject *, PyObject *); PyObject * PyEval_CallFunction(PyObject *obj, const char *format, ...); PyObject * PyEval_CallMethod(PyObject *obj, const char *methodname, const char *format, ...); void PyEval_SetProfile(Py_tracefunc, PyObject *); void PyEval_SetTrace(Py_tracefunc, PyObject *); struct _frame; PyObject * PyEval_GetBuiltins(void); PyObject * PyEval_GetGlobals(void); PyObject * PyEval_GetLocals(void); struct _frame * PyEval_GetFrame(void); int PyEval_MergeCompilerFlags(PyCompilerFlags *cf); int Py_AddPendingCall(int (*func)(void *), void *arg); int Py_MakePendingCalls(void); # 70 "./Include/ceval.h" void Py_SetRecursionLimit(int); int Py_GetRecursionLimit(void); # 80 "./Include/ceval.h" int _Py_CheckRecursiveCall(char *where); extern int _Py_CheckRecursionLimit; # 108 "./Include/ceval.h" const char * PyEval_GetFuncName(PyObject *); const char * PyEval_GetFuncDesc(PyObject *); PyObject * PyEval_GetCallStats(PyObject *); PyObject * PyEval_EvalFrame(struct _frame *); PyObject * PyEval_EvalFrameEx(struct _frame *f, int exc); # 160 "./Include/ceval.h" PyThreadState * PyEval_SaveThread(void); void PyEval_RestoreThread(PyThreadState *); int PyEval_ThreadsInitialized(void); void PyEval_InitThreads(void); void _PyEval_FiniThreads(void); void PyEval_AcquireLock(void); void PyEval_ReleaseLock(void); void PyEval_AcquireThread(PyThreadState *tstate); void PyEval_ReleaseThread(PyThreadState *tstate); void PyEval_ReInitThreads(void); void _PyEval_SetSwitchInterval(unsigned long microseconds); unsigned long _PyEval_GetSwitchInterval(void); # 197 "./Include/ceval.h" int _PyEval_SliceIndex(PyObject *, Py_ssize_t *); void _PyEval_SignalAsyncExc(void); # 114 "./Include/Python.h" 2 # 1 "./Include/sysmodule.h" 1 # 10 "./Include/sysmodule.h" PyObject * PySys_GetObject(const char *); int PySys_SetObject(const char *, PyObject *); void PySys_SetArgv(int, wchar_t **); void PySys_SetArgvEx(int, wchar_t **, int); void PySys_SetPath(const wchar_t *); void PySys_WriteStdout(const char *format, ...) __attribute__((format(printf, 1, 2))); void PySys_WriteStderr(const char *format, ...) __attribute__((format(printf, 1, 2))); void PySys_FormatStdout(const char *format, ...); void PySys_FormatStderr(const char *format, ...); extern PyObject * _PySys_TraceFunc, *_PySys_ProfileFunc; void PySys_ResetWarnOptions(void); void PySys_AddWarnOption(const wchar_t *); void PySys_AddWarnOptionUnicode(PyObject *); int PySys_HasWarnOptions(void); void PySys_AddXOption(const wchar_t *); PyObject * PySys_GetXOptions(void); # 115 "./Include/Python.h" 2 # 1 "./Include/intrcheck.h" 1 int PyOS_InterruptOccurred(void); void PyOS_InitInterrupts(void); void PyOS_AfterFork(void); # 116 "./Include/Python.h" 2 # 1 "./Include/import.h" 1 # 10 "./Include/import.h" long PyImport_GetMagicNumber(void); const char * PyImport_GetMagicTag(void); PyObject * PyImport_ExecCodeModule( char *name, PyObject *co ); PyObject * PyImport_ExecCodeModuleEx( char *name, PyObject *co, char *pathname ); PyObject * PyImport_ExecCodeModuleWithPathnames( char *name, PyObject *co, char *pathname, char *cpathname ); PyObject * PyImport_ExecCodeModuleObject( PyObject *name, PyObject *co, PyObject *pathname, PyObject *cpathname ); PyObject * PyImport_GetModuleDict(void); PyObject * PyImport_AddModuleObject( PyObject *name ); PyObject * PyImport_AddModule( const char *name ); PyObject * PyImport_ImportModule( const char *name ); PyObject * PyImport_ImportModuleNoBlock( const char *name ); PyObject * PyImport_ImportModuleLevel( const char *name, PyObject *globals, PyObject *locals, PyObject *fromlist, int level ); PyObject * PyImport_ImportModuleLevelObject( PyObject *name, PyObject *globals, PyObject *locals, PyObject *fromlist, int level ); PyObject * PyImport_GetImporter(PyObject *path); PyObject * PyImport_Import(PyObject *name); PyObject * PyImport_ReloadModule(PyObject *m); void PyImport_Cleanup(void); int PyImport_ImportFrozenModuleObject( PyObject *name ); int PyImport_ImportFrozenModule( char *name ); void _PyImport_AcquireLock(void); int _PyImport_ReleaseLock(void); void _PyImport_ReInitLock(void); PyObject *_PyImport_FindBuiltin( const char *name ); PyObject *_PyImport_FindExtensionObject(PyObject *, PyObject *); int _PyImport_FixupBuiltin( PyObject *mod, char *name ); int _PyImport_FixupExtensionObject(PyObject*, PyObject *, PyObject *); struct _inittab { char *name; PyObject* (*initfunc)(void); }; extern struct _inittab * PyImport_Inittab; int PyImport_ExtendInittab(struct _inittab *newtab); extern PyTypeObject PyNullImporter_Type; int PyImport_AppendInittab( const char *name, PyObject* (*initfunc)(void) ); struct _frozen { char *name; unsigned char *code; int size; }; extern struct _frozen * PyImport_FrozenModules; # 117 "./Include/Python.h" 2 # 1 "./Include/abstract.h" 1 # 265 "./Include/abstract.h" PyObject * PyObject_Call(PyObject *callable_object, PyObject *args, PyObject *kw); PyObject * PyObject_CallObject(PyObject *callable_object, PyObject *args); # 285 "./Include/abstract.h" PyObject * _PyObject_CallFunction_SizeT(PyObject *callable_object, char *format, ...); # 298 "./Include/abstract.h" PyObject * _PyObject_CallMethod_SizeT(PyObject *o, char *method, char *format, ...); # 310 "./Include/abstract.h" PyObject * _PyObject_CallFunction_SizeT(PyObject *callable, char *format, ...); PyObject * _PyObject_CallMethod_SizeT(PyObject *o, char *name, char *format, ...); PyObject * PyObject_CallFunctionObjArgs(PyObject *callable, ...); # 328 "./Include/abstract.h" PyObject * PyObject_CallMethodObjArgs(PyObject *o, PyObject *method, ...); # 368 "./Include/abstract.h" PyObject * PyObject_Type(PyObject *o); Py_ssize_t PyObject_Size(PyObject *o); # 387 "./Include/abstract.h" Py_ssize_t PyObject_Length(PyObject *o); Py_ssize_t _PyObject_LengthHint(PyObject *o, Py_ssize_t); # 400 "./Include/abstract.h" PyObject * PyObject_GetItem(PyObject *o, PyObject *key); int PyObject_SetItem(PyObject *o, PyObject *key, PyObject *v); int PyObject_DelItemString(PyObject *o, char *key); int PyObject_DelItem(PyObject *o, PyObject *key); # 437 "./Include/abstract.h" int PyObject_AsCharBuffer(PyObject *obj, const char **buffer, Py_ssize_t *buffer_len); # 452 "./Include/abstract.h" int PyObject_CheckReadBuffer(PyObject *obj); int PyObject_AsReadBuffer(PyObject *obj, const void **buffer, Py_ssize_t *buffer_len); # 475 "./Include/abstract.h" int PyObject_AsWriteBuffer(PyObject *obj, void **buffer, Py_ssize_t *buffer_len); # 499 "./Include/abstract.h" int PyObject_GetBuffer(PyObject *obj, Py_buffer *view, int flags); # 509 "./Include/abstract.h" void * PyBuffer_GetPointer(Py_buffer *view, Py_ssize_t *indices); int PyBuffer_SizeFromFormat(const char *); int PyBuffer_ToContiguous(void *buf, Py_buffer *view, Py_ssize_t len, char fort); int PyBuffer_FromContiguous(Py_buffer *view, void *buf, Py_ssize_t len, char fort); # 545 "./Include/abstract.h" int PyObject_CopyData(PyObject *dest, PyObject *src); int PyBuffer_IsContiguous(Py_buffer *view, char fort); void PyBuffer_FillContiguousStrides(int ndims, Py_ssize_t *shape, Py_ssize_t *strides, int itemsize, char fort); int PyBuffer_FillInfo(Py_buffer *view, PyObject *o, void *buf, Py_ssize_t len, int readonly, int flags); void PyBuffer_Release(Py_buffer *view); PyObject * PyObject_Format(PyObject* obj, PyObject *format_spec); PyObject * PyObject_GetIter(PyObject *); # 599 "./Include/abstract.h" PyObject * PyIter_Next(PyObject *); int PyNumber_Check(PyObject *o); # 616 "./Include/abstract.h" PyObject * PyNumber_Add(PyObject *o1, PyObject *o2); PyObject * PyNumber_Subtract(PyObject *o1, PyObject *o2); PyObject * PyNumber_Multiply(PyObject *o1, PyObject *o2); PyObject * PyNumber_FloorDivide(PyObject *o1, PyObject *o2); PyObject * PyNumber_TrueDivide(PyObject *o1, PyObject *o2); PyObject * PyNumber_Remainder(PyObject *o1, PyObject *o2); PyObject * PyNumber_Divmod(PyObject *o1, PyObject *o2); PyObject * PyNumber_Power(PyObject *o1, PyObject *o2, PyObject *o3); PyObject * PyNumber_Negative(PyObject *o); PyObject * PyNumber_Positive(PyObject *o); PyObject * PyNumber_Absolute(PyObject *o); PyObject * PyNumber_Invert(PyObject *o); PyObject * PyNumber_Lshift(PyObject *o1, PyObject *o2); PyObject * PyNumber_Rshift(PyObject *o1, PyObject *o2); PyObject * PyNumber_And(PyObject *o1, PyObject *o2); # 734 "./Include/abstract.h" PyObject * PyNumber_Xor(PyObject *o1, PyObject *o2); PyObject * PyNumber_Or(PyObject *o1, PyObject *o2); # 754 "./Include/abstract.h" PyObject * PyNumber_Index(PyObject *o); Py_ssize_t PyNumber_AsSsize_t(PyObject *o, PyObject *exc); # 773 "./Include/abstract.h" PyObject * _PyNumber_ConvertIntegralToInt( PyObject *integral, const char* error_format); # 786 "./Include/abstract.h" PyObject * PyNumber_Long(PyObject *o); PyObject * PyNumber_Float(PyObject *o); # 804 "./Include/abstract.h" PyObject * PyNumber_InPlaceAdd(PyObject *o1, PyObject *o2); PyObject * PyNumber_InPlaceSubtract(PyObject *o1, PyObject *o2); PyObject * PyNumber_InPlaceMultiply(PyObject *o1, PyObject *o2); PyObject * PyNumber_InPlaceFloorDivide(PyObject *o1, PyObject *o2); # 838 "./Include/abstract.h" PyObject * PyNumber_InPlaceTrueDivide(PyObject *o1, PyObject *o2); # 848 "./Include/abstract.h" PyObject * PyNumber_InPlaceRemainder(PyObject *o1, PyObject *o2); PyObject * PyNumber_InPlacePower(PyObject *o1, PyObject *o2, PyObject *o3); PyObject * PyNumber_InPlaceLshift(PyObject *o1, PyObject *o2); PyObject * PyNumber_InPlaceRshift(PyObject *o1, PyObject *o2); PyObject * PyNumber_InPlaceAnd(PyObject *o1, PyObject *o2); PyObject * PyNumber_InPlaceXor(PyObject *o1, PyObject *o2); PyObject * PyNumber_InPlaceOr(PyObject *o1, PyObject *o2); PyObject * PyNumber_ToBase(PyObject *n, int base); # 916 "./Include/abstract.h" int PySequence_Check(PyObject *o); # 925 "./Include/abstract.h" Py_ssize_t PySequence_Size(PyObject *o); Py_ssize_t PySequence_Length(PyObject *o); PyObject * PySequence_Concat(PyObject *o1, PyObject *o2); PyObject * PySequence_Repeat(PyObject *o, Py_ssize_t count); PyObject * PySequence_GetItem(PyObject *o, Py_ssize_t i); PyObject * PySequence_GetSlice(PyObject *o, Py_ssize_t i1, Py_ssize_t i2); int PySequence_SetItem(PyObject *o, Py_ssize_t i, PyObject *v); int PySequence_DelItem(PyObject *o, Py_ssize_t i); int PySequence_SetSlice(PyObject *o, Py_ssize_t i1, Py_ssize_t i2, PyObject *v); int PySequence_DelSlice(PyObject *o, Py_ssize_t i1, Py_ssize_t i2); PyObject * PySequence_Tuple(PyObject *o); PyObject * PySequence_List(PyObject *o); PyObject * PySequence_Fast(PyObject *o, const char* m); # 1051 "./Include/abstract.h" Py_ssize_t PySequence_Count(PyObject *o, PyObject *value); # 1060 "./Include/abstract.h" int PySequence_Contains(PyObject *seq, PyObject *ob); # 1070 "./Include/abstract.h" Py_ssize_t _PySequence_IterSearch(PyObject *seq, PyObject *obj, int operation); # 1086 "./Include/abstract.h" int PySequence_In(PyObject *o, PyObject *value); # 1097 "./Include/abstract.h" Py_ssize_t PySequence_Index(PyObject *o, PyObject *value); # 1107 "./Include/abstract.h" PyObject * PySequence_InPlaceConcat(PyObject *o1, PyObject *o2); # 1116 "./Include/abstract.h" PyObject * PySequence_InPlaceRepeat(PyObject *o, Py_ssize_t count); # 1127 "./Include/abstract.h" int PyMapping_Check(PyObject *o); # 1136 "./Include/abstract.h" Py_ssize_t PyMapping_Size(PyObject *o); # 1146 "./Include/abstract.h" Py_ssize_t PyMapping_Length(PyObject *o); # 1170 "./Include/abstract.h" int PyMapping_HasKeyString(PyObject *o, char *key); # 1180 "./Include/abstract.h" int PyMapping_HasKey(PyObject *o, PyObject *key); # 1191 "./Include/abstract.h" PyObject * PyMapping_Keys(PyObject *o); PyObject * PyMapping_Values(PyObject *o); PyObject * PyMapping_Items(PyObject *o); # 1214 "./Include/abstract.h" PyObject * PyMapping_GetItemString(PyObject *o, char *key); int PyMapping_SetItemString(PyObject *o, char *key, PyObject *value); # 1232 "./Include/abstract.h" int PyObject_IsInstance(PyObject *object, PyObject *typeorclass); int PyObject_IsSubclass(PyObject *object, PyObject *typeorclass); int _PyObject_RealIsInstance(PyObject *inst, PyObject *cls); int _PyObject_RealIsSubclass(PyObject *derived, PyObject *cls); char *const * _PySequence_BytesToCharpArray(PyObject* self); void _Py_FreeCharPArray(char *const array[]); void _Py_add_one_to_index_F(int nd, Py_ssize_t *index, const Py_ssize_t *shape); void _Py_add_one_to_index_C(int nd, Py_ssize_t *index, const Py_ssize_t *shape); # 119 "./Include/Python.h" 2 # 1 "./Include/bltinmodule.h" 1 extern PyTypeObject PyFilter_Type; extern PyTypeObject PyMap_Type; extern PyTypeObject PyZip_Type; # 120 "./Include/Python.h" 2 # 1 "./Include/compile.h" 1 # 1 "./Include/code.h" 1 # 11 "./Include/code.h" typedef struct { PyObject ob_base; int co_argcount; int co_kwonlyargcount; int co_nlocals; int co_stacksize; int co_flags; PyObject *co_code; PyObject *co_consts; PyObject *co_names; PyObject *co_varnames; PyObject *co_freevars; PyObject *co_cellvars; unsigned char *co_cell2arg; PyObject *co_filename; PyObject *co_name; int co_firstlineno; PyObject *co_lnotab; void *co_zombieframe; PyObject *co_weakreflist; } PyCodeObject; # 73 "./Include/code.h" extern PyTypeObject PyCode_Type; PyCodeObject * PyCode_New( int, int, int, int, int, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *, int, PyObject *); PyCodeObject * PyCode_NewEmpty(const char *filename, const char *funcname, int firstlineno); int PyCode_Addr2Line(PyCodeObject *, int); typedef struct _addr_pair { int ap_lower; int ap_upper; } PyAddrPair; int _PyCode_CheckLineNumber(PyCodeObject* co, int lasti, PyAddrPair *bounds); PyObject* PyCode_Optimize(PyObject *code, PyObject* consts, PyObject *names, PyObject *lineno_obj); # 6 "./Include/compile.h" 2 struct _node; PyCodeObject * PyNode_Compile(struct _node *, const char *); typedef struct { int ff_features; int ff_lineno; } PyFutureFeatures; # 31 "./Include/compile.h" struct _mod; PyCodeObject * PyAST_CompileEx( struct _mod *mod, const char *filename, PyCompilerFlags *flags, int optimize, PyArena *arena); PyFutureFeatures * PyFuture_FromAST(struct _mod *, const char *); # 122 "./Include/Python.h" 2 # 1 "./Include/eval.h" 1 # 10 "./Include/eval.h" PyObject * PyEval_EvalCode(PyObject *, PyObject *, PyObject *); PyObject * PyEval_EvalCodeEx(PyObject *co, PyObject *globals, PyObject *locals, PyObject **args, int argc, PyObject **kwds, int kwdc, PyObject **defs, int defc, PyObject *kwdefs, PyObject *closure); PyObject * _PyEval_CallTracing(PyObject *func, PyObject *args); # 123 "./Include/Python.h" 2 # 1 "./Include/pyctype.h" 1 # 13 "./Include/pyctype.h" extern const unsigned int _Py_ctype_table[256]; # 26 "./Include/pyctype.h" extern const unsigned char _Py_ctype_tolower[256]; extern const unsigned char _Py_ctype_toupper[256]; # 125 "./Include/Python.h" 2 # 1 "./Include/pystrtod.h" 1 # 9 "./Include/pystrtod.h" double PyOS_string_to_double(const char *str, char **endptr, PyObject *overflow_exception); char * PyOS_double_to_string(double val, char format_code, int precision, int flags, int *type); double _Py_parse_inf_or_nan(const char *p, char **endptr); # 126 "./Include/Python.h" 2 # 1 "./Include/pystrcmp.h" 1 int PyOS_mystrnicmp(const char *, const char *, Py_ssize_t); int PyOS_mystricmp(const char *, const char *); # 127 "./Include/Python.h" 2 # 1 "./Include/dtoa.h" 1 double _Py_dg_strtod(const char *str, char **ptr); char * _Py_dg_dtoa(double d, int mode, int ndigits, int *decpt, int *sign, char **rve); void _Py_dg_freedtoa(char *s); # 128 "./Include/Python.h" 2 # 1 "./Include/fileutils.h" 1 wchar_t * _Py_char2wchar( const char *arg, size_t *size); char* _Py_wchar2char( const wchar_t *text, size_t *error_pos); int _Py_wstat( const wchar_t* path, struct stat *buf); int _Py_stat( PyObject *path, struct stat *statbuf); FILE * _Py_wfopen( const wchar_t *path, const wchar_t *mode); FILE* _Py_fopen( PyObject *path, const char *mode); int _Py_wreadlink( const wchar_t *path, wchar_t *buf, size_t bufsiz); wchar_t* _Py_wrealpath( const wchar_t *path, wchar_t *resolved_path, size_t resolved_path_size); wchar_t* _Py_wgetcwd( wchar_t *buf, size_t size); # 129 "./Include/Python.h" 2 PyObject* _Py_Mangle(PyObject *p, PyObject *name); # 146 "./Include/Python.h" # 1 "./Include/pyfpe.h" 1 # 129 "./Include/pyfpe.h" # 1 "/usr/include/signal.h" 1 3 4 # 39 "/usr/include/signal.h" 3 4 # 1 "/usr/include/sys/signal.h" 1 3 4 # 44 "/usr/include/sys/signal.h" 3 4 # 1 "/usr/include/machine/signal.h" 1 3 4 # 40 "/usr/include/machine/signal.h" 3 4 typedef int sig_atomic_t; # 1 "/usr/include/machine/trap.h" 1 3 4 # 44 "/usr/include/machine/signal.h" 2 3 4 # 54 "/usr/include/machine/signal.h" 3 4 struct sigcontext { long sc_rdi; long sc_rsi; long sc_rdx; long sc_rcx; long sc_r8; long sc_r9; long sc_r10; long sc_r11; long sc_r12; long sc_r13; long sc_r14; long sc_r15; long sc_rbp; long sc_rbx; long sc_rax; long sc_gs; long sc_fs; long sc_es; long sc_ds; long sc_trapno; long sc_err; long sc_rip; long sc_cs; long sc_rflags; long sc_rsp; long sc_ss; struct fxsave64 *sc_fpstate; int sc_onstack; int sc_mask; }; # 45 "/usr/include/sys/signal.h" 2 3 4 # 103 "/usr/include/sys/signal.h" 3 4 typedef unsigned int sigset_t; # 1 "/usr/include/sys/siginfo.h" 1 3 4 # 33 "/usr/include/sys/siginfo.h" 3 4 union sigval { int sival_int; void *sival_ptr; }; # 132 "/usr/include/sys/siginfo.h" 3 4 typedef struct { int si_signo; int si_code; int si_errno; union { int _pad[((128 / sizeof (int)) - 3)]; struct { pid_t _pid; union { struct { uid_t _uid; union sigval _value; } _kill; struct { clock_t _utime; int _status; clock_t _stime; } _cld; } _pdata; } _proc; struct { caddr_t _addr; int _trapno; } _fault; # 172 "/usr/include/sys/siginfo.h" 3 4 } _data; } siginfo_t; # 106 "/usr/include/sys/signal.h" 2 3 4 struct sigaction { union { void (*__sa_handler)(int); void (*__sa_sigaction)(int, siginfo_t *, void *); } __sigaction_u; sigset_t sa_mask; int sa_flags; }; # 144 "/usr/include/sys/signal.h" 3 4 typedef void (*sig_t)(int); struct sigvec { void (*sv_handler)(int); int sv_mask; int sv_flags; }; # 174 "/usr/include/sys/signal.h" 3 4 struct sigstack { void *ss_sp; int ss_onstack; }; typedef struct sigaltstack { void *ss_sp; size_t ss_size; int ss_flags; } stack_t; # 200 "/usr/include/sys/signal.h" 3 4 typedef struct sigcontext ucontext_t; void (*signal(int, void (*)(int)))(int); # 40 "/usr/include/signal.h" 2 3 4 extern const char *const sys_signame[33]; extern const char *const sys_siglist[33]; int raise(int); void (*bsd_signal(int, void (*)(int)))(int); int kill(pid_t, int); int sigaction(int, const struct sigaction *, struct sigaction *); int sigaddset(sigset_t *, int); int sigdelset(sigset_t *, int); int sigemptyset(sigset_t *); int sigfillset(sigset_t *); int sigismember(const sigset_t *, int); int sigpending(sigset_t *); int sigprocmask(int, const sigset_t *, sigset_t *); int sigsuspend(const sigset_t *); extern __inline __attribute__((__gnu_inline__)) int sigaddset(sigset_t *set, int signo) { int *__errno(void); if (signo <= 0 || signo >= 33) { *__errno() = 22; return -1; } *set |= (1U << ((signo)-1)); return (0); } extern __inline __attribute__((__gnu_inline__)) int sigdelset(sigset_t *set, int signo) { int *__errno(void); if (signo <= 0 || signo >= 33) { *__errno() = 22; return -1; } *set &= ~(1U << ((signo)-1)); return (0); } extern __inline __attribute__((__gnu_inline__)) int sigismember(const sigset_t *set, int signo) { int *__errno(void); if (signo <= 0 || signo >= 33) { *__errno() = 22; return -1; } return ((*set & (1U << ((signo)-1))) != 0); } int killpg(pid_t, int); int siginterrupt(int, int); int sigpause(int); int sigreturn(struct sigcontext *); int sigstack(const struct sigstack *, struct sigstack *); int sigaltstack(const struct sigaltstack *, struct sigaltstack *); void psignal(unsigned int, const char *); int sigblock(int); int sigsetmask(int); int sigvec(int, struct sigvec *, struct sigvec *); int sigwait(const sigset_t *, int *); # 130 "./Include/pyfpe.h" 2 # 1 "/usr/include/setjmp.h" 1 3 4 # 44 "/usr/include/setjmp.h" 3 4 # 1 "/usr/include/machine/setjmp.h" 1 3 4 # 45 "/usr/include/setjmp.h" 2 3 4 typedef long sigjmp_buf[11 + 1]; typedef long jmp_buf[11]; int setjmp(jmp_buf); void longjmp(jmp_buf, int); int sigsetjmp(sigjmp_buf, int); void siglongjmp(sigjmp_buf, int); int _setjmp(jmp_buf); void _longjmp(jmp_buf, int); void longjmperror(void); # 131 "./Include/pyfpe.h" 2 extern jmp_buf PyFPE_jbuf; extern int PyFPE_counter; extern double PyFPE_dummy(void *); # 147 "./Include/Python.h" 2 # 29 "./Modules/posixmodule.c" 2 # 39 "./Modules/posixmodule.c" static char posix__doc__[] = "This module provides access to operating system functionality that is\nstandardized by the C Standard and the POSIX standard (a thinly\ndisguised Unix interface). Refer to the library manual and\ncorresponding Unix manual entries for more information on calls."; # 63 "./Modules/posixmodule.c" # 1 "/usr/include/sys/uio.h" 1 3 4 # 38 "/usr/include/sys/uio.h" 3 4 struct iovec { void *iov_base; size_t iov_len; }; enum uio_rw { UIO_READ, UIO_WRITE }; enum uio_seg { UIO_USERSPACE, UIO_SYSSPACE }; # 73 "/usr/include/sys/uio.h" 3 4 ssize_t preadv(int, const struct iovec *, int, off_t); ssize_t pwritev(int, const struct iovec *, int, off_t); ssize_t readv(int, const struct iovec *, int); ssize_t writev(int, const struct iovec *, int); # 64 "./Modules/posixmodule.c" 2 # 75 "./Modules/posixmodule.c" # 1 "/usr/include/sys/wait.h" 1 3 4 # 104 "/usr/include/sys/wait.h" 3 4 union wait { int w_status; struct { unsigned int w_Termsig:7, w_Coredump:1, w_Retcode:8, w_Filler:16; } w_T; struct { unsigned int w_Stopval:8, w_Stopsig:8, w_Filler:16; } w_S; }; # 153 "/usr/include/sys/wait.h" 3 4 struct rusage; pid_t wait(int *); pid_t waitpid(pid_t, int *, int); pid_t wait3(int *, int, struct rusage *); pid_t wait4(pid_t, int *, int, struct rusage *); # 76 "./Modules/posixmodule.c" 2 # 1 "/usr/include/fcntl.h" 1 3 4 # 181 "/usr/include/fcntl.h" 3 4 struct flock { off_t l_start; off_t l_len; pid_t l_pid; short l_type; short l_whence; }; # 208 "/usr/include/fcntl.h" 3 4 int open(const char *, int, ...); int creat(const char *, mode_t); int fcntl(int, int, ...); int flock(int, int); # 84 "./Modules/posixmodule.c" 2 # 1 "/usr/include/grp.h" 1 3 4 # 51 "/usr/include/grp.h" 3 4 struct group { char *gr_name; char *gr_passwd; gid_t gr_gid; char **gr_mem; }; struct group *getgrgid(gid_t); struct group *getgrnam(const char *); struct group *getgrent(void); void setgrent(void); void endgrent(void); int getgrgid_r(gid_t, struct group *, char *, size_t, struct group **); int getgrnam_r(const char *, struct group *, char *, size_t, struct group **); void setgrfile(const char *); int setgroupent(int); char *group_from_gid(gid_t, int); # 88 "./Modules/posixmodule.c" 2 # 1 "/usr/include/sysexits.h" 1 3 4 # 92 "./Modules/posixmodule.c" 2 # 1 "/usr/include/langinfo.h" 1 3 4 # 13 "/usr/include/langinfo.h" 3 4 # 1 "/usr/include/nl_types.h" 1 3 4 # 78 "/usr/include/nl_types.h" 3 4 typedef struct _nl_catd { void *__data; int __size; } *nl_catd; typedef long nl_item; extern nl_catd catopen(const char *, int); extern char *catgets(nl_catd, int, int, const char *); extern int catclose(nl_catd); # 14 "/usr/include/langinfo.h" 2 3 4 # 74 "/usr/include/langinfo.h" 3 4 char *nl_langinfo(nl_item); # 100 "./Modules/posixmodule.c" 2 # 1 "/usr/include/sched.h" 1 3 4 # 54 "/usr/include/sched.h" 3 4 struct sched_param { int sched_priority; }; int sched_setparam(pid_t, const struct sched_param *); int sched_getparam(pid_t, struct sched_param *); int sched_setscheduler(pid_t, int, const struct sched_param *); int sched_getscheduler(pid_t); int sched_yield(void); int sched_get_priority_max(int); int sched_get_priority_min(int); struct timespec; int sched_rr_get_interval(pid_t, struct timespec *); # 108 "./Modules/posixmodule.c" 2 # 232 "./Modules/posixmodule.c" # 1 "/usr/include/utime.h" 1 3 4 # 46 "/usr/include/utime.h" 3 4 struct utimbuf { time_t actime; time_t modtime; }; int utime(const char *, const struct utimbuf *); # 233 "./Modules/posixmodule.c" 2 # 241 "./Modules/posixmodule.c" # 1 "/usr/include/sys/times.h" 1 3 4 # 51 "/usr/include/sys/times.h" 3 4 struct tms { clock_t tms_utime; clock_t tms_stime; clock_t tms_cutime; clock_t tms_cstime; }; clock_t times(struct tms *); # 242 "./Modules/posixmodule.c" 2 # 1 "/usr/include/sys/param.h" 1 3 4 # 66 "/usr/include/sys/param.h" 3 4 # 1 "/usr/include/sys/syslimits.h" 1 3 4 # 67 "/usr/include/sys/param.h" 2 3 4 # 94 "/usr/include/sys/param.h" 3 4 # 1 "/usr/include/machine/param.h" 1 3 4 # 95 "/usr/include/sys/param.h" 2 3 4 # 246 "./Modules/posixmodule.c" 2 # 1 "/usr/include/sys/utsname.h" 1 3 4 # 43 "/usr/include/sys/utsname.h" 3 4 struct utsname { char sysname[256]; char nodename[256]; char release[256]; char version[256]; char machine[256]; }; int uname(struct utsname *); # 250 "./Modules/posixmodule.c" 2 # 1 "/usr/include/dirent.h" 1 3 4 # 51 "/usr/include/dirent.h" 3 4 # 1 "/usr/include/sys/dirent.h" 1 3 4 # 51 "/usr/include/sys/dirent.h" 3 4 struct dirent { u_int32_t d_fileno; u_int16_t d_reclen; u_int8_t d_type; u_int8_t d_namlen; char d_name[255 + 1]; }; # 52 "/usr/include/dirent.h" 2 3 4 # 66 "/usr/include/dirent.h" 3 4 struct _telldir; typedef struct _dirdesc { int dd_fd; long dd_loc; long dd_size; char *dd_buf; int dd_len; off_t dd_seek; off_t dd_rewind; int dd_unused; struct _telldir *dd_td; void *dd_lock; } DIR; # 98 "/usr/include/dirent.h" 3 4 DIR *opendir(const char *); struct dirent *readdir(DIR *); void rewinddir(DIR *); int closedir(DIR *); int getdirentries(int, char *, int, off_t *) __attribute__ ((__bounded__(__string__,2,3))); long telldir(DIR *); void seekdir(DIR *, long); int readdir_r(DIR *, struct dirent *, struct dirent **); int scandir(const char *, struct dirent ***, int (*)(struct dirent *), int (*)(const void *, const void *)); int alphasort(const void *, const void *); # 254 "./Modules/posixmodule.c" 2 # 370 "./Modules/posixmodule.c" static int _parse_off_t(PyObject* arg, void* addr) { *((off_t*)addr) = PyLong_AsLong(arg); if (PyErr_Occurred()) return 0; return 1; } # 544 "./Modules/posixmodule.c" extern char **environ; static PyObject * convertenviron(void) { PyObject *d; char **e; d = PyDict_New(); if (d == ((void *)0)) return ((void *)0); # 600 "./Modules/posixmodule.c" if (environ == ((void *)0)) return d; for (e = environ; *e != ((void *)0); e++) { PyObject *k; PyObject *v; char *p = strchr(*e, '='); if (p == ((void *)0)) continue; k = PyBytes_FromStringAndSize(*e, (int)(p-*e)); if (k == ((void *)0)) { PyErr_Clear(); continue; } v = PyBytes_FromStringAndSize(p+1, strlen(p+1)); if (v == ((void *)0)) { PyErr_Clear(); do { if ( --((PyObject*)(k))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(k)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(k)))); } while (0); continue; } if (PyDict_GetItem(d, k) == ((void *)0)) { if (PyDict_SetItem(d, k, v) != 0) PyErr_Clear(); } do { if ( --((PyObject*)(k))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(k)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(k)))); } while (0); do { if ( --((PyObject*)(v))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(v)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(v)))); } while (0); } # 642 "./Modules/posixmodule.c" return d; } static PyObject * posix_error(void) { return PyErr_SetFromErrno(PyExc_OSError); } static PyObject * posix_error_with_filename(char* name) { return PyErr_SetFromErrnoWithFilename(PyExc_OSError, name); } static PyObject * posix_error_with_allocated_filename(PyObject* name) { PyObject *name_str, *rc; name_str = PyUnicodeUCS2_DecodeFSDefaultAndSize(PyBytes_AsString(name), (((void)0),(((PyVarObject*)(name))->ob_size))); do { if ( --((PyObject*)(name))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(name)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(name)))); } while (0); rc = PyErr_SetFromErrnoWithFilenameObject(PyExc_OSError, name_str); do { if ((name_str) == ((void *)0)) ; else do { if ( --((PyObject*)(name_str))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(name_str)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(name_str)))); } while (0); } while (0); return rc; } # 797 "./Modules/posixmodule.c" static PyObject * posix_fildes(PyObject *fdobj, int (*func)(int)) { int fd; int res; fd = PyObject_AsFileDescriptor(fdobj); if (fd < 0) return ((void *)0); if (!(1)) return posix_error(); { PyThreadState *_save; _save = PyEval_SaveThread(); res = (*func)(fd); PyEval_RestoreThread(_save); } if (res < 0) return posix_error(); ( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++); return (&_Py_NoneStruct); } static PyObject * posix_1str(PyObject *args, char *format, int (*func)(const char*)) { PyObject *opath1 = ((void *)0); char *path1; int res; if (!_PyArg_ParseTuple_SizeT(args, format, PyUnicodeUCS2_FSConverter, &opath1)) return ((void *)0); path1 = PyBytes_AsString(opath1); { PyThreadState *_save; _save = PyEval_SaveThread(); res = (*func)(path1); PyEval_RestoreThread(_save); } if (res < 0) return posix_error_with_allocated_filename(opath1); do { if ( --((PyObject*)(opath1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(opath1)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(opath1)))); } while (0); ( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++); return (&_Py_NoneStruct); } static PyObject * posix_2str(PyObject *args, char *format, int (*func)(const char *, const char *)) { PyObject *opath1 = ((void *)0), *opath2 = ((void *)0); char *path1, *path2; int res; if (!_PyArg_ParseTuple_SizeT(args, format, PyUnicodeUCS2_FSConverter, &opath1, PyUnicodeUCS2_FSConverter, &opath2)) { return ((void *)0); } path1 = PyBytes_AsString(opath1); path2 = PyBytes_AsString(opath2); { PyThreadState *_save; _save = PyEval_SaveThread(); res = (*func)(path1, path2); PyEval_RestoreThread(_save); } do { if ( --((PyObject*)(opath1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(opath1)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(opath1)))); } while (0); do { if ( --((PyObject*)(opath2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(opath2)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(opath2)))); } while (0); if (res != 0) return posix_error(); ( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++); return (&_Py_NoneStruct); } # 1461 "./Modules/posixmodule.c" static char stat_result__doc__[] = "stat_result: Result from stat or lstat.\n\nThis object may be accessed either as a tuple of\n (mode, ino, dev, nlink, uid, gid, size, atime, mtime, ctime)\nor via the attributes st_mode, st_ino, st_dev, st_nlink, st_uid, and so on.\n\nPosix/windows: If your platform supports st_blksize, st_blocks, st_rdev,\nor st_flags, they are available as attributes only.\n\nSee os.stat for more information."; # 1472 "./Modules/posixmodule.c" static PyStructSequence_Field stat_result_fields[] = { {"st_mode", "protection bits"}, {"st_ino", "inode"}, {"st_dev", "device"}, {"st_nlink", "number of hard links"}, {"st_uid", "user ID of owner"}, {"st_gid", "group ID of owner"}, {"st_size", "total size, in bytes"}, {((void *)0), "integer time of last access"}, {((void *)0), "integer time of last modification"}, {((void *)0), "integer time of last change"}, {"st_atime", "time of last access"}, {"st_mtime", "time of last modification"}, {"st_ctime", "time of last change"}, {"st_blksize", "blocksize for filesystem I/O"}, {"st_blocks", "number of blocks allocated"}, {"st_rdev", "device type (if inode device)"}, {"st_flags", "user defined flags for file"}, {"st_gen", "generation number"}, {0} }; # 1544 "./Modules/posixmodule.c" static PyStructSequence_Desc stat_result_desc = { "stat_result", stat_result__doc__, stat_result_fields, 10 }; static char statvfs_result__doc__[] = "statvfs_result: Result from statvfs or fstatvfs.\n\nThis object may be accessed either as a tuple of\n (bsize, frsize, blocks, bfree, bavail, files, ffree, favail, flag, namemax),\nor via the attributes f_bsize, f_frsize, f_blocks, f_bfree, and so on.\n\nSee os.statvfs for more information."; static PyStructSequence_Field statvfs_result_fields[] = { {"f_bsize", }, {"f_frsize", }, {"f_blocks", }, {"f_bfree", }, {"f_bavail", }, {"f_files", }, {"f_ffree", }, {"f_favail", }, {"f_flag", }, {"f_namemax",}, {0} }; static PyStructSequence_Desc statvfs_result_desc = { "statvfs_result", statvfs_result__doc__, statvfs_result_fields, 10 }; # 1607 "./Modules/posixmodule.c" static int initialized; static PyTypeObject StatResultType; static PyTypeObject StatVFSResultType; static newfunc structseq_new; static PyObject * statresult_new(PyTypeObject *type, PyObject *args, PyObject *kwds) { PyStructSequence *result; int i; result = (PyStructSequence*)structseq_new(type, args, kwds); if (!result) return ((void *)0); for (i = 7; i <= 9; i++) { if (result->ob_item[i+3] == (&_Py_NoneStruct)) { do { if ( --((PyObject*)((&_Py_NoneStruct)))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)((&_Py_NoneStruct))))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)((&_Py_NoneStruct))))); } while (0); ( ((PyObject*)(result->ob_item[i]))->ob_refcnt++); result->ob_item[i+3] = result->ob_item[i]; } } return (PyObject*)result; } static int _stat_float_times = 1; static char stat_float_times__doc__[] = "stat_float_times([newval]) -> oldval\n\nDetermine whether os.[lf]stat represents time stamps as float objects.\nIf newval is True, future calls to stat() return floats, if it is False,\nfuture calls return ints. \nIf newval is omitted, return the current setting.\n"; static PyObject* stat_float_times(PyObject* self, PyObject *args) { int newval = -1; if (!_PyArg_ParseTuple_SizeT(args, "|i:stat_float_times", &newval)) return ((void *)0); if (newval == -1) return PyBool_FromLong(_stat_float_times); _stat_float_times = newval; ( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++); return (&_Py_NoneStruct); } static void fill_time(PyObject *v, int index, time_t sec, unsigned long nsec) { PyObject *fval,*ival; ival = PyLong_FromLong((long)sec); if (!ival) return; if (_stat_float_times) { fval = PyFloat_FromDouble(sec + 1e-9*nsec); } else { fval = ival; ( ((PyObject*)(fval))->ob_refcnt++); } (((PyTupleObject *)(v))->ob_item[index] = ival); (((PyTupleObject *)(v))->ob_item[index+3] = fval); } static PyObject* _pystat_fromstructstat(struct stat *st) { unsigned long ansec, mnsec, cnsec; PyObject *v = PyStructSequence_New(&StatResultType); if (v == ((void *)0)) return ((void *)0); (((PyTupleObject *)(v))->ob_item[0] = PyLong_FromLong((long)st->st_mode)); (((PyTupleObject *)(v))->ob_item[1] = PyLong_FromLong((long)st->st_ino)); (((PyTupleObject *)(v))->ob_item[2] = PyLong_FromLongLong((long long)st->st_dev)); (((PyTupleObject *)(v))->ob_item[3] = PyLong_FromLong((long)st->st_nlink)); (((PyTupleObject *)(v))->ob_item[4] = PyLong_FromLong((long)st->st_uid)); (((PyTupleObject *)(v))->ob_item[5] = PyLong_FromLong((long)st->st_gid)); (((PyTupleObject *)(v))->ob_item[6] = PyLong_FromLong(st->st_size)); ansec = st->st_atim.tv_nsec; mnsec = st->st_mtim.tv_nsec; cnsec = st->st_ctim.tv_nsec; # 1732 "./Modules/posixmodule.c" fill_time(v, 7, st->st_atim.tv_sec, ansec); fill_time(v, 8, st->st_mtim.tv_sec, mnsec); fill_time(v, 9, st->st_ctim.tv_sec, cnsec); (((PyTupleObject *)(v))->ob_item[13] = PyLong_FromLong((long)st->st_blksize)); (((PyTupleObject *)(v))->ob_item[(13 +1)] = PyLong_FromLong((long)st->st_blocks)); (((PyTupleObject *)(v))->ob_item[((13 +1)+1)] = PyLong_FromLong((long)st->st_rdev)); (((PyTupleObject *)(v))->ob_item[((((13 +1)+1)+1)+1)] = PyLong_FromLong((long)st->st_gen)); # 1772 "./Modules/posixmodule.c" (((PyTupleObject *)(v))->ob_item[(((13 +1)+1)+1)] = PyLong_FromLong((long)st->st_flags)); if (PyErr_Occurred()) { do { if ( --((PyObject*)(v))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(v)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(v)))); } while (0); return ((void *)0); } return v; } static PyObject * posix_do_stat(PyObject *self, PyObject *args, char *format, int (*statfunc)(const char *, struct stat *), char *wformat, int (*wstatfunc)(const Py_UNICODE *, struct stat *)) { struct stat st; PyObject *opath; char *path; int res; PyObject *result; # 1821 "./Modules/posixmodule.c" if (!_PyArg_ParseTuple_SizeT(args, format, PyUnicodeUCS2_FSConverter, &opath)) return ((void *)0); path = PyBytes_AsString(opath); { PyThreadState *_save; _save = PyEval_SaveThread(); res = (*statfunc)(path, &st); PyEval_RestoreThread(_save); } if (res != 0) { result = posix_error_with_filename(path); } else result = _pystat_fromstructstat(&st); do { if ( --((PyObject*)(opath))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(opath)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(opath)))); } while (0); return result; } static char posix_access__doc__[] = "access(path, mode) -> True if granted, False otherwise\n\nUse the real uid/gid to test for access to a path. Note that most\noperations will use the effective uid/gid, therefore this routine can\nbe used in a suid/sgid environment to test if the invoking user has the\nspecified access to the path. The mode argument can be F_OK to test\nexistence, or the inclusive-OR of R_OK, W_OK, and X_OK."; static PyObject * posix_access(PyObject *self, PyObject *args) { PyObject *opath; char *path; int mode; # 1893 "./Modules/posixmodule.c" int res; if (!_PyArg_ParseTuple_SizeT(args, "O&i:access", PyUnicodeUCS2_FSConverter, &opath, &mode)) return ((void *)0); path = PyBytes_AsString(opath); { PyThreadState *_save; _save = PyEval_SaveThread(); res = access(path, mode); PyEval_RestoreThread(_save); } do { if ( --((PyObject*)(opath))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(opath)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(opath)))); } while (0); return PyBool_FromLong(res == 0); } # 1920 "./Modules/posixmodule.c" static char posix_ttyname__doc__[] = "ttyname(fd) -> string\n\nReturn the name of the terminal device connected to 'fd'."; static PyObject * posix_ttyname(PyObject *self, PyObject *args) { int id; char *ret; if (!_PyArg_ParseTuple_SizeT(args, "i:ttyname", &id)) return ((void *)0); # 1942 "./Modules/posixmodule.c" ret = ttyname(id); if (ret == ((void *)0)) return posix_error(); return PyUnicodeUCS2_DecodeFSDefault(ret); } static char posix_ctermid__doc__[] = "ctermid() -> string\n\nReturn the name of the controlling terminal for this process."; static PyObject * posix_ctermid(PyObject *self, PyObject *noargs) { char *ret; char buffer[1024]; ret = ctermid(buffer); if (ret == ((void *)0)) return posix_error(); return PyUnicodeUCS2_DecodeFSDefault(buffer); } static char posix_chdir__doc__[] = "chdir(path)\n\nChange the current working directory to the specified path."; static PyObject * posix_chdir(PyObject *self, PyObject *args) { return posix_1str(args, "O&:chdir", chdir); } static char posix_fchdir__doc__[] = "fchdir(fildes)\n\nChange to the directory of the given file descriptor. fildes must be\nopened on a directory, not a file."; static PyObject * posix_fchdir(PyObject *self, PyObject *fdobj) { return posix_fildes(fdobj, fchdir); } static char posix_chmod__doc__[] = "chmod(path, mode)\n\nChange the access permissions of a file."; static PyObject * posix_chmod(PyObject *self, PyObject *args) { PyObject *opath = ((void *)0); char *path = ((void *)0); int i; int res; # 2066 "./Modules/posixmodule.c" if (!_PyArg_ParseTuple_SizeT(args, "O&i:chmod", PyUnicodeUCS2_FSConverter, &opath, &i)) return ((void *)0); path = PyBytes_AsString(opath); { PyThreadState *_save; _save = PyEval_SaveThread(); res = chmod(path, i); PyEval_RestoreThread(_save); } if (res < 0) return posix_error_with_allocated_filename(opath); do { if ( --((PyObject*)(opath))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(opath)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(opath)))); } while (0); ( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++); return (&_Py_NoneStruct); } static char posix_fchmod__doc__[] = "fchmod(fd, mode)\n\nChange the access permissions of the file given by file\ndescriptor fd."; static PyObject * posix_fchmod(PyObject *self, PyObject *args) { int fd, mode, res; if (!_PyArg_ParseTuple_SizeT(args, "ii:fchmod", &fd, &mode)) return ((void *)0); { PyThreadState *_save; _save = PyEval_SaveThread(); res = fchmod(fd, mode); PyEval_RestoreThread(_save); } if (res < 0) return posix_error(); return ( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++), (&_Py_NoneStruct); } # 2131 "./Modules/posixmodule.c" static char posix_chflags__doc__[] = "chflags(path, flags)\n\nSet file flags."; static PyObject * posix_chflags(PyObject *self, PyObject *args) { PyObject *opath; char *path; unsigned long flags; int res; if (!_PyArg_ParseTuple_SizeT(args, "O&k:chflags", PyUnicodeUCS2_FSConverter, &opath, &flags)) return ((void *)0); path = PyBytes_AsString(opath); { PyThreadState *_save; _save = PyEval_SaveThread(); res = chflags(path, flags); PyEval_RestoreThread(_save); } if (res < 0) return posix_error_with_allocated_filename(opath); do { if ( --((PyObject*)(opath))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(opath)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(opath)))); } while (0); ( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++); return (&_Py_NoneStruct); } # 2186 "./Modules/posixmodule.c" static char posix_chroot__doc__[] = "chroot(path)\n\nChange root directory to path."; static PyObject * posix_chroot(PyObject *self, PyObject *args) { return posix_1str(args, "O&:chroot", chroot); } static char posix_fsync__doc__[] = "fsync(fildes)\n\nforce write of file with filedescriptor to disk."; static PyObject * posix_fsync(PyObject *self, PyObject *fdobj) { return posix_fildes(fdobj, fsync); } static char posix_sync__doc__[] = "sync()\n\nForce write of everything to disk."; static PyObject * posix_sync(PyObject *self, PyObject *noargs) { { PyThreadState *_save; _save = PyEval_SaveThread(); sync(); PyEval_RestoreThread(_save); } return ( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++), (&_Py_NoneStruct); } # 2244 "./Modules/posixmodule.c" static char posix_chown__doc__[] = "chown(path, uid, gid)\n\nChange the owner and group id of path to the numeric uid and gid."; static PyObject * posix_chown(PyObject *self, PyObject *args) { PyObject *opath; char *path; long uid, gid; int res; if (!_PyArg_ParseTuple_SizeT(args, "O&ll:chown", PyUnicodeUCS2_FSConverter, &opath, &uid, &gid)) return ((void *)0); path = PyBytes_AsString(opath); { PyThreadState *_save; _save = PyEval_SaveThread(); res = chown(path, (uid_t) uid, (gid_t) gid); PyEval_RestoreThread(_save); } if (res < 0) return posix_error_with_allocated_filename(opath); do { if ( --((PyObject*)(opath))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(opath)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(opath)))); } while (0); ( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++); return (&_Py_NoneStruct); } static char posix_fchown__doc__[] = "fchown(fd, uid, gid)\n\nChange the owner and group id of the file given by file descriptor\nfd to the numeric uid and gid."; static PyObject * posix_fchown(PyObject *self, PyObject *args) { int fd; long uid, gid; int res; if (!_PyArg_ParseTuple_SizeT(args, "ill:fchown", &fd, &uid, &gid)) return ((void *)0); { PyThreadState *_save; _save = PyEval_SaveThread(); res = fchown(fd, (uid_t) uid, (gid_t) gid); PyEval_RestoreThread(_save); } if (res < 0) return posix_error(); return ( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++), (&_Py_NoneStruct); } static char posix_lchown__doc__[] = "lchown(path, uid, gid)\n\nChange the owner and group id of path to the numeric uid and gid.\nThis function will not follow symbolic links."; static PyObject * posix_lchown(PyObject *self, PyObject *args) { PyObject *opath; char *path; long uid, gid; int res; if (!_PyArg_ParseTuple_SizeT(args, "O&ll:lchown", PyUnicodeUCS2_FSConverter, &opath, &uid, &gid)) return ((void *)0); path = PyBytes_AsString(opath); { PyThreadState *_save; _save = PyEval_SaveThread(); res = lchown(path, (uid_t) uid, (gid_t) gid); PyEval_RestoreThread(_save); } if (res < 0) return posix_error_with_allocated_filename(opath); do { if ( --((PyObject*)(opath))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(opath)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(opath)))); } while (0); ( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++); return (&_Py_NoneStruct); } static PyObject * posix_getcwd(int use_bytes) { char buf[1026]; char *res; # 2362 "./Modules/posixmodule.c" { PyThreadState *_save; _save = PyEval_SaveThread(); res = getcwd(buf, sizeof buf); PyEval_RestoreThread(_save); } if (res == ((void *)0)) return posix_error(); if (use_bytes) return PyBytes_FromStringAndSize(buf, strlen(buf)); return PyUnicodeUCS2_DecodeFSDefault(buf); } static char posix_getcwd__doc__[] = "getcwd() -> path\n\nReturn a unicode string representing the current working directory."; static PyObject * posix_getcwd_unicode(PyObject *self) { return posix_getcwd(0); } static char posix_getcwdb__doc__[] = "getcwdb() -> path\n\nReturn a bytes string representing the current working directory."; static PyObject * posix_getcwd_bytes(PyObject *self) { return posix_getcwd(1); } static char posix_link__doc__[] = "link(src, dst)\n\nCreate a hard link to a file."; static PyObject * posix_link(PyObject *self, PyObject *args) { return posix_2str(args, "O&O&:link", link); } # 2459 "./Modules/posixmodule.c" static char posix_listdir__doc__[] = "listdir([path]) -> list_of_strings\n\nReturn a list containing the names of the entries in the directory.\n\n path: path of directory to list (default: '.')\n\nThe list is in arbitrary order. It does not include the special\nentries '.' and '..' even if they are present in the directory."; # 2468 "./Modules/posixmodule.c" static PyObject * posix_listdir(PyObject *self, PyObject *args) { # 2721 "./Modules/posixmodule.c" PyObject *oname; char *name; PyObject *d, *v; DIR *dirp; struct dirent *ep; int arg_is_unicode = 1; (*__errno()) = 0; if (!_PyArg_ParseTuple_SizeT(args, "|U:listdir", &v)) { arg_is_unicode = 0; PyErr_Clear(); } oname = ((void *)0); if (!_PyArg_ParseTuple_SizeT(args, "|O&:listdir", PyUnicodeUCS2_FSConverter, &oname)) return ((void *)0); if (oname == ((void *)0)) { oname = PyBytes_FromString("."); } name = PyBytes_AsString(oname); { PyThreadState *_save; _save = PyEval_SaveThread(); dirp = opendir(name); PyEval_RestoreThread(_save); } if (dirp == ((void *)0)) { return posix_error_with_allocated_filename(oname); } if ((d = PyList_New(0)) == ((void *)0)) { { PyThreadState *_save; _save = PyEval_SaveThread(); closedir(dirp); PyEval_RestoreThread(_save); } do { if ( --((PyObject*)(oname))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(oname)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(oname)))); } while (0); return ((void *)0); } for (;;) { (*__errno()) = 0; { PyThreadState *_save; _save = PyEval_SaveThread(); ep = readdir(dirp); PyEval_RestoreThread(_save); } if (ep == ((void *)0)) { if ((*__errno()) == 0) { break; } else { { PyThreadState *_save; _save = PyEval_SaveThread(); closedir(dirp); PyEval_RestoreThread(_save); } do { if ( --((PyObject*)(d))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(d)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(d)))); } while (0); return posix_error_with_allocated_filename(oname); } } if (ep->d_name[0] == '.' && (strlen((ep)->d_name) == 1 || (ep->d_name[1] == '.' && strlen((ep)->d_name) == 2))) continue; if (arg_is_unicode) v = PyUnicodeUCS2_DecodeFSDefaultAndSize(ep->d_name, strlen((ep)->d_name)); else v = PyBytes_FromStringAndSize(ep->d_name, strlen((ep)->d_name)); if (v == ((void *)0)) { do { if (d) { PyObject *_py_tmp = (PyObject *)(d); (d) = ((void *)0); do { if ( --((PyObject*)(_py_tmp))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(_py_tmp)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(_py_tmp)))); } while (0); } } while (0); break; } if (PyList_Append(d, v) != 0) { do { if ( --((PyObject*)(v))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(v)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(v)))); } while (0); do { if (d) { PyObject *_py_tmp = (PyObject *)(d); (d) = ((void *)0); do { if ( --((PyObject*)(_py_tmp))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(_py_tmp)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(_py_tmp)))); } while (0); } } while (0); break; } do { if ( --((PyObject*)(v))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(v)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(v)))); } while (0); } { PyThreadState *_save; _save = PyEval_SaveThread(); closedir(dirp); PyEval_RestoreThread(_save); } do { if ( --((PyObject*)(oname))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(oname)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(oname)))); } while (0); return d; } static char posix_fdlistdir__doc__[] = "fdlistdir(fd) -> list_of_strings\n\nLike listdir(), but uses a file descriptor instead.\nAfter succesful execution of this function, fd will be closed."; static PyObject * posix_fdlistdir(PyObject *self, PyObject *args) { PyObject *d, *v; DIR *dirp; struct dirent *ep; int fd; (*__errno()) = 0; if (!_PyArg_ParseTuple_SizeT(args, "i:fdlistdir", &fd)) return ((void *)0); { PyThreadState *_save; _save = PyEval_SaveThread(); dirp = fdopendir(fd); PyEval_RestoreThread(_save); } if (dirp == ((void *)0)) { close(fd); return posix_error(); } if ((d = PyList_New(0)) == ((void *)0)) { { PyThreadState *_save; _save = PyEval_SaveThread(); closedir(dirp); PyEval_RestoreThread(_save); } return ((void *)0); } for (;;) { (*__errno()) = 0; { PyThreadState *_save; _save = PyEval_SaveThread(); ep = readdir(dirp); PyEval_RestoreThread(_save); } if (ep == ((void *)0)) { if ((*__errno()) == 0) { break; } else { { PyThreadState *_save; _save = PyEval_SaveThread(); closedir(dirp); PyEval_RestoreThread(_save); } do { if ( --((PyObject*)(d))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(d)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(d)))); } while (0); return posix_error(); } } if (ep->d_name[0] == '.' && (strlen((ep)->d_name) == 1 || (ep->d_name[1] == '.' && strlen((ep)->d_name) == 2))) continue; v = PyUnicodeUCS2_DecodeFSDefaultAndSize(ep->d_name, strlen((ep)->d_name)); if (v == ((void *)0)) { do { if (d) { PyObject *_py_tmp = (PyObject *)(d); (d) = ((void *)0); do { if ( --((PyObject*)(_py_tmp))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(_py_tmp)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(_py_tmp)))); } while (0); } } while (0); break; } if (PyList_Append(d, v) != 0) { do { if ( --((PyObject*)(v))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(v)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(v)))); } while (0); do { if (d) { PyObject *_py_tmp = (PyObject *)(d); (d) = ((void *)0); do { if ( --((PyObject*)(_py_tmp))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(_py_tmp)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(_py_tmp)))); } while (0); } } while (0); break; } do { if ( --((PyObject*)(v))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(v)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(v)))); } while (0); } { PyThreadState *_save; _save = PyEval_SaveThread(); closedir(dirp); PyEval_RestoreThread(_save); } return d; } # 3057 "./Modules/posixmodule.c" static char posix_mkdir__doc__[] = "mkdir(path [, mode=0777])\n\nCreate a directory."; static PyObject * posix_mkdir(PyObject *self, PyObject *args) { int res; PyObject *opath; char *path; int mode = 0777; # 3104 "./Modules/posixmodule.c" if (!_PyArg_ParseTuple_SizeT(args, "O&|i:mkdir", PyUnicodeUCS2_FSConverter, &opath, &mode)) return ((void *)0); path = PyBytes_AsString(opath); { PyThreadState *_save; _save = PyEval_SaveThread(); res = mkdir(path, mode); PyEval_RestoreThread(_save); } if (res < 0) return posix_error_with_allocated_filename(opath); do { if ( --((PyObject*)(opath))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(opath)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(opath)))); } while (0); ( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++); return (&_Py_NoneStruct); } # 1 "/usr/include/sys/resource.h" 1 3 4 # 58 "/usr/include/sys/resource.h" 3 4 struct rusage { struct timeval ru_utime; struct timeval ru_stime; long ru_maxrss; long ru_ixrss; long ru_idrss; long ru_isrss; long ru_minflt; long ru_majflt; long ru_nswap; long ru_inblock; long ru_oublock; long ru_msgsnd; long ru_msgrcv; long ru_nsignals; long ru_nvcsw; long ru_nivcsw; }; # 98 "/usr/include/sys/resource.h" 3 4 struct orlimit { int32_t rlim_cur; int32_t rlim_max; }; struct rlimit { rlim_t rlim_cur; rlim_t rlim_max; }; struct loadavg { fixpt_t ldavg[3]; long fscale; }; # 123 "/usr/include/sys/resource.h" 3 4 int getpriority(int, id_t); int getrlimit(int, struct rlimit *); int getrusage(int, struct rusage *); int setpriority(int, id_t, int); int setrlimit(int, const struct rlimit *); # 3127 "./Modules/posixmodule.c" 2 static char posix_nice__doc__[] = "nice(inc) -> new_priority\n\nDecrease the priority of process by inc and return the new priority."; static PyObject * posix_nice(PyObject *self, PyObject *args) { int increment, value; if (!_PyArg_ParseTuple_SizeT(args, "i:nice", &increment)) return ((void *)0); # 3153 "./Modules/posixmodule.c" (*__errno()) = 0; value = nice(increment); if (value == -1 && (*__errno()) != 0) return posix_error(); return PyLong_FromLong((long) value); } static char posix_getpriority__doc__[] = "getpriority(which, who) -> current_priority\n\nGet program scheduling priority."; static PyObject * posix_getpriority(PyObject *self, PyObject *args) { int which, who, retval; if (!_PyArg_ParseTuple_SizeT(args, "ii", &which, &who)) return ((void *)0); (*__errno()) = 0; retval = getpriority(which, who); if ((*__errno()) != 0) return posix_error(); return PyLong_FromLong((long)retval); } static char posix_setpriority__doc__[] = "setpriority(which, who, prio) -> None\n\nSet program scheduling priority."; static PyObject * posix_setpriority(PyObject *self, PyObject *args) { int which, who, prio, retval; if (!_PyArg_ParseTuple_SizeT(args, "iii", &which, &who, &prio)) return ((void *)0); retval = setpriority(which, who, prio); if (retval == -1) return posix_error(); return ( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++), (&_Py_NoneStruct); } static char posix_rename__doc__[] = "rename(old, new)\n\nRename a file or directory."; static PyObject * posix_rename(PyObject *self, PyObject *args) { # 3249 "./Modules/posixmodule.c" return posix_2str(args, "O&O&:rename", rename); } static char posix_rmdir__doc__[] = "rmdir(path)\n\nRemove a directory."; static PyObject * posix_rmdir(PyObject *self, PyObject *args) { return posix_1str(args, "O&:rmdir", rmdir); } static char posix_stat__doc__[] = "stat(path) -> stat result\n\nPerform a stat system call on the given path."; static PyObject * posix_stat(PyObject *self, PyObject *args) { return posix_do_stat(self, args, "O&:stat", stat, ((void *)0), ((void *)0)); } static char posix_system__doc__[] = "system(command) -> exit_status\n\nExecute the command (a string) in a subshell."; static PyObject * posix_system(PyObject *self, PyObject *args) { long sts; # 3302 "./Modules/posixmodule.c" PyObject *command_obj; char *command; if (!_PyArg_ParseTuple_SizeT(args, "O&:system", PyUnicodeUCS2_FSConverter, &command_obj)) return ((void *)0); command = PyBytes_AsString(command_obj); { PyThreadState *_save; _save = PyEval_SaveThread(); sts = system(command); PyEval_RestoreThread(_save); } do { if ( --((PyObject*)(command_obj))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(command_obj)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(command_obj)))); } while (0); return PyLong_FromLong(sts); } static char posix_umask__doc__[] = "umask(new_mask) -> old_mask\n\nSet the current numeric umask and return the previous umask."; static PyObject * posix_umask(PyObject *self, PyObject *args) { int i; if (!_PyArg_ParseTuple_SizeT(args, "i:umask", &i)) return ((void *)0); i = (int)umask(i); if (i < 0) return posix_error(); return PyLong_FromLong((long)i); } # 3371 "./Modules/posixmodule.c" static char posix_unlink__doc__[] = "unlink(path)\n\nRemove a file (same as remove(path))."; static char posix_remove__doc__[] = "remove(path)\n\nRemove a file (same as unlink(path))."; static PyObject * posix_unlink(PyObject *self, PyObject *args) { return posix_1str(args, "O&:remove", unlink); } static char posix_uname__doc__[] = "uname() -> (sysname, nodename, release, version, machine)\n\nReturn a tuple identifying the current operating system."; static PyObject * posix_uname(PyObject *self, PyObject *noargs) { struct utsname u; int res; { PyThreadState *_save; _save = PyEval_SaveThread(); res = uname(&u); PyEval_RestoreThread(_save); } if (res < 0) return posix_error(); return _Py_BuildValue_SizeT("(sssss)", u.sysname, u.nodename, u.release, u.version, u.machine); } static int extract_time(PyObject *t, time_t* sec, long* usec) { time_t intval; if (((((PyObject*)(t))->ob_type) == (&PyFloat_Type) || PyType_IsSubtype((((PyObject*)(t))->ob_type), (&PyFloat_Type)))) { double tval = PyFloat_AsDouble(t); PyObject *intobj = PyNumber_Long(t); if (!intobj) return -1; intval = PyLong_AsLong(intobj); do { if ( --((PyObject*)(intobj))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(intobj)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(intobj)))); } while (0); if (intval == -1 && PyErr_Occurred()) return -1; *sec = intval; *usec = (long)((tval - intval) * 1e6); if (*usec < 0) *usec = 0; return 0; } intval = PyLong_AsLong(t); if (intval == -1 && PyErr_Occurred()) return -1; *sec = intval; *usec = 0; return 0; } static char posix_utime__doc__[] = "utime(path, (atime, mtime))\nutime(path, None)\n\nSet the access and modified time of the file to the given values. If the\nsecond form is used, set the access and modified times to the current time."; static PyObject * posix_utime(PyObject *self, PyObject *args) { # 3545 "./Modules/posixmodule.c" PyObject *opath; char *path; time_t atime, mtime; long ausec, musec; int res; PyObject* arg; struct timeval buf[2]; # 3570 "./Modules/posixmodule.c" if (!_PyArg_ParseTuple_SizeT(args, "O&O:utime", PyUnicodeUCS2_FSConverter, &opath, &arg)) return ((void *)0); path = PyBytes_AsString(opath); if (arg == (&_Py_NoneStruct)) { { PyThreadState *_save; _save = PyEval_SaveThread(); res = utime(path, ((void *)0)); PyEval_RestoreThread(_save); } } else if (!((((((PyObject*)(arg))->ob_type))->tp_flags & ((1L<<26))) != 0) || PyTuple_Size(arg) != 2) { PyErr_SetString(PyExc_TypeError, "utime() arg 2 must be a tuple (atime, mtime)"); do { if ( --((PyObject*)(opath))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(opath)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(opath)))); } while (0); return ((void *)0); } else { if (extract_time((((PyTupleObject *)(arg))->ob_item[0]), &atime, &ausec) == -1) { do { if ( --((PyObject*)(opath))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(opath)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(opath)))); } while (0); return ((void *)0); } if (extract_time((((PyTupleObject *)(arg))->ob_item[1]), &mtime, &musec) == -1) { do { if ( --((PyObject*)(opath))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(opath)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(opath)))); } while (0); return ((void *)0); } buf[0].tv_sec = atime; buf[1].tv_sec = mtime; buf[0].tv_usec = ausec; buf[1].tv_usec = musec; { PyThreadState *_save; _save = PyEval_SaveThread(); res = utimes(path, buf); PyEval_RestoreThread(_save); } } if (res < 0) { return posix_error_with_allocated_filename(opath); } do { if ( --((PyObject*)(opath))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(opath)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(opath)))); } while (0); ( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++); return (&_Py_NoneStruct); } static char posix_futimes__doc__[] = "futimes(fd, (atime, mtime))\nfutimes(fd, None)\n\nSet the access and modified time of the file specified by the file\ndescriptor fd to the given values. If the second form is used, set the\naccess and modified times to the current time."; static PyObject * posix_futimes(PyObject *self, PyObject *args) { int res, fd; PyObject* arg; struct timeval buf[2]; long ausec, musec; if (!_PyArg_ParseTuple_SizeT(args, "iO:futimes", &fd, &arg)) return ((void *)0); if (arg == (&_Py_NoneStruct)) { { PyThreadState *_save; _save = PyEval_SaveThread(); res = futimes(fd, ((void *)0)); PyEval_RestoreThread(_save); } } else if (!((((((PyObject*)(arg))->ob_type))->tp_flags & ((1L<<26))) != 0) || PyTuple_Size(arg) != 2) { PyErr_SetString(PyExc_TypeError, "futimes() arg 2 must be a tuple (atime, mtime)"); return ((void *)0); } else { if (extract_time((((PyTupleObject *)(arg))->ob_item[0]), &(buf[0].tv_sec), &ausec) == -1) { return ((void *)0); } if (extract_time((((PyTupleObject *)(arg))->ob_item[1]), &(buf[1].tv_sec), &musec) == -1) { return ((void *)0); } buf[0].tv_usec = ausec; buf[1].tv_usec = musec; { PyThreadState *_save; _save = PyEval_SaveThread(); res = futimes(fd, buf); PyEval_RestoreThread(_save); } } if (res < 0) return posix_error(); return ( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++), (&_Py_NoneStruct); } # 3730 "./Modules/posixmodule.c" static char posix_futimens__doc__[] = "futimens(fd, (atime_sec, atime_nsec), (mtime_sec, mtime_nsec))\nfutimens(fd, None, None)\n\nUpdates the timestamps of a file specified by the file descriptor fd, with\nnanosecond precision.\nThe second form sets atime and mtime to the current time.\nIf *_nsec is specified as UTIME_NOW, the timestamp is updated to the\ncurrent time.\nIf *_nsec is specified as UTIME_OMIT, the timestamp is not updated."; # 3740 "./Modules/posixmodule.c" static PyObject * posix_futimens(PyObject *self, PyObject *args) { int res, fd; PyObject *atime, *mtime; struct timespec buf[2]; if (!_PyArg_ParseTuple_SizeT(args, "iOO:futimens", &fd, &atime, &mtime)) return ((void *)0); if (atime == (&_Py_NoneStruct) && mtime == (&_Py_NoneStruct)) { { PyThreadState *_save; _save = PyEval_SaveThread(); res = futimens(fd, ((void *)0)); PyEval_RestoreThread(_save); } } else if (!((((((PyObject*)(atime))->ob_type))->tp_flags & ((1L<<26))) != 0) || PyTuple_Size(atime) != 2) { PyErr_SetString(PyExc_TypeError, "futimens() arg 2 must be a tuple (atime_sec, atime_nsec)"); return ((void *)0); } else if (!((((((PyObject*)(mtime))->ob_type))->tp_flags & ((1L<<26))) != 0) || PyTuple_Size(mtime) != 2) { PyErr_SetString(PyExc_TypeError, "futimens() arg 3 must be a tuple (mtime_sec, mtime_nsec)"); return ((void *)0); } else { if (!_PyArg_ParseTuple_SizeT(atime, "ll:futimens", &(buf[0].tv_sec), &(buf[0].tv_nsec))) { return ((void *)0); } if (!_PyArg_ParseTuple_SizeT(mtime, "ll:futimens", &(buf[1].tv_sec), &(buf[1].tv_nsec))) { return ((void *)0); } { PyThreadState *_save; _save = PyEval_SaveThread(); res = futimens(fd, buf); PyEval_RestoreThread(_save); } } if (res < 0) return posix_error(); return ( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++), (&_Py_NoneStruct); } static char posix__exit__doc__[] = "_exit(status)\n\nExit to the system with specified status, without normal exit processing."; static PyObject * posix__exit(PyObject *self, PyObject *args) { int sts; if (!_PyArg_ParseTuple_SizeT(args, "i:_exit", &sts)) return ((void *)0); _exit(sts); return ((void *)0); } static void free_string_array(char **array, Py_ssize_t count) { Py_ssize_t i; for (i = 0; i < count; i++) PyMem_Free(array[i]); free(array); } static int fsconvert_strdup(PyObject *o, char**out) { PyObject *bytes; Py_ssize_t size; if (!PyUnicodeUCS2_FSConverter(o, &bytes)) return 0; size = (((void)0),(((PyVarObject*)(bytes))->ob_size)); *out = PyMem_Malloc(size+1); if (!*out) return 0; memcpy(*out, PyBytes_AsString(bytes), size+1); do { if ( --((PyObject*)(bytes))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(bytes)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(bytes)))); } while (0); return 1; } static char** parse_envlist(PyObject* env, Py_ssize_t *envc_ptr) { char **envlist; Py_ssize_t i, pos, envc; PyObject *keys=((void *)0), *vals=((void *)0); PyObject *key, *val, *key2, *val2; char *p, *k, *v; size_t len; i = PyMapping_Size(env); if (i < 0) return ((void *)0); envlist = ( ((size_t)(i + 1) > ((Py_ssize_t)(((size_t)-1)>>1)) / sizeof(char *)) ? ((void *)0) : ( (char * *) ((size_t)((i + 1) * sizeof(char *)) > (size_t)((Py_ssize_t)(((size_t)-1)>>1)) ? ((void *)0) : malloc(((i + 1) * sizeof(char *)) ? ((i + 1) * sizeof(char *)) : 1)) ) ); if (envlist == ((void *)0)) { PyErr_NoMemory(); return ((void *)0); } envc = 0; keys = PyMapping_Keys(env); vals = PyMapping_Values(env); if (!keys || !vals) goto error; if (!((((((PyObject*)(keys))->ob_type))->tp_flags & ((1L<<25))) != 0) || !((((((PyObject*)(vals))->ob_type))->tp_flags & ((1L<<25))) != 0)) { PyErr_Format(PyExc_TypeError, "env.keys() or env.values() is not a list"); goto error; } for (pos = 0; pos < i; pos++) { key = PyList_GetItem(keys, pos); val = PyList_GetItem(vals, pos); if (!key || !val) goto error; if (PyUnicodeUCS2_FSConverter(key, &key2) == 0) goto error; if (PyUnicodeUCS2_FSConverter(val, &val2) == 0) { do { if ( --((PyObject*)(key2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(key2)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(key2)))); } while (0); goto error; } k = PyBytes_AsString(key2); v = PyBytes_AsString(val2); len = (((void)0),(((PyVarObject*)(key2))->ob_size)) + (((void)0),(((PyVarObject*)(val2))->ob_size)) + 2; p = ( ((size_t)(len) > ((Py_ssize_t)(((size_t)-1)>>1)) / sizeof(char)) ? ((void *)0) : ( (char *) ((size_t)((len) * sizeof(char)) > (size_t)((Py_ssize_t)(((size_t)-1)>>1)) ? ((void *)0) : malloc(((len) * sizeof(char)) ? ((len) * sizeof(char)) : 1)) ) ); if (p == ((void *)0)) { PyErr_NoMemory(); do { if ( --((PyObject*)(key2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(key2)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(key2)))); } while (0); do { if ( --((PyObject*)(val2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(val2)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(val2)))); } while (0); goto error; } PyOS_snprintf(p, len, "%s=%s", k, v); envlist[envc++] = p; do { if ( --((PyObject*)(key2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(key2)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(key2)))); } while (0); do { if ( --((PyObject*)(val2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(val2)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(val2)))); } while (0); } do { if ( --((PyObject*)(vals))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(vals)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(vals)))); } while (0); do { if ( --((PyObject*)(keys))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(keys)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(keys)))); } while (0); envlist[envc] = 0; *envc_ptr = envc; return envlist; error: do { if ((keys) == ((void *)0)) ; else do { if ( --((PyObject*)(keys))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(keys)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(keys)))); } while (0); } while (0); do { if ((vals) == ((void *)0)) ; else do { if ( --((PyObject*)(vals))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(vals)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(vals)))); } while (0); } while (0); while (--envc >= 0) free(envlist[envc]); free(envlist); return ((void *)0); } static char** parse_arglist(PyObject* argv, Py_ssize_t *argc) { int i; char **argvlist = ( ((size_t)(*argc+1) > ((Py_ssize_t)(((size_t)-1)>>1)) / sizeof(char *)) ? ((void *)0) : ( (char * *) ((size_t)((*argc+1) * sizeof(char *)) > (size_t)((Py_ssize_t)(((size_t)-1)>>1)) ? ((void *)0) : malloc(((*argc+1) * sizeof(char *)) ? ((*argc+1) * sizeof(char *)) : 1)) ) ); if (argvlist == ((void *)0)) { PyErr_NoMemory(); return ((void *)0); } for (i = 0; i < *argc; i++) { PyObject* item = ( (((PyObject*)(argv))->ob_type)->tp_as_sequence->sq_item(argv, i) ); if (item == ((void *)0)) goto fail; if (!fsconvert_strdup(item, &argvlist[i])) { do { if ( --((PyObject*)(item))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(item)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(item)))); } while (0); goto fail; } do { if ( --((PyObject*)(item))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(item)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(item)))); } while (0); } argvlist[*argc] = ((void *)0); return argvlist; fail: *argc = i; free_string_array(argvlist, *argc); return ((void *)0); } static char posix_execv__doc__[] = "execv(path, args)\n\nExecute an executable path with arguments, replacing current process.\n\n path: path of executable file\n args: tuple or list of strings"; static PyObject * posix_execv(PyObject *self, PyObject *args) { PyObject *opath; char *path; PyObject *argv; char **argvlist; Py_ssize_t argc; if (!_PyArg_ParseTuple_SizeT(args, "O&O:execv", PyUnicodeUCS2_FSConverter, &opath, &argv)) return ((void *)0); path = PyBytes_AsString(opath); if (!((((((PyObject*)(argv))->ob_type))->tp_flags & ((1L<<25))) != 0) && !((((((PyObject*)(argv))->ob_type))->tp_flags & ((1L<<26))) != 0)) { PyErr_SetString(PyExc_TypeError, "execv() arg 2 must be a tuple or list"); do { if ( --((PyObject*)(opath))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(opath)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(opath)))); } while (0); return ((void *)0); } argc = PySequence_Size(argv); if (argc < 1) { PyErr_SetString(PyExc_ValueError, "execv() arg 2 must not be empty"); do { if ( --((PyObject*)(opath))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(opath)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(opath)))); } while (0); return ((void *)0); } argvlist = parse_arglist(argv, &argc); if (argvlist == ((void *)0)) { do { if ( --((PyObject*)(opath))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(opath)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(opath)))); } while (0); return ((void *)0); } execv(path, argvlist); free_string_array(argvlist, argc); do { if ( --((PyObject*)(opath))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(opath)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(opath)))); } while (0); return posix_error(); } static char posix_execve__doc__[] = "execve(path, args, env)\n\nExecute a path with arguments and environment, replacing current process.\n\n path: path of executable file\n args: tuple or list of arguments\n env: dictionary of strings mapping to strings"; static PyObject * posix_execve(PyObject *self, PyObject *args) { PyObject *opath; char *path; PyObject *argv, *env; char **argvlist; char **envlist; Py_ssize_t argc, envc; if (!_PyArg_ParseTuple_SizeT(args, "O&OO:execve", PyUnicodeUCS2_FSConverter, &opath, &argv, &env)) return ((void *)0); path = PyBytes_AsString(opath); if (!((((((PyObject*)(argv))->ob_type))->tp_flags & ((1L<<25))) != 0) && !((((((PyObject*)(argv))->ob_type))->tp_flags & ((1L<<26))) != 0)) { PyErr_SetString(PyExc_TypeError, "execve() arg 2 must be a tuple or list"); goto fail_0; } argc = PySequence_Size(argv); if (!PyMapping_Check(env)) { PyErr_SetString(PyExc_TypeError, "execve() arg 3 must be a mapping object"); goto fail_0; } argvlist = parse_arglist(argv, &argc); if (argvlist == ((void *)0)) { goto fail_0; } envlist = parse_envlist(env, &envc); if (envlist == ((void *)0)) goto fail_1; execve(path, argvlist, envlist); (void) posix_error(); while (--envc >= 0) free(envlist[envc]); free(envlist); fail_1: free_string_array(argvlist, argc); fail_0: do { if ( --((PyObject*)(opath))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(opath)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(opath)))); } while (0); return ((void *)0); } # 4521 "./Modules/posixmodule.c" static char posix_fork__doc__[] = "fork() -> pid\n\nFork a child process.\nReturn 0 to child process and PID of child to parent process."; static PyObject * posix_fork(PyObject *self, PyObject *noargs) { pid_t pid; int result = 0; _PyImport_AcquireLock(); pid = fork(); if (pid == 0) { PyOS_AfterFork(); } else { result = _PyImport_ReleaseLock(); } if (pid == -1) return posix_error(); if (result < 0) { PyErr_SetString(PyExc_RuntimeError, "not holding the import lock"); return ((void *)0); } return PyLong_FromLong(pid); } static char posix_sched_get_priority_max__doc__[] = "sched_get_priority_max(policy)\n\nGet the maximum scheduling priority for *policy*."; static PyObject * posix_sched_get_priority_max(PyObject *self, PyObject *args) { int policy, max; if (!_PyArg_ParseTuple_SizeT(args, "i:sched_get_priority_max", &policy)) return ((void *)0); max = sched_get_priority_max(policy); if (max < 0) return posix_error(); return PyLong_FromLong(max); } static char posix_sched_get_priority_min__doc__[] = "sched_get_priority_min(policy)\n\nGet the minimum scheduling priority for *policy*."; static PyObject * posix_sched_get_priority_min(PyObject *self, PyObject *args) { int policy, min; if (!_PyArg_ParseTuple_SizeT(args, "i:sched_get_priority_min", &policy)) return ((void *)0); min = sched_get_priority_min(policy); if (min < 0) return posix_error(); return PyLong_FromLong(min); } # 4764 "./Modules/posixmodule.c" static char posix_sched_yield__doc__[] = "sched_yield()\n\nVoluntarily relinquish the CPU."; static PyObject * posix_sched_yield(PyObject *self, PyObject *noargs) { if (sched_yield()) return posix_error(); return ( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++), (&_Py_NoneStruct); } # 5127 "./Modules/posixmodule.c" # 1 "/usr/include/util.h" 1 3 4 # 76 "/usr/include/util.h" 3 4 struct __sFILE; struct login_cap; struct passwd; struct termios; struct utmp; struct winsize; char *fparseln(struct __sFILE *, size_t *, size_t *, const char[3], int); void login(struct utmp *); int login_tty(int); int logout(const char *); void logwtmp(const char *, const char *, const char *); int opendev(const char *, int, int, char **); int pidfile(const char *); void pw_setdir(const char *); char *pw_file(const char *); int pw_lock(int retries); int pw_mkdb(char *, int); int pw_abort(void); void pw_init(void); void pw_edit(int, const char *); void pw_prompt(void); void pw_copy(int, int, const struct passwd *, const struct passwd *); int pw_scan(char *, struct passwd *, int *); void pw_error(const char *, int, int); int openpty(int *, int *, char *, struct termios *, struct winsize *); int opendisk(const char *path, int flags, char *buf, size_t buflen, int iscooked); pid_t forkpty(int *, char *, struct termios *, struct winsize *); int getmaxpartitions(void); int getrawpartition(void); void login_fbtab(const char *, uid_t, gid_t); int login_check_expire(struct __sFILE *, struct passwd *, char *, int); char *readlabelfs(char *, int); const char *uu_lockerr(int _uu_lockresult); int uu_lock(const char *_ttyname); int uu_lock_txfr(const char *_ttyname, pid_t _pid); int uu_unlock(const char *_ttyname); int fmt_scaled(long long number, char *result); int scan_scaled(char *scaled, long long *result); int isduid(const char *, int); # 5128 "./Modules/posixmodule.c" 2 # 5137 "./Modules/posixmodule.c" static char posix_openpty__doc__[] = "openpty() -> (master_fd, slave_fd)\n\nOpen a pseudo-terminal, returning open fd's for both master and slave end.\n"; static PyObject * posix_openpty(PyObject *self, PyObject *noargs) { int master_fd, slave_fd; # 5156 "./Modules/posixmodule.c" if (openpty(&master_fd, &slave_fd, ((void *)0), ((void *)0), ((void *)0)) != 0) return posix_error(); # 5197 "./Modules/posixmodule.c" return _Py_BuildValue_SizeT("(ii)", master_fd, slave_fd); } static char posix_forkpty__doc__[] = "forkpty() -> (pid, master_fd)\n\nFork a new process with a new pseudo-terminal as controlling tty.\n\nLike fork(), return 0 as pid to child process, and PID of child to parent.\nTo both, return fd of newly opened pseudo-terminal.\n"; static PyObject * posix_forkpty(PyObject *self, PyObject *noargs) { int master_fd = -1, result = 0; pid_t pid; _PyImport_AcquireLock(); pid = forkpty(&master_fd, ((void *)0), ((void *)0), ((void *)0)); if (pid == 0) { PyOS_AfterFork(); } else { result = _PyImport_ReleaseLock(); } if (pid == -1) return posix_error(); if (result < 0) { PyErr_SetString(PyExc_RuntimeError, "not holding the import lock"); return ((void *)0); } return _Py_BuildValue_SizeT("(Ni)", PyLong_FromLong(pid), master_fd); } static char posix_getegid__doc__[] = "getegid() -> egid\n\nReturn the current process's effective group id."; static PyObject * posix_getegid(PyObject *self, PyObject *noargs) { return PyLong_FromLong((long)getegid()); } static char posix_geteuid__doc__[] = "geteuid() -> euid\n\nReturn the current process's effective user id."; static PyObject * posix_geteuid(PyObject *self, PyObject *noargs) { return PyLong_FromLong((long)geteuid()); } static char posix_getgid__doc__[] = "getgid() -> gid\n\nReturn the current process's group id."; static PyObject * posix_getgid(PyObject *self, PyObject *noargs) { return PyLong_FromLong((long)getgid()); } static char posix_getpid__doc__[] = "getpid() -> pid\n\nReturn the current process id"; static PyObject * posix_getpid(PyObject *self, PyObject *noargs) { return PyLong_FromLong(getpid()); } static char posix_getgrouplist__doc__[] = "getgrouplist(user, group) -> list of groups to which a user belongs\n\nReturns a list of groups to which a user belongs.\n\n user: username to lookup\n group: base group id of the user"; static PyObject * posix_getgrouplist(PyObject *self, PyObject *args) { const char *user; int i, ngroups; PyObject *list; gid_t *groups, basegid; ngroups = 16; if (!_PyArg_ParseTuple_SizeT(args, "si", &user, &basegid)) return ((void *)0); groups = PyMem_Malloc(ngroups * sizeof(gid_t)); if (groups == ((void *)0)) return PyErr_NoMemory(); if (getgrouplist(user, basegid, groups, &ngroups) == -1) { PyMem_Free(groups); return posix_error(); } list = PyList_New(ngroups); if (list == ((void *)0)) { PyMem_Free(groups); return ((void *)0); } for (i = 0; i < ngroups; i++) { PyObject *o = PyLong_FromUnsignedLong((unsigned long)groups[i]); if (o == ((void *)0)) { do { if ( --((PyObject*)(list))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(list)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(list)))); } while (0); PyMem_Free(groups); return ((void *)0); } (((PyListObject *)(list))->ob_item[i] = (o)); } PyMem_Free(groups); return list; } static char posix_getgroups__doc__[] = "getgroups() -> list of group IDs\n\nReturn list of supplemental group IDs for the process."; static PyObject * posix_getgroups(PyObject *self, PyObject *noargs) { PyObject *result = ((void *)0); gid_t grouplist[16]; # 5377 "./Modules/posixmodule.c" gid_t* alt_grouplist = grouplist; int n; n = getgroups(16, grouplist); if (n < 0) { if ((*__errno()) == 22) { n = getgroups(0, ((void *)0)); if (n == -1) { return posix_error(); } if (n == 0) { alt_grouplist = grouplist; } else { alt_grouplist = PyMem_Malloc(n * sizeof(gid_t)); if (alt_grouplist == ((void *)0)) { (*__errno()) = 22; return posix_error(); } n = getgroups(n, alt_grouplist); if (n == -1) { PyMem_Free(alt_grouplist); return posix_error(); } } } else { return posix_error(); } } result = PyList_New(n); if (result != ((void *)0)) { int i; for (i = 0; i < n; ++i) { PyObject *o = PyLong_FromLong((long)alt_grouplist[i]); if (o == ((void *)0)) { do { if ( --((PyObject*)(result))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(result)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(result)))); } while (0); result = ((void *)0); break; } (((PyListObject *)(result))->ob_item[i] = (o)); } } if (alt_grouplist != grouplist) { PyMem_Free(alt_grouplist); } return result; } static char posix_initgroups__doc__[] = "initgroups(username, gid) -> None\n\nCall the system initgroups() to initialize the group access list with all of\nthe groups of which the specified username is a member, plus the specified\ngroup id."; static PyObject * posix_initgroups(PyObject *self, PyObject *args) { PyObject *oname; char *username; int res; long gid; if (!_PyArg_ParseTuple_SizeT(args, "O&l:initgroups", PyUnicodeUCS2_FSConverter, &oname, &gid)) return ((void *)0); username = (((void)0), (((PyBytesObject *)(oname))->ob_sval)); res = initgroups(username, (gid_t) gid); do { if ( --((PyObject*)(oname))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(oname)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(oname)))); } while (0); if (res == -1) return PyErr_SetFromErrno(PyExc_OSError); ( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++); return (&_Py_NoneStruct); } static char posix_getpgid__doc__[] = "getpgid(pid) -> pgid\n\nCall the system call getpgid()."; static PyObject * posix_getpgid(PyObject *self, PyObject *args) { pid_t pid, pgid; if (!_PyArg_ParseTuple_SizeT(args, "i" ":getpgid", &pid)) return ((void *)0); pgid = getpgid(pid); if (pgid < 0) return posix_error(); return PyLong_FromLong(pgid); } static char posix_getpgrp__doc__[] = "getpgrp() -> pgrp\n\nReturn the current process group id."; static PyObject * posix_getpgrp(PyObject *self, PyObject *noargs) { return PyLong_FromLong(getpgrp()); } static char posix_setpgrp__doc__[] = "setpgrp()\n\nMake this process the process group leader."; static PyObject * posix_setpgrp(PyObject *self, PyObject *noargs) { if (setpgrp(0, 0) < 0) return posix_error(); ( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++); return (&_Py_NoneStruct); } # 5558 "./Modules/posixmodule.c" static char posix_getppid__doc__[] = "getppid() -> ppid\n\nReturn the parent's process id. If the parent process has already exited,\nWindows machines will still return its id; others systems will return the id\nof the 'init' process (1)."; static PyObject * posix_getppid(PyObject *self, PyObject *noargs) { return PyLong_FromLong(getppid()); } static char posix_getlogin__doc__[] = "getlogin() -> string\n\nReturn the actual login name."; static PyObject * posix_getlogin(PyObject *self, PyObject *noargs) { PyObject *result = ((void *)0); # 5596 "./Modules/posixmodule.c" char *name; int old_errno = (*__errno()); (*__errno()) = 0; name = getlogin(); if (name == ((void *)0)) { if ((*__errno())) posix_error(); else PyErr_SetString(PyExc_OSError, "unable to determine login name"); } else result = PyUnicodeUCS2_DecodeFSDefault(name); (*__errno()) = old_errno; return result; } static char posix_getuid__doc__[] = "getuid() -> uid\n\nReturn the current process's user id."; static PyObject * posix_getuid(PyObject *self, PyObject *noargs) { return PyLong_FromLong((long)getuid()); } static char posix_kill__doc__[] = "kill(pid, sig)\n\nKill a process with a signal."; static PyObject * posix_kill(PyObject *self, PyObject *args) { pid_t pid; int sig; if (!_PyArg_ParseTuple_SizeT(args, "i" "i:kill", &pid, &sig)) return ((void *)0); # 5654 "./Modules/posixmodule.c" if (kill(pid, sig) == -1) return posix_error(); ( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++); return (&_Py_NoneStruct); } static char posix_killpg__doc__[] = "killpg(pgid, sig)\n\nKill a process group with a signal."; static PyObject * posix_killpg(PyObject *self, PyObject *args) { int sig; pid_t pgid; if (!_PyArg_ParseTuple_SizeT(args, "i" "i:killpg", &pgid, &sig)) return ((void *)0); if (killpg(pgid, sig) == -1) return posix_error(); ( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++); return (&_Py_NoneStruct); } # 5756 "./Modules/posixmodule.c" static char posix_setuid__doc__[] = "setuid(uid)\n\nSet the current process's user id."; static PyObject * posix_setuid(PyObject *self, PyObject *args) { long uid_arg; uid_t uid; if (!_PyArg_ParseTuple_SizeT(args, "l:setuid", &uid_arg)) return ((void *)0); uid = uid_arg; if (uid != uid_arg) { PyErr_SetString(PyExc_OverflowError, "user id too big"); return ((void *)0); } if (setuid(uid) < 0) return posix_error(); ( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++); return (&_Py_NoneStruct); } static char posix_seteuid__doc__[] = "seteuid(uid)\n\nSet the current process's effective user id."; static PyObject * posix_seteuid (PyObject *self, PyObject *args) { long euid_arg; uid_t euid; if (!_PyArg_ParseTuple_SizeT(args, "l", &euid_arg)) return ((void *)0); euid = euid_arg; if (euid != euid_arg) { PyErr_SetString(PyExc_OverflowError, "user id too big"); return ((void *)0); } if (seteuid(euid) < 0) { return posix_error(); } else { ( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++); return (&_Py_NoneStruct); } } static char posix_setegid__doc__[] = "setegid(gid)\n\nSet the current process's effective group id."; static PyObject * posix_setegid (PyObject *self, PyObject *args) { long egid_arg; gid_t egid; if (!_PyArg_ParseTuple_SizeT(args, "l", &egid_arg)) return ((void *)0); egid = egid_arg; if (egid != egid_arg) { PyErr_SetString(PyExc_OverflowError, "group id too big"); return ((void *)0); } if (setegid(egid) < 0) { return posix_error(); } else { ( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++); return (&_Py_NoneStruct); } } static char posix_setreuid__doc__[] = "setreuid(ruid, euid)\n\nSet the current process's real and effective user ids."; static PyObject * posix_setreuid (PyObject *self, PyObject *args) { long ruid_arg, euid_arg; uid_t ruid, euid; if (!_PyArg_ParseTuple_SizeT(args, "ll", &ruid_arg, &euid_arg)) return ((void *)0); if (ruid_arg == -1) ruid = (uid_t)-1; else ruid = ruid_arg; if (euid_arg == -1) euid = (uid_t)-1; else euid = euid_arg; if ((euid_arg != -1 && euid != euid_arg) || (ruid_arg != -1 && ruid != ruid_arg)) { PyErr_SetString(PyExc_OverflowError, "user id too big"); return ((void *)0); } if (setreuid(ruid, euid) < 0) { return posix_error(); } else { ( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++); return (&_Py_NoneStruct); } } static char posix_setregid__doc__[] = "setregid(rgid, egid)\n\nSet the current process's real and effective group ids."; static PyObject * posix_setregid (PyObject *self, PyObject *args) { long rgid_arg, egid_arg; gid_t rgid, egid; if (!_PyArg_ParseTuple_SizeT(args, "ll", &rgid_arg, &egid_arg)) return ((void *)0); if (rgid_arg == -1) rgid = (gid_t)-1; else rgid = rgid_arg; if (egid_arg == -1) egid = (gid_t)-1; else egid = egid_arg; if ((egid_arg != -1 && egid != egid_arg) || (rgid_arg != -1 && rgid != rgid_arg)) { PyErr_SetString(PyExc_OverflowError, "group id too big"); return ((void *)0); } if (setregid(rgid, egid) < 0) { return posix_error(); } else { ( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++); return (&_Py_NoneStruct); } } static char posix_setgid__doc__[] = "setgid(gid)\n\nSet the current process's group id."; static PyObject * posix_setgid(PyObject *self, PyObject *args) { long gid_arg; gid_t gid; if (!_PyArg_ParseTuple_SizeT(args, "l:setgid", &gid_arg)) return ((void *)0); gid = gid_arg; if (gid != gid_arg) { PyErr_SetString(PyExc_OverflowError, "group id too big"); return ((void *)0); } if (setgid(gid) < 0) return posix_error(); ( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++); return (&_Py_NoneStruct); } static char posix_setgroups__doc__[] = "setgroups(list)\n\nSet the groups of the current process to list."; static PyObject * posix_setgroups(PyObject *self, PyObject *groups) { int i, len; gid_t grouplist[16]; if (!PySequence_Check(groups)) { PyErr_SetString(PyExc_TypeError, "setgroups argument must be a sequence"); return ((void *)0); } len = PySequence_Size(groups); if (len > 16) { PyErr_SetString(PyExc_ValueError, "too many groups"); return ((void *)0); } for(i = 0; i < len; i++) { PyObject *elem; elem = PySequence_GetItem(groups, i); if (!elem) return ((void *)0); if (!((((((PyObject*)(elem))->ob_type))->tp_flags & ((1L<<24))) != 0)) { PyErr_SetString(PyExc_TypeError, "groups must be integers"); do { if ( --((PyObject*)(elem))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(elem)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(elem)))); } while (0); return ((void *)0); } else { unsigned long x = PyLong_AsUnsignedLong(elem); if (PyErr_Occurred()) { PyErr_SetString(PyExc_TypeError, "group id too big"); do { if ( --((PyObject*)(elem))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(elem)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(elem)))); } while (0); return ((void *)0); } grouplist[i] = x; if (grouplist[i] != x) { PyErr_SetString(PyExc_TypeError, "group id too big"); do { if ( --((PyObject*)(elem))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(elem)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(elem)))); } while (0); return ((void *)0); } } do { if ( --((PyObject*)(elem))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(elem)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(elem)))); } while (0); } if (setgroups(len, grouplist) < 0) return posix_error(); ( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++); return (&_Py_NoneStruct); } static PyObject * wait_helper(pid_t pid, int status, struct rusage *ru) { PyObject *result; static PyObject *struct_rusage; if (pid == -1) return posix_error(); if (struct_rusage == ((void *)0)) { PyObject *m = PyImport_ImportModuleNoBlock("resource"); if (m == ((void *)0)) return ((void *)0); struct_rusage = PyObject_GetAttrString(m, "struct_rusage"); do { if ( --((PyObject*)(m))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(m)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(m)))); } while (0); if (struct_rusage == ((void *)0)) return ((void *)0); } result = PyStructSequence_New((PyTypeObject*) struct_rusage); if (!result) return ((void *)0); (((PyTupleObject *)(result))->ob_item[0] = PyFloat_FromDouble(((double)(ru->ru_utime).tv_sec + (ru->ru_utime).tv_usec * 0.000001))); (((PyTupleObject *)(result))->ob_item[1] = PyFloat_FromDouble(((double)(ru->ru_stime).tv_sec + (ru->ru_stime).tv_usec * 0.000001))); (((PyTupleObject *)(result))->ob_item[2] = PyLong_FromLong(ru->ru_maxrss)); (((PyTupleObject *)(result))->ob_item[3] = PyLong_FromLong(ru->ru_ixrss)); (((PyTupleObject *)(result))->ob_item[4] = PyLong_FromLong(ru->ru_idrss)); (((PyTupleObject *)(result))->ob_item[5] = PyLong_FromLong(ru->ru_isrss)); (((PyTupleObject *)(result))->ob_item[6] = PyLong_FromLong(ru->ru_minflt)); (((PyTupleObject *)(result))->ob_item[7] = PyLong_FromLong(ru->ru_majflt)); (((PyTupleObject *)(result))->ob_item[8] = PyLong_FromLong(ru->ru_nswap)); (((PyTupleObject *)(result))->ob_item[9] = PyLong_FromLong(ru->ru_inblock)); (((PyTupleObject *)(result))->ob_item[10] = PyLong_FromLong(ru->ru_oublock)); (((PyTupleObject *)(result))->ob_item[11] = PyLong_FromLong(ru->ru_msgsnd)); (((PyTupleObject *)(result))->ob_item[12] = PyLong_FromLong(ru->ru_msgrcv)); (((PyTupleObject *)(result))->ob_item[13] = PyLong_FromLong(ru->ru_nsignals)); (((PyTupleObject *)(result))->ob_item[14] = PyLong_FromLong(ru->ru_nvcsw)); (((PyTupleObject *)(result))->ob_item[15] = PyLong_FromLong(ru->ru_nivcsw)); if (PyErr_Occurred()) { do { if ( --((PyObject*)(result))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(result)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(result)))); } while (0); return ((void *)0); } return _Py_BuildValue_SizeT("NiN", PyLong_FromLong(pid), status, result); } static char posix_wait3__doc__[] = "wait3(options) -> (pid, status, rusage)\n\nWait for completion of a child process."; static PyObject * posix_wait3(PyObject *self, PyObject *args) { pid_t pid; int options; struct rusage ru; int status; (status) = 0; if (!_PyArg_ParseTuple_SizeT(args, "i:wait3", &options)) return ((void *)0); { PyThreadState *_save; _save = PyEval_SaveThread(); pid = wait3(&status, options, &ru); PyEval_RestoreThread(_save); } return wait_helper(pid, (status), &ru); } static char posix_wait4__doc__[] = "wait4(pid, options) -> (pid, status, rusage)\n\nWait for completion of a given child process."; static PyObject * posix_wait4(PyObject *self, PyObject *args) { pid_t pid; int options; struct rusage ru; int status; (status) = 0; if (!_PyArg_ParseTuple_SizeT(args, "i" "i:wait4", &pid, &options)) return ((void *)0); { PyThreadState *_save; _save = PyEval_SaveThread(); pid = wait4(pid, &status, options, &ru); PyEval_RestoreThread(_save); } return wait_helper(pid, (status), &ru); } # 6141 "./Modules/posixmodule.c" static char posix_waitpid__doc__[] = "waitpid(pid, options) -> (pid, status)\n\nWait for completion of a given child process."; static PyObject * posix_waitpid(PyObject *self, PyObject *args) { pid_t pid; int options; int status; (status) = 0; if (!_PyArg_ParseTuple_SizeT(args, "i" "i:waitpid", &pid, &options)) return ((void *)0); { PyThreadState *_save; _save = PyEval_SaveThread(); pid = waitpid(pid, &status, options); PyEval_RestoreThread(_save); } if (pid == -1) return posix_error(); return _Py_BuildValue_SizeT("Ni", PyLong_FromLong(pid), (status)); } # 6191 "./Modules/posixmodule.c" static char posix_wait__doc__[] = "wait() -> (pid, status)\n\nWait for completion of a child process."; static PyObject * posix_wait(PyObject *self, PyObject *noargs) { pid_t pid; int status; (status) = 0; { PyThreadState *_save; _save = PyEval_SaveThread(); pid = wait(&status); PyEval_RestoreThread(_save); } if (pid == -1) return posix_error(); return _Py_BuildValue_SizeT("Ni", PyLong_FromLong(pid), (status)); } static char posix_lstat__doc__[] = "lstat(path) -> stat result\n\nLike stat(path), but do not follow symbolic links."; static PyObject * posix_lstat(PyObject *self, PyObject *args) { return posix_do_stat(self, args, "O&:lstat", lstat, ((void *)0), ((void *)0)); # 6230 "./Modules/posixmodule.c" } static char posix_readlink__doc__[] = "readlink(path) -> path\n\nReturn a string representing the path to which the symbolic link points."; static PyObject * posix_readlink(PyObject *self, PyObject *args) { PyObject* v; char buf[1024]; PyObject *opath; char *path; int n; int arg_is_unicode = 0; if (!_PyArg_ParseTuple_SizeT(args, "O&:readlink", PyUnicodeUCS2_FSConverter, &opath)) return ((void *)0); path = PyBytes_AsString(opath); v = PySequence_GetItem(args, 0); if (v == ((void *)0)) { do { if ( --((PyObject*)(opath))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(opath)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(opath)))); } while (0); return ((void *)0); } if (((((((PyObject*)(v))->ob_type))->tp_flags & ((1L<<28))) != 0)) { arg_is_unicode = 1; } do { if ( --((PyObject*)(v))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(v)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(v)))); } while (0); { PyThreadState *_save; _save = PyEval_SaveThread(); n = readlink(path, buf, (int) sizeof buf); PyEval_RestoreThread(_save); } if (n < 0) return posix_error_with_allocated_filename(opath); do { if ( --((PyObject*)(opath))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(opath)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(opath)))); } while (0); if (arg_is_unicode) return PyUnicodeUCS2_DecodeFSDefaultAndSize(buf, n); else return PyBytes_FromStringAndSize(buf, n); } static char posix_symlink__doc__[] = "symlink(src, dst)\n\nCreate a symbolic link pointing to src named dst."; static PyObject * posix_symlink(PyObject *self, PyObject *args) { return posix_2str(args, "O&O&:symlink", symlink); } # 6477 "./Modules/posixmodule.c" static long ticks_per_second = -1; static PyObject * posix_times(PyObject *self, PyObject *noargs) { struct tms t; clock_t c; (*__errno()) = 0; c = times(&t); if (c == (clock_t) -1) return posix_error(); return _Py_BuildValue_SizeT("ddddd", (double)t.tms_utime / ticks_per_second, (double)t.tms_stime / ticks_per_second, (double)t.tms_cutime / ticks_per_second, (double)t.tms_cstime / ticks_per_second, (double)c / ticks_per_second); } # 6525 "./Modules/posixmodule.c" static char posix_times__doc__[] = "times() -> (utime, stime, cutime, cstime, elapsed_time)\n\nReturn a tuple of floating point numbers indicating process times."; static char posix_getsid__doc__[] = "getsid(pid) -> sid\n\nCall the system call getsid()."; static PyObject * posix_getsid(PyObject *self, PyObject *args) { pid_t pid; int sid; if (!_PyArg_ParseTuple_SizeT(args, "i" ":getsid", &pid)) return ((void *)0); sid = getsid(pid); if (sid < 0) return posix_error(); return PyLong_FromLong((long)sid); } static char posix_setsid__doc__[] = "setsid()\n\nCall the system call setsid()."; static PyObject * posix_setsid(PyObject *self, PyObject *noargs) { if (setsid() < 0) return posix_error(); ( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++); return (&_Py_NoneStruct); } static char posix_setpgid__doc__[] = "setpgid(pid, pgrp)\n\nCall the system call setpgid()."; static PyObject * posix_setpgid(PyObject *self, PyObject *args) { pid_t pid; int pgrp; if (!_PyArg_ParseTuple_SizeT(args, "i" "i:setpgid", &pid, &pgrp)) return ((void *)0); if (setpgid(pid, pgrp) < 0) return posix_error(); ( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++); return (&_Py_NoneStruct); } static char posix_tcgetpgrp__doc__[] = "tcgetpgrp(fd) -> pgid\n\nReturn the process group associated with the terminal given by a fd."; static PyObject * posix_tcgetpgrp(PyObject *self, PyObject *args) { int fd; pid_t pgid; if (!_PyArg_ParseTuple_SizeT(args, "i:tcgetpgrp", &fd)) return ((void *)0); pgid = tcgetpgrp(fd); if (pgid < 0) return posix_error(); return PyLong_FromLong(pgid); } static char posix_tcsetpgrp__doc__[] = "tcsetpgrp(fd, pgid)\n\nSet the process group associated with the terminal given by a fd."; static PyObject * posix_tcsetpgrp(PyObject *self, PyObject *args) { int fd; pid_t pgid; if (!_PyArg_ParseTuple_SizeT(args, "i" "i" ":tcsetpgrp", &fd, &pgid)) return ((void *)0); if (tcsetpgrp(fd, pgid) < 0) return posix_error(); ( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++); return (&_Py_NoneStruct); } static char posix_open__doc__[] = "open(filename, flag [, mode=0777]) -> fd\n\nOpen a file (for low level IO)."; static PyObject * posix_open(PyObject *self, PyObject *args) { PyObject *ofile; char *file; int flag; int mode = 0777; int fd; # 6657 "./Modules/posixmodule.c" if (!_PyArg_ParseTuple_SizeT(args, "O&i|i:open", PyUnicodeUCS2_FSConverter, &ofile, &flag, &mode)) return ((void *)0); file = PyBytes_AsString(ofile); { PyThreadState *_save; _save = PyEval_SaveThread(); fd = open(file, flag, mode); PyEval_RestoreThread(_save); } if (fd < 0) return posix_error_with_allocated_filename(ofile); do { if ( --((PyObject*)(ofile))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(ofile)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(ofile)))); } while (0); return PyLong_FromLong((long)fd); } static char posix_close__doc__[] = "close(fd)\n\nClose a file descriptor (for low level IO)."; static PyObject * posix_close(PyObject *self, PyObject *args) { int fd, res; if (!_PyArg_ParseTuple_SizeT(args, "i:close", &fd)) return ((void *)0); if (!(1)) return posix_error(); { PyThreadState *_save; _save = PyEval_SaveThread(); res = close(fd); PyEval_RestoreThread(_save); } if (res < 0) return posix_error(); ( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++); return (&_Py_NoneStruct); } static char posix_closerange__doc__[] = "closerange(fd_low, fd_high)\n\nCloses all file descriptors in [fd_low, fd_high), ignoring errors."; static PyObject * posix_closerange(PyObject *self, PyObject *args) { int fd_from, fd_to, i; if (!_PyArg_ParseTuple_SizeT(args, "ii:closerange", &fd_from, &fd_to)) return ((void *)0); { PyThreadState *_save; _save = PyEval_SaveThread(); for (i = fd_from; i < fd_to; i++) if ((1)) close(i); PyEval_RestoreThread(_save); } return ( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++), (&_Py_NoneStruct); } static char posix_dup__doc__[] = "dup(fd) -> fd2\n\nReturn a duplicate of a file descriptor."; static PyObject * posix_dup(PyObject *self, PyObject *args) { int fd; if (!_PyArg_ParseTuple_SizeT(args, "i:dup", &fd)) return ((void *)0); if (!(1)) return posix_error(); fd = dup(fd); if (fd < 0) return posix_error(); return PyLong_FromLong((long)fd); } static char posix_dup2__doc__[] = "dup2(old_fd, new_fd)\n\nDuplicate file descriptor."; static PyObject * posix_dup2(PyObject *self, PyObject *args) { int fd, fd2, res; if (!_PyArg_ParseTuple_SizeT(args, "ii:dup2", &fd, &fd2)) return ((void *)0); if (!(1)) return posix_error(); res = dup2(fd, fd2); if (res < 0) return posix_error(); ( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++); return (&_Py_NoneStruct); } static char posix_lockf__doc__[] = "lockf(fd, cmd, len)\n\nApply, test or remove a POSIX lock on an open file descriptor.\n\nfd is an open file descriptor.\ncmd specifies the command to use - one of F_LOCK, F_TLOCK, F_ULOCK or\nF_TEST.\nlen specifies the section of the file to lock."; static PyObject * posix_lockf(PyObject *self, PyObject *args) { int fd, cmd, res; off_t len; if (!_PyArg_ParseTuple_SizeT(args, "iiO&:lockf", &fd, &cmd, _parse_off_t, &len)) return ((void *)0); { PyThreadState *_save; _save = PyEval_SaveThread(); res = lockf(fd, cmd, len); PyEval_RestoreThread(_save); } if (res < 0) return posix_error(); return ( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++), (&_Py_NoneStruct); } static char posix_lseek__doc__[] = "lseek(fd, pos, how) -> newpos\n\nSet the current position of a file descriptor."; static PyObject * posix_lseek(PyObject *self, PyObject *args) { int fd, how; off_t pos, res; PyObject *posobj; if (!_PyArg_ParseTuple_SizeT(args, "iOi:lseek", &fd, &posobj, &how)) return ((void *)0); switch (how) { case 0: how = 0; break; case 1: how = 1; break; case 2: how = 2; break; } pos = PyLong_AsLong(posobj); if (PyErr_Occurred()) return ((void *)0); if (!(1)) return posix_error(); { PyThreadState *_save; _save = PyEval_SaveThread(); res = lseek(fd, pos, how); PyEval_RestoreThread(_save); } if (res < 0) return posix_error(); return PyLong_FromLong(res); } static char posix_read__doc__[] = "read(fd, buffersize) -> string\n\nRead a file descriptor."; static PyObject * posix_read(PyObject *self, PyObject *args) { int fd, size; Py_ssize_t n; PyObject *buffer; if (!_PyArg_ParseTuple_SizeT(args, "ii:read", &fd, &size)) return ((void *)0); if (size < 0) { (*__errno()) = 22; return posix_error(); } buffer = PyBytes_FromStringAndSize((char *)((void *)0), size); if (buffer == ((void *)0)) return ((void *)0); if (!(1)) { do { if ( --((PyObject*)(buffer))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(buffer)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(buffer)))); } while (0); return posix_error(); } { PyThreadState *_save; _save = PyEval_SaveThread(); n = read(fd, (((void)0), (((PyBytesObject *)(buffer))->ob_sval)), size); PyEval_RestoreThread(_save); } if (n < 0) { do { if ( --((PyObject*)(buffer))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(buffer)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(buffer)))); } while (0); return posix_error(); } if (n != size) _PyBytes_Resize(&buffer, n); return buffer; } static Py_ssize_t iov_setup(struct iovec **iov, Py_buffer **buf, PyObject *seq, int cnt, int type) { int i, j; Py_ssize_t blen, total = 0; *iov = ( ((size_t)(cnt) > ((Py_ssize_t)(((size_t)-1)>>1)) / sizeof(struct iovec)) ? ((void *)0) : ( (struct iovec *) PyMem_Malloc((cnt) * sizeof(struct iovec)) ) ); if (*iov == ((void *)0)) { PyErr_NoMemory(); return total; } *buf = ( ((size_t)(cnt) > ((Py_ssize_t)(((size_t)-1)>>1)) / sizeof(Py_buffer)) ? ((void *)0) : ( (Py_buffer *) PyMem_Malloc((cnt) * sizeof(Py_buffer)) ) ); if (*buf == ((void *)0)) { PyMem_Free(*iov); PyErr_NoMemory(); return total; } for (i = 0; i < cnt; i++) { PyObject *item = PySequence_GetItem(seq, i); if (item == ((void *)0)) goto fail; if (PyObject_GetBuffer(item, &(*buf)[i], type) == -1) { do { if ( --((PyObject*)(item))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(item)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(item)))); } while (0); goto fail; } do { if ( --((PyObject*)(item))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(item)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(item)))); } while (0); (*iov)[i].iov_base = (*buf)[i].buf; blen = (*buf)[i].len; (*iov)[i].iov_len = blen; total += blen; } return total; fail: PyMem_Free(*iov); for (j = 0; j < i; j++) { PyBuffer_Release(&(*buf)[j]); } PyMem_Free(*buf); return 0; } static void iov_cleanup(struct iovec *iov, Py_buffer *buf, int cnt) { int i; PyMem_Free(iov); for (i = 0; i < cnt; i++) { PyBuffer_Release(&buf[i]); } PyMem_Free(buf); } static char posix_readv__doc__[] = "readv(fd, buffers) -> bytesread\n\nRead from a file descriptor into a number of writable buffers. buffers\nis an arbitrary sequence of writable buffers.\nReturns the total number of bytes read."; static PyObject * posix_readv(PyObject *self, PyObject *args) { int fd, cnt; Py_ssize_t n; PyObject *seq; struct iovec *iov; Py_buffer *buf; if (!_PyArg_ParseTuple_SizeT(args, "iO:readv", &fd, &seq)) return ((void *)0); if (!PySequence_Check(seq)) { PyErr_SetString(PyExc_TypeError, "readv() arg 2 must be a sequence"); return ((void *)0); } cnt = PySequence_Size(seq); if (!iov_setup(&iov, &buf, seq, cnt, 0x0001)) return ((void *)0); { PyThreadState *_save; _save = PyEval_SaveThread(); n = readv(fd, iov, cnt); PyEval_RestoreThread(_save); } iov_cleanup(iov, buf, cnt); return PyLong_FromSsize_t(n); } static char posix_pread__doc__[] = "pread(fd, buffersize, offset) -> string\n\nRead from a file descriptor, fd, at a position of offset. It will read up\nto buffersize number of bytes. The file offset remains unchanged."; static PyObject * posix_pread(PyObject *self, PyObject *args) { int fd, size; off_t offset; Py_ssize_t n; PyObject *buffer; if (!_PyArg_ParseTuple_SizeT(args, "iiO&:pread", &fd, &size, _parse_off_t, &offset)) return ((void *)0); if (size < 0) { (*__errno()) = 22; return posix_error(); } buffer = PyBytes_FromStringAndSize((char *)((void *)0), size); if (buffer == ((void *)0)) return ((void *)0); if (!(1)) { do { if ( --((PyObject*)(buffer))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(buffer)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(buffer)))); } while (0); return posix_error(); } { PyThreadState *_save; _save = PyEval_SaveThread(); n = pread(fd, (((void)0), (((PyBytesObject *)(buffer))->ob_sval)), size, offset); PyEval_RestoreThread(_save); } if (n < 0) { do { if ( --((PyObject*)(buffer))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(buffer)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(buffer)))); } while (0); return posix_error(); } if (n != size) _PyBytes_Resize(&buffer, n); return buffer; } static char posix_write__doc__[] = "write(fd, string) -> byteswritten\n\nWrite a string to a file descriptor."; static PyObject * posix_write(PyObject *self, PyObject *args) { Py_buffer pbuf; int fd; Py_ssize_t size, len; if (!_PyArg_ParseTuple_SizeT(args, "iy*:write", &fd, &pbuf)) return ((void *)0); if (!(1)) { PyBuffer_Release(&pbuf); return posix_error(); } len = pbuf.len; { PyThreadState *_save; _save = PyEval_SaveThread(); size = write(fd, pbuf.buf, len); PyEval_RestoreThread(_save); } PyBuffer_Release(&pbuf); if (size < 0) return posix_error(); return PyLong_FromSsize_t(size); } # 7176 "./Modules/posixmodule.c" static char posix_fstat__doc__[] = "fstat(fd) -> stat result\n\nLike stat(), but for an open file descriptor."; static PyObject * posix_fstat(PyObject *self, PyObject *args) { int fd; struct stat st; int res; if (!_PyArg_ParseTuple_SizeT(args, "i:fstat", &fd)) return ((void *)0); if (!(1)) return posix_error(); { PyThreadState *_save; _save = PyEval_SaveThread(); res = fstat(fd, &st); PyEval_RestoreThread(_save); } if (res != 0) { return posix_error(); } return _pystat_fromstructstat(&st); } static char posix_isatty__doc__[] = "isatty(fd) -> bool\n\nReturn True if the file descriptor 'fd' is an open file descriptor\nconnected to the slave end of a terminal."; static PyObject * posix_isatty(PyObject *self, PyObject *args) { int fd; if (!_PyArg_ParseTuple_SizeT(args, "i:isatty", &fd)) return ((void *)0); if (!(1)) return PyBool_FromLong(0); return PyBool_FromLong(isatty(fd)); } static char posix_pipe__doc__[] = "pipe() -> (read_end, write_end)\n\nCreate a pipe."; static PyObject * posix_pipe(PyObject *self, PyObject *noargs) { # 7243 "./Modules/posixmodule.c" int fds[2]; int res; res = pipe(fds); if (res != 0) return posix_error(); return _Py_BuildValue_SizeT("(ii)", fds[0], fds[1]); # 7261 "./Modules/posixmodule.c" } # 7291 "./Modules/posixmodule.c" static char posix_writev__doc__[] = "writev(fd, buffers) -> byteswritten\n\nWrite the contents of buffers to a file descriptor, where buffers is an\narbitrary sequence of buffers.\nReturns the total bytes written."; static PyObject * posix_writev(PyObject *self, PyObject *args) { int fd, cnt; Py_ssize_t res; PyObject *seq; struct iovec *iov; Py_buffer *buf; if (!_PyArg_ParseTuple_SizeT(args, "iO:writev", &fd, &seq)) return ((void *)0); if (!PySequence_Check(seq)) { PyErr_SetString(PyExc_TypeError, "writev() arg 2 must be a sequence"); return ((void *)0); } cnt = PySequence_Size(seq); if (!iov_setup(&iov, &buf, seq, cnt, 0)) { return ((void *)0); } { PyThreadState *_save; _save = PyEval_SaveThread(); res = writev(fd, iov, cnt); PyEval_RestoreThread(_save); } iov_cleanup(iov, buf, cnt); return PyLong_FromSsize_t(res); } static char posix_pwrite__doc__[] = "pwrite(fd, string, offset) -> byteswritten\n\nWrite string to a file descriptor, fd, from offset, leaving the file\noffset unchanged."; static PyObject * posix_pwrite(PyObject *self, PyObject *args) { Py_buffer pbuf; int fd; off_t offset; Py_ssize_t size; if (!_PyArg_ParseTuple_SizeT(args, "iy*O&:pwrite", &fd, &pbuf, _parse_off_t, &offset)) return ((void *)0); if (!(1)) { PyBuffer_Release(&pbuf); return posix_error(); } { PyThreadState *_save; _save = PyEval_SaveThread(); size = pwrite(fd, pbuf.buf, (size_t)pbuf.len, offset); PyEval_RestoreThread(_save); } PyBuffer_Release(&pbuf); if (size < 0) return posix_error(); return PyLong_FromSsize_t(size); } static char posix_mkfifo__doc__[] = "mkfifo(filename [, mode=0666])\n\nCreate a FIFO (a POSIX named pipe)."; static PyObject * posix_mkfifo(PyObject *self, PyObject *args) { PyObject *opath; char *filename; int mode = 0666; int res; if (!_PyArg_ParseTuple_SizeT(args, "O&|i:mkfifo", PyUnicodeUCS2_FSConverter, &opath, &mode)) return ((void *)0); filename = (((void)0), (((PyBytesObject *)(opath))->ob_sval)); { PyThreadState *_save; _save = PyEval_SaveThread(); res = mkfifo(filename, mode); PyEval_RestoreThread(_save); } do { if ( --((PyObject*)(opath))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(opath)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(opath)))); } while (0); if (res < 0) return posix_error(); ( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++); return (&_Py_NoneStruct); } static char posix_mknod__doc__[] = "mknod(filename [, mode=0600, device])\n\nCreate a filesystem node (file, device special file or named pipe)\nnamed filename. mode specifies both the permissions to use and the\ntype of node to be created, being combined (bitwise OR) with one of\nS_IFREG, S_IFCHR, S_IFBLK, and S_IFIFO. For S_IFCHR and S_IFBLK,\ndevice defines the newly created device special file (probably using\nos.makedev()), otherwise it is ignored."; # 7397 "./Modules/posixmodule.c" static PyObject * posix_mknod(PyObject *self, PyObject *args) { PyObject *opath; char *filename; int mode = 0600; int device = 0; int res; if (!_PyArg_ParseTuple_SizeT(args, "O&|ii:mknod", PyUnicodeUCS2_FSConverter, &opath, &mode, &device)) return ((void *)0); filename = (((void)0), (((PyBytesObject *)(opath))->ob_sval)); { PyThreadState *_save; _save = PyEval_SaveThread(); res = mknod(filename, mode, device); PyEval_RestoreThread(_save); } do { if ( --((PyObject*)(opath))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(opath)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(opath)))); } while (0); if (res < 0) return posix_error(); ( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++); return (&_Py_NoneStruct); } static char posix_major__doc__[] = "major(device) -> major number\nExtracts a device major number from a raw device number."; static PyObject * posix_major(PyObject *self, PyObject *args) { int device; if (!_PyArg_ParseTuple_SizeT(args, "i:major", &device)) return ((void *)0); return PyLong_FromLong((long)((int32_t)(((u_int32_t)(device) >> 8) & 0xff))); } static char posix_minor__doc__[] = "minor(device) -> minor number\nExtracts a device minor number from a raw device number."; static PyObject * posix_minor(PyObject *self, PyObject *args) { int device; if (!_PyArg_ParseTuple_SizeT(args, "i:minor", &device)) return ((void *)0); return PyLong_FromLong((long)((int32_t)((device) & 0xff) | (((device) & 0xffff0000) >> 8))); } static char posix_makedev__doc__[] = "makedev(major, minor) -> device number\nComposes a raw device number from the major and minor device numbers."; static PyObject * posix_makedev(PyObject *self, PyObject *args) { int major, minor; if (!_PyArg_ParseTuple_SizeT(args, "ii:makedev", &major, &minor)) return ((void *)0); return PyLong_FromLong((long)((dev_t)((((major) & 0xff) << 8) | ((minor) & 0xff) | (((minor) & 0xffff00) << 8)))); } static char posix_ftruncate__doc__[] = "ftruncate(fd, length)\n\nTruncate a file to a specified length."; static PyObject * posix_ftruncate(PyObject *self, PyObject *args) { int fd; off_t length; int res; if (!_PyArg_ParseTuple_SizeT(args, "iO&:ftruncate", &fd, _parse_off_t, &length)) return ((void *)0); { PyThreadState *_save; _save = PyEval_SaveThread(); res = ftruncate(fd, length); PyEval_RestoreThread(_save); } if (res < 0) return posix_error(); ( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++); return (&_Py_NoneStruct); } static char posix_truncate__doc__[] = "truncate(path, length)\n\nTruncate the file given by path to length bytes."; static PyObject * posix_truncate(PyObject *self, PyObject *args) { PyObject *opath; const char *path; off_t length; int res; if (!_PyArg_ParseTuple_SizeT(args, "O&O&:truncate", PyUnicodeUCS2_FSConverter, &opath, _parse_off_t, &length)) return ((void *)0); path = PyBytes_AsString(opath); { PyThreadState *_save; _save = PyEval_SaveThread(); res = truncate(path, length); PyEval_RestoreThread(_save); } do { if ( --((PyObject*)(opath))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(opath)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(opath)))); } while (0); if (res < 0) return posix_error(); return ( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++), (&_Py_NoneStruct); } # 7575 "./Modules/posixmodule.c" static char posix_putenv__doc__[] = "putenv(key, value)\n\nChange or add an environment variable."; static PyObject *posix_putenv_garbage; static PyObject * posix_putenv(PyObject *self, PyObject *args) { PyObject *os1, *os2; char *s1, *s2; char *newenv; PyObject *newstr = ((void *)0); size_t len; if (!_PyArg_ParseTuple_SizeT(args, "O&O&:putenv", PyUnicodeUCS2_FSConverter, &os1, PyUnicodeUCS2_FSConverter, &os2)) return ((void *)0); s1 = PyBytes_AsString(os1); s2 = PyBytes_AsString(os2); # 7639 "./Modules/posixmodule.c" len = (((void)0),(((PyVarObject*)(os1))->ob_size)) + (((void)0),(((PyVarObject*)(os2))->ob_size)) + 2; newstr = PyBytes_FromStringAndSize(((void *)0), (int)len - 1); if (newstr == ((void *)0)) { PyErr_NoMemory(); goto error; } # 7654 "./Modules/posixmodule.c" newenv = (((void)0), (((PyBytesObject *)(newstr))->ob_sval)); PyOS_snprintf(newenv, len, "%s=%s", s1, s2); if (putenv(newenv)) { posix_error(); goto error; } if (PyDict_SetItem(posix_putenv_garbage, os1, newstr)) { PyErr_Clear(); } else { do { if ( --((PyObject*)(newstr))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(newstr)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(newstr)))); } while (0); } do { if ( --((PyObject*)(os1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(os1)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(os1)))); } while (0); do { if ( --((PyObject*)(os2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(os2)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(os2)))); } while (0); return ( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++), (&_Py_NoneStruct); error: do { if ( --((PyObject*)(os1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(os1)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(os1)))); } while (0); do { if ( --((PyObject*)(os2))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(os2)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(os2)))); } while (0); do { if ((newstr) == ((void *)0)) ; else do { if ( --((PyObject*)(newstr))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(newstr)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(newstr)))); } while (0); } while (0); return ((void *)0); } static char posix_unsetenv__doc__[] = "unsetenv(key)\n\nDelete an environment variable."; static PyObject * posix_unsetenv(PyObject *self, PyObject *args) { PyObject *os1; char *s1; if (!_PyArg_ParseTuple_SizeT(args, "O&:unsetenv", PyUnicodeUCS2_FSConverter, &os1)) return ((void *)0); s1 = PyBytes_AsString(os1); unsetenv(s1); if (PyDict_DelItem(posix_putenv_garbage, os1 )) { PyErr_Clear(); } do { if ( --((PyObject*)(os1))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(os1)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(os1)))); } while (0); return ( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++), (&_Py_NoneStruct); } static char posix_strerror__doc__[] = "strerror(code) -> string\n\nTranslate an error code to a message string."; static PyObject * posix_strerror(PyObject *self, PyObject *args) { int code; char *message; if (!_PyArg_ParseTuple_SizeT(args, "i:strerror", &code)) return ((void *)0); message = strerror(code); if (message == ((void *)0)) { PyErr_SetString(PyExc_ValueError, "strerror() argument out of range"); return ((void *)0); } return PyUnicodeUCS2_FromString(message); } static char posix_WCOREDUMP__doc__[] = "WCOREDUMP(status) -> bool\n\nReturn True if the process returning 'status' was dumped to a core file."; static PyObject * posix_WCOREDUMP(PyObject *self, PyObject *args) { int status; (status) = 0; if (!_PyArg_ParseTuple_SizeT(args, "i:WCOREDUMP", &(status))) return ((void *)0); return PyBool_FromLong(((*(int *)&(status)) & 0200)); } static char posix_WIFCONTINUED__doc__[] = "WIFCONTINUED(status) -> bool\n\nReturn True if the process returning 'status' was continued from a\njob control stop."; static PyObject * posix_WIFCONTINUED(PyObject *self, PyObject *args) { int status; (status) = 0; if (!_PyArg_ParseTuple_SizeT(args, "i:WCONTINUED", &(status))) return ((void *)0); return PyBool_FromLong((((*(int *)&(status)) & 0177777) == 0177777)); } static char posix_WIFSTOPPED__doc__[] = "WIFSTOPPED(status) -> bool\n\nReturn True if the process returning 'status' was stopped."; static PyObject * posix_WIFSTOPPED(PyObject *self, PyObject *args) { int status; (status) = 0; if (!_PyArg_ParseTuple_SizeT(args, "i:WIFSTOPPED", &(status))) return ((void *)0); return PyBool_FromLong((((*(int *)&(status)) & 0xff) == 0177)); } static char posix_WIFSIGNALED__doc__[] = "WIFSIGNALED(status) -> bool\n\nReturn True if the process returning 'status' was terminated by a signal."; static PyObject * posix_WIFSIGNALED(PyObject *self, PyObject *args) { int status; (status) = 0; if (!_PyArg_ParseTuple_SizeT(args, "i:WIFSIGNALED", &(status))) return ((void *)0); return PyBool_FromLong((((*(int *)&(status)) & 0177) != 0177 && ((*(int *)&(status)) & 0177) != 0)); } static char posix_WIFEXITED__doc__[] = "WIFEXITED(status) -> bool\n\nReturn true if the process returning 'status' exited using the exit()\nsystem call."; static PyObject * posix_WIFEXITED(PyObject *self, PyObject *args) { int status; (status) = 0; if (!_PyArg_ParseTuple_SizeT(args, "i:WIFEXITED", &(status))) return ((void *)0); return PyBool_FromLong((((*(int *)&(status)) & 0177) == 0)); } static char posix_WEXITSTATUS__doc__[] = "WEXITSTATUS(status) -> integer\n\nReturn the process return code from 'status'."; static PyObject * posix_WEXITSTATUS(PyObject *self, PyObject *args) { int status; (status) = 0; if (!_PyArg_ParseTuple_SizeT(args, "i:WEXITSTATUS", &(status))) return ((void *)0); return _Py_BuildValue_SizeT("i", (int)(((unsigned)(*(int *)&(status)) >> 8) & 0xff)); } static char posix_WTERMSIG__doc__[] = "WTERMSIG(status) -> integer\n\nReturn the signal that terminated the process that provided the 'status'\nvalue."; static PyObject * posix_WTERMSIG(PyObject *self, PyObject *args) { int status; (status) = 0; if (!_PyArg_ParseTuple_SizeT(args, "i:WTERMSIG", &(status))) return ((void *)0); return _Py_BuildValue_SizeT("i", (((*(int *)&(status)) & 0177))); } static char posix_WSTOPSIG__doc__[] = "WSTOPSIG(status) -> integer\n\nReturn the signal that stopped the process that provided\nthe 'status' value."; static PyObject * posix_WSTOPSIG(PyObject *self, PyObject *args) { int status; (status) = 0; if (!_PyArg_ParseTuple_SizeT(args, "i:WSTOPSIG", &(status))) return ((void *)0); return _Py_BuildValue_SizeT("i", (int)(((unsigned)(*(int *)&(status)) >> 8) & 0xff)); } # 7928 "./Modules/posixmodule.c" # 1 "/usr/include/sys/statvfs.h" 1 3 4 # 24 "/usr/include/sys/statvfs.h" 3 4 struct statvfs { unsigned long f_bsize; unsigned long f_frsize; fsblkcnt_t f_blocks; fsblkcnt_t f_bfree; fsblkcnt_t f_bavail; fsfilcnt_t f_files; fsfilcnt_t f_ffree; fsfilcnt_t f_favail; unsigned long f_fsid; unsigned long f_flag; unsigned long f_namemax; }; int fstatvfs(int, struct statvfs *); int statvfs(const char *, struct statvfs *); # 7929 "./Modules/posixmodule.c" 2 static PyObject* _pystatvfs_fromstructstatvfs(struct statvfs st) { PyObject *v = PyStructSequence_New(&StatVFSResultType); if (v == ((void *)0)) return ((void *)0); (((PyTupleObject *)(v))->ob_item[0] = PyLong_FromLong((long) st.f_bsize)); (((PyTupleObject *)(v))->ob_item[1] = PyLong_FromLong((long) st.f_frsize)); (((PyTupleObject *)(v))->ob_item[2] = PyLong_FromLong((long) st.f_blocks)); (((PyTupleObject *)(v))->ob_item[3] = PyLong_FromLong((long) st.f_bfree)); (((PyTupleObject *)(v))->ob_item[4] = PyLong_FromLong((long) st.f_bavail)); (((PyTupleObject *)(v))->ob_item[5] = PyLong_FromLong((long) st.f_files)); (((PyTupleObject *)(v))->ob_item[6] = PyLong_FromLong((long) st.f_ffree)); (((PyTupleObject *)(v))->ob_item[7] = PyLong_FromLong((long) st.f_favail)); (((PyTupleObject *)(v))->ob_item[8] = PyLong_FromLong((long) st.f_flag)); (((PyTupleObject *)(v))->ob_item[9] = PyLong_FromLong((long) st.f_namemax)); # 7966 "./Modules/posixmodule.c" return v; } static char posix_fstatvfs__doc__[] = "fstatvfs(fd) -> statvfs result\n\nPerform an fstatvfs system call on the given fd."; static PyObject * posix_fstatvfs(PyObject *self, PyObject *args) { int fd, res; struct statvfs st; if (!_PyArg_ParseTuple_SizeT(args, "i:fstatvfs", &fd)) return ((void *)0); { PyThreadState *_save; _save = PyEval_SaveThread(); res = fstatvfs(fd, &st); PyEval_RestoreThread(_save); } if (res != 0) return posix_error(); return _pystatvfs_fromstructstatvfs(st); } static char posix_statvfs__doc__[] = "statvfs(path) -> statvfs result\n\nPerform a statvfs system call on the given path."; static PyObject * posix_statvfs(PyObject *self, PyObject *args) { char *path; int res; struct statvfs st; if (!_PyArg_ParseTuple_SizeT(args, "s:statvfs", &path)) return ((void *)0); { PyThreadState *_save; _save = PyEval_SaveThread(); res = statvfs(path, &st); PyEval_RestoreThread(_save); } if (res != 0) return posix_error_with_filename(path); return _pystatvfs_fromstructstatvfs(st); } # 8054 "./Modules/posixmodule.c" struct constdef { char *name; long value; }; static int conv_confname(PyObject *arg, int *valuep, struct constdef *table, size_t tablesize) { if (((((((PyObject*)(arg))->ob_type))->tp_flags & ((1L<<24))) != 0)) { *valuep = PyLong_AsLong(arg); return 1; } else { size_t lo = 0; size_t mid; size_t hi = tablesize; int cmp; const char *confname; if (!((((((PyObject*)(arg))->ob_type))->tp_flags & ((1L<<28))) != 0)) { PyErr_SetString(PyExc_TypeError, "configuration names must be strings or integers"); return 0; } confname = _PyUnicode_AsString(arg); if (confname == ((void *)0)) return 0; while (lo < hi) { mid = (lo + hi) / 2; cmp = strcmp(confname, table[mid].name); if (cmp < 0) hi = mid; else if (cmp > 0) lo = mid + 1; else { *valuep = table[mid].value; return 1; } } PyErr_SetString(PyExc_ValueError, "unrecognized configuration name"); return 0; } } static struct constdef posix_constants_pathconf[] = { # 8112 "./Modules/posixmodule.c" {"PC_CHOWN_RESTRICTED", 7}, # 8121 "./Modules/posixmodule.c" {"PC_LINK_MAX", 1}, {"PC_MAX_CANON", 2}, {"PC_MAX_INPUT", 3}, {"PC_NAME_MAX", 4}, {"PC_NO_TRUNC", 8}, {"PC_PATH_MAX", 5}, {"PC_PIPE_BUF", 6}, # 8151 "./Modules/posixmodule.c" {"PC_VDISABLE", 9}, # 8186 "./Modules/posixmodule.c" }; static int conv_path_confname(PyObject *arg, int *valuep) { return conv_confname(arg, valuep, posix_constants_pathconf, sizeof(posix_constants_pathconf) / sizeof(struct constdef)); } static char posix_fpathconf__doc__[] = "fpathconf(fd, name) -> integer\n\nReturn the configuration limit name for the file descriptor fd.\nIf there is no limit, return -1."; static PyObject * posix_fpathconf(PyObject *self, PyObject *args) { PyObject *result = ((void *)0); int name, fd; if (_PyArg_ParseTuple_SizeT(args, "iO&:fpathconf", &fd, conv_path_confname, &name)) { long limit; (*__errno()) = 0; limit = fpathconf(fd, name); if (limit == -1 && (*__errno()) != 0) posix_error(); else result = PyLong_FromLong(limit); } return result; } static char posix_pathconf__doc__[] = "pathconf(path, name) -> integer\n\nReturn the configuration limit name for the file or directory path.\nIf there is no limit, return -1."; static PyObject * posix_pathconf(PyObject *self, PyObject *args) { PyObject *result = ((void *)0); int name; char *path; if (_PyArg_ParseTuple_SizeT(args, "sO&:pathconf", &path, conv_path_confname, &name)) { long limit; (*__errno()) = 0; limit = pathconf(path, name); if (limit == -1 && (*__errno()) != 0) { if ((*__errno()) == 22) posix_error(); else posix_error_with_filename(path); } else result = PyLong_FromLong(limit); } return result; } static struct constdef posix_constants_confstr[] = { # 8309 "./Modules/posixmodule.c" {"CS_PATH", 1}, # 8410 "./Modules/posixmodule.c" }; static int conv_confstr_confname(PyObject *arg, int *valuep) { return conv_confname(arg, valuep, posix_constants_confstr, sizeof(posix_constants_confstr) / sizeof(struct constdef)); } static char posix_confstr__doc__[] = "confstr(name) -> string\n\nReturn a string-valued system configuration variable."; static PyObject * posix_confstr(PyObject *self, PyObject *args) { PyObject *result = ((void *)0); int name; char buffer[255]; int len; if (!_PyArg_ParseTuple_SizeT(args, "O&:confstr", conv_confstr_confname, &name)) return ((void *)0); (*__errno()) = 0; len = confstr(name, buffer, sizeof(buffer)); if (len == 0) { if ((*__errno())) { posix_error(); return ((void *)0); } else { return ( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++), (&_Py_NoneStruct); } } if ((unsigned int)len >= sizeof(buffer)) { char *buf = PyMem_Malloc(len); if (buf == ((void *)0)) return PyErr_NoMemory(); confstr(name, buf, len); result = PyUnicodeUCS2_DecodeFSDefaultAndSize(buf, len-1); PyMem_Free(buf); } else result = PyUnicodeUCS2_DecodeFSDefaultAndSize(buffer, len-1); return result; } static struct constdef posix_constants_sysconf[] = { {"SC_2_CHAR_TERM", 20}, {"SC_2_C_BIND", 18}, {"SC_2_C_DEV", 19}, {"SC_2_FORT_DEV", 21}, {"SC_2_FORT_RUN", 22}, {"SC_2_LOCALEDEF", 23}, {"SC_2_SW_DEV", 24}, {"SC_2_UPE", 25}, {"SC_2_VERSION", 17}, # 8510 "./Modules/posixmodule.c" {"SC_ARG_MAX", 1}, # 8522 "./Modules/posixmodule.c" {"SC_AVPHYS_PAGES", 501}, {"SC_BC_BASE_MAX", 9}, {"SC_BC_DIM_MAX", 10}, {"SC_BC_SCALE_MAX", 11}, {"SC_BC_STRING_MAX", 12}, # 8552 "./Modules/posixmodule.c" {"SC_CHILD_MAX", 2}, {"SC_CLK_TCK", 3}, {"SC_COLL_WEIGHTS_MAX", 13}, # 8585 "./Modules/posixmodule.c" {"SC_EXPR_NEST_MAX", 14}, {"SC_FSYNC", 29}, {"SC_GETGR_R_SIZE_MAX", 100}, {"SC_GETPW_R_SIZE_MAX", 101}, # 8624 "./Modules/posixmodule.c" {"SC_JOB_CONTROL", 6}, # 8633 "./Modules/posixmodule.c" {"SC_LINE_MAX", 15}, {"SC_LOGIN_NAME_MAX", 102}, # 8681 "./Modules/posixmodule.c" {"SC_NGROUPS_MAX", 4}, # 8702 "./Modules/posixmodule.c" {"SC_NPROCESSORS_CONF", 502}, {"SC_NPROCESSORS_ONLN", 503}, # 8717 "./Modules/posixmodule.c" {"SC_OPEN_MAX", 5}, {"SC_PAGESIZE", 28}, {"SC_PAGE_SIZE", 28}, {"SC_PHYS_PAGES", 500}, # 8774 "./Modules/posixmodule.c" {"SC_RE_DUP_MAX", 16}, {"SC_SAVED_IDS", 7}, # 8795 "./Modules/posixmodule.c" {"SC_SEM_NSEMS_MAX", 31}, {"SC_SEM_VALUE_MAX", 32}, # 8831 "./Modules/posixmodule.c" {"SC_STREAM_MAX", 26}, # 8864 "./Modules/posixmodule.c" {"SC_THREAD_SAFE_FUNCTIONS", 103}, # 8882 "./Modules/posixmodule.c" {"SC_TZNAME_MAX", 27}, # 8903 "./Modules/posixmodule.c" {"SC_VERSION", 8}, # 8936 "./Modules/posixmodule.c" {"SC_XOPEN_SHM", 30}, # 8956 "./Modules/posixmodule.c" }; static int conv_sysconf_confname(PyObject *arg, int *valuep) { return conv_confname(arg, valuep, posix_constants_sysconf, sizeof(posix_constants_sysconf) / sizeof(struct constdef)); } static char posix_sysconf__doc__[] = "sysconf(name) -> integer\n\nReturn an integer-valued system configuration variable."; static PyObject * posix_sysconf(PyObject *self, PyObject *args) { PyObject *result = ((void *)0); int name; if (_PyArg_ParseTuple_SizeT(args, "O&:sysconf", conv_sysconf_confname, &name)) { int value; (*__errno()) = 0; value = sysconf(name); if (value == -1 && (*__errno()) != 0) posix_error(); else result = PyLong_FromLong(value); } return result; } # 9001 "./Modules/posixmodule.c" static int cmp_constdefs(const void *v1, const void *v2) { const struct constdef *c1 = (const struct constdef *) v1; const struct constdef *c2 = (const struct constdef *) v2; return strcmp(c1->name, c2->name); } static int setup_confname_table(struct constdef *table, size_t tablesize, char *tablename, PyObject *module) { PyObject *d = ((void *)0); size_t i; qsort(table, tablesize, sizeof(struct constdef), cmp_constdefs); d = PyDict_New(); if (d == ((void *)0)) return -1; for (i=0; i < tablesize; ++i) { PyObject *o = PyLong_FromLong(table[i].value); if (o == ((void *)0) || PyDict_SetItemString(d, table[i].name, o) == -1) { do { if ((o) == ((void *)0)) ; else do { if ( --((PyObject*)(o))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(o)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(o)))); } while (0); } while (0); do { if ( --((PyObject*)(d))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(d)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(d)))); } while (0); return -1; } do { if ( --((PyObject*)(o))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(o)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(o)))); } while (0); } return PyModule_AddObject(module, tablename, d); } static int setup_confname_tables(PyObject *module) { if (setup_confname_table(posix_constants_pathconf, sizeof(posix_constants_pathconf) / sizeof(struct constdef), "pathconf_names", module)) return -1; if (setup_confname_table(posix_constants_confstr, sizeof(posix_constants_confstr) / sizeof(struct constdef), "confstr_names", module)) return -1; if (setup_confname_table(posix_constants_sysconf, sizeof(posix_constants_sysconf) / sizeof(struct constdef), "sysconf_names", module)) return -1; return 0; } static char posix_abort__doc__[] = "abort() -> does not return!\n\nAbort the interpreter immediately. This 'dumps core' or otherwise fails\nin the hardest way possible on the hosting operating system."; static PyObject * posix_abort(PyObject *self, PyObject *noargs) { abort(); Py_FatalError("abort() called from Python code didn't abort!"); return ((void *)0); } # 9161 "./Modules/posixmodule.c" static char posix_getloadavg__doc__[] = "getloadavg() -> (float, float, float)\n\nReturn the number of processes in the system run queue averaged over\nthe last 1, 5, and 15 minutes or raises OSError if the load average\nwas unobtainable"; static PyObject * posix_getloadavg(PyObject *self, PyObject *noargs) { double loadavg[3]; if (getloadavg(loadavg, 3)!=3) { PyErr_SetString(PyExc_OSError, "Load averages are unobtainable"); return ((void *)0); } else return _Py_BuildValue_SizeT("ddd", loadavg[0], loadavg[1], loadavg[2]); } # 9255 "./Modules/posixmodule.c" static char device_encoding__doc__[] = "device_encoding(fd) -> str\n\nReturn a string describing the encoding of the device\nif the output is a terminal; else return None."; static PyObject * device_encoding(PyObject *self, PyObject *args) { int fd; if (!_PyArg_ParseTuple_SizeT(args, "i:device_encoding", &fd)) return ((void *)0); if (!(1) || !isatty(fd)) { ( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++); return (&_Py_NoneStruct); } # 9285 "./Modules/posixmodule.c" { char *codeset = nl_langinfo(51); if (codeset != ((void *)0) && codeset[0] != 0) return PyUnicodeUCS2_FromString(codeset); } ( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++); return (&_Py_NoneStruct); } # 9332 "./Modules/posixmodule.c" static char posix_setresuid__doc__[] = "setresuid(ruid, euid, suid)\n\nSet the current process's real, effective, and saved user ids."; static PyObject* posix_setresuid (PyObject *self, PyObject *args) { long ruid, euid, suid; if (!_PyArg_ParseTuple_SizeT(args, "lll", &ruid, &euid, &suid)) return ((void *)0); if (setresuid(ruid, euid, suid) < 0) return posix_error(); return ( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++), (&_Py_NoneStruct); } static char posix_setresgid__doc__[] = "setresgid(rgid, egid, sgid)\n\nSet the current process's real, effective, and saved group ids."; static PyObject* posix_setresgid (PyObject *self, PyObject *args) { long rgid, egid, sgid; if (!_PyArg_ParseTuple_SizeT(args, "lll", &rgid, &egid, &sgid)) return ((void *)0); if (setresgid(rgid, egid, sgid) < 0) return posix_error(); return ( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++), (&_Py_NoneStruct); } static char posix_getresuid__doc__[] = "getresuid() -> (ruid, euid, suid)\n\nGet tuple of the current process's real, effective, and saved user ids."; static PyObject* posix_getresuid (PyObject *self, PyObject *noargs) { uid_t ruid, euid, suid; long l_ruid, l_euid, l_suid; if (getresuid(&ruid, &euid, &suid) < 0) return posix_error(); l_ruid = ruid; l_euid = euid; l_suid = suid; return _Py_BuildValue_SizeT("(lll)", l_ruid, l_euid, l_suid); } static char posix_getresgid__doc__[] = "getresgid() -> (rgid, egid, sgid)\n\nGet tuple of the current process's real, effective, and saved group ids."; static PyObject* posix_getresgid (PyObject *self, PyObject *noargs) { uid_t rgid, egid, sgid; long l_rgid, l_egid, l_sgid; if (getresgid(&rgid, &egid, &sgid) < 0) return posix_error(); l_rgid = rgid; l_egid = egid; l_sgid = sgid; return _Py_BuildValue_SizeT("(lll)", l_rgid, l_egid, l_sgid); } # 9413 "./Modules/posixmodule.c" static char posix_faccessat__doc__[] = "faccessat(dirfd, path, mode, flags=0) -> True if granted, False otherwise\n\nLike access() but if path is relative, it is taken as relative to dirfd.\nflags is optional and can be constructed by ORing together zero or more\nof these values: AT_SYMLINK_NOFOLLOW, AT_EACCESS.\nIf path is relative and dirfd is the special value AT_FDCWD, then path\nis interpreted relative to the current working directory."; static PyObject * posix_faccessat(PyObject *self, PyObject *args) { PyObject *opath; char *path; int mode; int res; int dirfd, flags = 0; if (!_PyArg_ParseTuple_SizeT(args, "iO&i|i:faccessat", &dirfd, PyUnicodeUCS2_FSConverter, &opath, &mode, &flags)) return ((void *)0); path = PyBytes_AsString(opath); { PyThreadState *_save; _save = PyEval_SaveThread(); res = faccessat(dirfd, path, mode, flags); PyEval_RestoreThread(_save); } do { if ( --((PyObject*)(opath))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(opath)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(opath)))); } while (0); return PyBool_FromLong(res == 0); } static char posix_fchmodat__doc__[] = "fchmodat(dirfd, path, mode, flags=0)\n\nLike chmod() but if path is relative, it is taken as relative to dirfd.\nflags is optional and may be 0 or AT_SYMLINK_NOFOLLOW.\nIf path is relative and dirfd is the special value AT_FDCWD, then path\nis interpreted relative to the current working directory."; static PyObject * posix_fchmodat(PyObject *self, PyObject *args) { int dirfd, mode, res; int flags = 0; PyObject *opath; char *path; if (!_PyArg_ParseTuple_SizeT(args, "iO&i|i:fchmodat", &dirfd, PyUnicodeUCS2_FSConverter, &opath, &mode, &flags)) return ((void *)0); path = PyBytes_AsString(opath); { PyThreadState *_save; _save = PyEval_SaveThread(); res = fchmodat(dirfd, path, mode, flags); PyEval_RestoreThread(_save); } do { if ( --((PyObject*)(opath))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(opath)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(opath)))); } while (0); if (res < 0) return posix_error(); return ( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++), (&_Py_NoneStruct); } static char posix_fchownat__doc__[] = "fchownat(dirfd, path, uid, gid, flags=0)\n\nLike chown() but if path is relative, it is taken as relative to dirfd.\nflags is optional and may be 0 or AT_SYMLINK_NOFOLLOW.\nIf path is relative and dirfd is the special value AT_FDCWD, then path\nis interpreted relative to the current working directory."; static PyObject * posix_fchownat(PyObject *self, PyObject *args) { PyObject *opath; int dirfd, res; long uid, gid; int flags = 0; char *path; if (!_PyArg_ParseTuple_SizeT(args, "iO&ll|i:fchownat", &dirfd, PyUnicodeUCS2_FSConverter, &opath, &uid, &gid, &flags)) return ((void *)0); path = PyBytes_AsString(opath); { PyThreadState *_save; _save = PyEval_SaveThread(); res = fchownat(dirfd, path, (uid_t) uid, (gid_t) gid, flags); PyEval_RestoreThread(_save); } do { if ( --((PyObject*)(opath))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(opath)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(opath)))); } while (0); if (res < 0) return posix_error(); return ( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++), (&_Py_NoneStruct); } static char posix_fstatat__doc__[] = "fstatat(dirfd, path, flags=0) -> stat result\n\nLike stat() but if path is relative, it is taken as relative to dirfd.\nflags is optional and may be 0 or AT_SYMLINK_NOFOLLOW.\nIf path is relative and dirfd is the special value AT_FDCWD, then path\nis interpreted relative to the current working directory."; static PyObject * posix_fstatat(PyObject *self, PyObject *args) { PyObject *opath; char *path; struct stat st; int dirfd, res, flags = 0; if (!_PyArg_ParseTuple_SizeT(args, "iO&|i:fstatat", &dirfd, PyUnicodeUCS2_FSConverter, &opath, &flags)) return ((void *)0); path = PyBytes_AsString(opath); { PyThreadState *_save; _save = PyEval_SaveThread(); res = fstatat(dirfd, path, &st, flags); PyEval_RestoreThread(_save); } do { if ( --((PyObject*)(opath))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(opath)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(opath)))); } while (0); if (res != 0) return posix_error(); return _pystat_fromstructstat(&st); } # 9596 "./Modules/posixmodule.c" static char posix_linkat__doc__[] = "linkat(srcfd, srcpath, dstfd, dstpath, flags=0)\n\nLike link() but if srcpath is relative, it is taken as relative to srcfd\nand if dstpath is relative, it is taken as relative to dstfd.\nflags is optional and may be 0 or AT_SYMLINK_FOLLOW.\nIf srcpath is relative and srcfd is the special value AT_FDCWD, then\nsrcpath is interpreted relative to the current working directory. This\nalso applies for dstpath."; # 9605 "./Modules/posixmodule.c" static PyObject * posix_linkat(PyObject *self, PyObject *args) { PyObject *osrc, *odst; char *src, *dst; int res, srcfd, dstfd; int flags = 0; if (!_PyArg_ParseTuple_SizeT(args, "iO&iO&|i:linkat", &srcfd, PyUnicodeUCS2_FSConverter, &osrc, &dstfd, PyUnicodeUCS2_FSConverter, &odst, &flags)) return ((void *)0); src = PyBytes_AsString(osrc); dst = PyBytes_AsString(odst); { PyThreadState *_save; _save = PyEval_SaveThread(); res = linkat(srcfd, src, dstfd, dst, flags); PyEval_RestoreThread(_save); } do { if ( --((PyObject*)(osrc))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(osrc)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(osrc)))); } while (0); do { if ( --((PyObject*)(odst))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(odst)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(odst)))); } while (0); if (res < 0) return posix_error(); return ( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++), (&_Py_NoneStruct); } static char posix_mkdirat__doc__[] = "mkdirat(dirfd, path, mode=0o777)\n\nLike mkdir() but if path is relative, it is taken as relative to dirfd.\nIf path is relative and dirfd is the special value AT_FDCWD, then path\nis interpreted relative to the current working directory."; static PyObject * posix_mkdirat(PyObject *self, PyObject *args) { int res, dirfd; PyObject *opath; char *path; int mode = 0777; if (!_PyArg_ParseTuple_SizeT(args, "iO&|i:mkdirat", &dirfd, PyUnicodeUCS2_FSConverter, &opath, &mode)) return ((void *)0); path = PyBytes_AsString(opath); { PyThreadState *_save; _save = PyEval_SaveThread(); res = mkdirat(dirfd, path, mode); PyEval_RestoreThread(_save); } do { if ( --((PyObject*)(opath))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(opath)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(opath)))); } while (0); if (res < 0) return posix_error(); return ( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++), (&_Py_NoneStruct); } static char posix_mknodat__doc__[] = "mknodat(dirfd, path, mode=0o600, device=0)\n\nLike mknod() but if path is relative, it is taken as relative to dirfd.\nIf path is relative and dirfd is the special value AT_FDCWD, then path\nis interpreted relative to the current working directory."; static PyObject * posix_mknodat(PyObject *self, PyObject *args) { PyObject *opath; char *filename; int mode = 0600; int device = 0; int res, dirfd; if (!_PyArg_ParseTuple_SizeT(args, "iO&|ii:mknodat", &dirfd, PyUnicodeUCS2_FSConverter, &opath, &mode, &device)) return ((void *)0); filename = (((void)0), (((PyBytesObject *)(opath))->ob_sval)); { PyThreadState *_save; _save = PyEval_SaveThread(); res = mknodat(dirfd, filename, mode, device); PyEval_RestoreThread(_save); } do { if ( --((PyObject*)(opath))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(opath)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(opath)))); } while (0); if (res < 0) return posix_error(); return ( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++), (&_Py_NoneStruct); } static char posix_openat__doc__[] = "openat(dirfd, path, flag, mode=0o777) -> fd\n\nLike open() but if path is relative, it is taken as relative to dirfd.\nIf path is relative and dirfd is the special value AT_FDCWD, then path\nis interpreted relative to the current working directory."; static PyObject * posix_openat(PyObject *self, PyObject *args) { PyObject *ofile; char *file; int flag, dirfd, fd; int mode = 0777; if (!_PyArg_ParseTuple_SizeT(args, "iO&i|i:openat", &dirfd, PyUnicodeUCS2_FSConverter, &ofile, &flag, &mode)) return ((void *)0); file = PyBytes_AsString(ofile); { PyThreadState *_save; _save = PyEval_SaveThread(); fd = openat(dirfd, file, flag, mode); PyEval_RestoreThread(_save); } do { if ( --((PyObject*)(ofile))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(ofile)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(ofile)))); } while (0); if (fd < 0) return posix_error(); return PyLong_FromLong((long)fd); } static char posix_readlinkat__doc__[] = "readlinkat(dirfd, path) -> path\n\nLike readlink() but if path is relative, it is taken as relative to dirfd.\nIf path is relative and dirfd is the special value AT_FDCWD, then path\nis interpreted relative to the current working directory."; static PyObject * posix_readlinkat(PyObject *self, PyObject *args) { PyObject *v, *opath; char buf[1024]; char *path; int n, dirfd; int arg_is_unicode = 0; if (!_PyArg_ParseTuple_SizeT(args, "iO&:readlinkat", &dirfd, PyUnicodeUCS2_FSConverter, &opath)) return ((void *)0); path = PyBytes_AsString(opath); v = PySequence_GetItem(args, 1); if (v == ((void *)0)) { do { if ( --((PyObject*)(opath))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(opath)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(opath)))); } while (0); return ((void *)0); } if (((((((PyObject*)(v))->ob_type))->tp_flags & ((1L<<28))) != 0)) { arg_is_unicode = 1; } do { if ( --((PyObject*)(v))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(v)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(v)))); } while (0); { PyThreadState *_save; _save = PyEval_SaveThread(); n = readlinkat(dirfd, path, buf, (int) sizeof buf); PyEval_RestoreThread(_save); } do { if ( --((PyObject*)(opath))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(opath)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(opath)))); } while (0); if (n < 0) return posix_error(); if (arg_is_unicode) return PyUnicodeUCS2_DecodeFSDefaultAndSize(buf, n); else return PyBytes_FromStringAndSize(buf, n); } static char posix_renameat__doc__[] = "renameat(olddirfd, oldpath, newdirfd, newpath)\n\nLike rename() but if oldpath is relative, it is taken as relative to\nolddirfd and if newpath is relative, it is taken as relative to newdirfd.\nIf oldpath is relative and olddirfd is the special value AT_FDCWD, then\noldpath is interpreted relative to the current working directory. This\nalso applies for newpath."; static PyObject * posix_renameat(PyObject *self, PyObject *args) { int res; PyObject *opathold, *opathnew; char *opath, *npath; int oldfd, newfd; if (!_PyArg_ParseTuple_SizeT(args, "iO&iO&:renameat", &oldfd, PyUnicodeUCS2_FSConverter, &opathold, &newfd, PyUnicodeUCS2_FSConverter, &opathnew)) return ((void *)0); opath = PyBytes_AsString(opathold); npath = PyBytes_AsString(opathnew); { PyThreadState *_save; _save = PyEval_SaveThread(); res = renameat(oldfd, opath, newfd, npath); PyEval_RestoreThread(_save); } do { if ( --((PyObject*)(opathold))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(opathold)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(opathold)))); } while (0); do { if ( --((PyObject*)(opathnew))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(opathnew)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(opathnew)))); } while (0); if (res < 0) return posix_error(); return ( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++), (&_Py_NoneStruct); } static char posix_symlinkat__doc__[] = "symlinkat(src, dstfd, dst)\n\nLike symlink() but if dst is relative, it is taken as relative to dstfd.\nIf dst is relative and dstfd is the special value AT_FDCWD, then dst\nis interpreted relative to the current working directory."; static PyObject * posix_symlinkat(PyObject *self, PyObject *args) { int res, dstfd; PyObject *osrc, *odst; char *src, *dst; if (!_PyArg_ParseTuple_SizeT(args, "O&iO&:symlinkat", PyUnicodeUCS2_FSConverter, &osrc, &dstfd, PyUnicodeUCS2_FSConverter, &odst)) return ((void *)0); src = PyBytes_AsString(osrc); dst = PyBytes_AsString(odst); { PyThreadState *_save; _save = PyEval_SaveThread(); res = symlinkat(src, dstfd, dst); PyEval_RestoreThread(_save); } do { if ( --((PyObject*)(osrc))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(osrc)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(osrc)))); } while (0); do { if ( --((PyObject*)(odst))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(odst)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(odst)))); } while (0); if (res < 0) return posix_error(); return ( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++), (&_Py_NoneStruct); } static char posix_unlinkat__doc__[] = "unlinkat(dirfd, path, flags=0)\n\nLike unlink() but if path is relative, it is taken as relative to dirfd.\nflags is optional and may be 0 or AT_REMOVEDIR. If AT_REMOVEDIR is\nspecified, unlinkat() behaves like rmdir().\nIf path is relative and dirfd is the special value AT_FDCWD, then path\nis interpreted relative to the current working directory."; static PyObject * posix_unlinkat(PyObject *self, PyObject *args) { int dirfd, res, flags = 0; PyObject *opath; char *path; if (!_PyArg_ParseTuple_SizeT(args, "iO&|i:unlinkat", &dirfd, PyUnicodeUCS2_FSConverter, &opath, &flags)) return ((void *)0); path = PyBytes_AsString(opath); { PyThreadState *_save; _save = PyEval_SaveThread(); res = unlinkat(dirfd, path, flags); PyEval_RestoreThread(_save); } do { if ( --((PyObject*)(opath))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(opath)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(opath)))); } while (0); if (res < 0) return posix_error(); return ( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++), (&_Py_NoneStruct); } static char posix_utimensat__doc__[] = "utimensat(dirfd, path, (atime_sec, atime_nsec),\n (mtime_sec, mtime_nsec), flags)\nutimensat(dirfd, path, None, None, flags)\n\nUpdates the timestamps of a file with nanosecond precision. If path is\nrelative, it is taken as relative to dirfd.\nThe second form sets atime and mtime to the current time.\nflags is optional and may be 0 or AT_SYMLINK_NOFOLLOW.\nIf path is relative and dirfd is the special value AT_FDCWD, then path\nis interpreted relative to the current working directory.\nIf *_nsec is specified as UTIME_NOW, the timestamp is updated to the\ncurrent time.\nIf *_nsec is specified as UTIME_OMIT, the timestamp is not updated."; # 9870 "./Modules/posixmodule.c" static PyObject * posix_utimensat(PyObject *self, PyObject *args) { PyObject *opath; char *path; int res, dirfd, flags = 0; PyObject *atime, *mtime; struct timespec buf[2]; if (!_PyArg_ParseTuple_SizeT(args, "iO&OO|i:utimensat", &dirfd, PyUnicodeUCS2_FSConverter, &opath, &atime, &mtime, &flags)) return ((void *)0); path = PyBytes_AsString(opath); if (atime == (&_Py_NoneStruct) && mtime == (&_Py_NoneStruct)) { { PyThreadState *_save; _save = PyEval_SaveThread(); res = utimensat(dirfd, path, ((void *)0), flags); PyEval_RestoreThread(_save); } } else if (!((((((PyObject*)(atime))->ob_type))->tp_flags & ((1L<<26))) != 0) || PyTuple_Size(atime) != 2) { PyErr_SetString(PyExc_TypeError, "utimensat() arg 3 must be a tuple (atime_sec, atime_nsec)"); do { if ( --((PyObject*)(opath))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(opath)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(opath)))); } while (0); return ((void *)0); } else if (!((((((PyObject*)(mtime))->ob_type))->tp_flags & ((1L<<26))) != 0) || PyTuple_Size(mtime) != 2) { PyErr_SetString(PyExc_TypeError, "utimensat() arg 4 must be a tuple (mtime_sec, mtime_nsec)"); do { if ( --((PyObject*)(opath))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(opath)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(opath)))); } while (0); return ((void *)0); } else { if (!_PyArg_ParseTuple_SizeT(atime, "ll:utimensat", &(buf[0].tv_sec), &(buf[0].tv_nsec))) { do { if ( --((PyObject*)(opath))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(opath)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(opath)))); } while (0); return ((void *)0); } if (!_PyArg_ParseTuple_SizeT(mtime, "ll:utimensat", &(buf[1].tv_sec), &(buf[1].tv_nsec))) { do { if ( --((PyObject*)(opath))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(opath)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(opath)))); } while (0); return ((void *)0); } { PyThreadState *_save; _save = PyEval_SaveThread(); res = utimensat(dirfd, path, buf, flags); PyEval_RestoreThread(_save); } } do { if ( --((PyObject*)(opath))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(opath)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(opath)))); } while (0); if (res < 0) { return posix_error(); } return ( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++), (&_Py_NoneStruct); } static char posix_mkfifoat__doc__[] = "mkfifoat(dirfd, path, mode=0o666)\n\nLike mkfifo() but if path is relative, it is taken as relative to dirfd.\nIf path is relative and dirfd is the special value AT_FDCWD, then path\nis interpreted relative to the current working directory."; static PyObject * posix_mkfifoat(PyObject *self, PyObject *args) { PyObject *opath; char *filename; int mode = 0666; int res, dirfd; if (!_PyArg_ParseTuple_SizeT(args, "iO&|i:mkfifoat", &dirfd, PyUnicodeUCS2_FSConverter, &opath, &mode)) return ((void *)0); filename = (((void)0), (((PyBytesObject *)(opath))->ob_sval)); { PyThreadState *_save; _save = PyEval_SaveThread(); res = mkfifoat(dirfd, filename, mode); PyEval_RestoreThread(_save); } do { if ( --((PyObject*)(opath))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(opath)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(opath)))); } while (0); if (res < 0) return posix_error(); return ( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++), (&_Py_NoneStruct); } static PyMethodDef posix_methods[] = { {"access", posix_access, 0x0001, posix_access__doc__}, {"ttyname", posix_ttyname, 0x0001, posix_ttyname__doc__}, {"chdir", posix_chdir, 0x0001, posix_chdir__doc__}, {"chflags", posix_chflags, 0x0001, posix_chflags__doc__}, {"chmod", posix_chmod, 0x0001, posix_chmod__doc__}, {"fchmod", posix_fchmod, 0x0001, posix_fchmod__doc__}, {"chown", posix_chown, 0x0001, posix_chown__doc__}, {"fchown", posix_fchown, 0x0001, posix_fchown__doc__}, {"lchown", posix_lchown, 0x0001, posix_lchown__doc__}, {"chroot", posix_chroot, 0x0001, posix_chroot__doc__}, {"ctermid", posix_ctermid, 0x0004, posix_ctermid__doc__}, {"getcwd", (PyCFunction)posix_getcwd_unicode, 0x0004, posix_getcwd__doc__}, {"getcwdb", (PyCFunction)posix_getcwd_bytes, 0x0004, posix_getcwdb__doc__}, {"link", posix_link, 0x0001, posix_link__doc__}, {"listdir", posix_listdir, 0x0001, posix_listdir__doc__}, {"fdlistdir", posix_fdlistdir, 0x0001, posix_fdlistdir__doc__}, {"lstat", posix_lstat, 0x0001, posix_lstat__doc__}, {"mkdir", posix_mkdir, 0x0001, posix_mkdir__doc__}, {"nice", posix_nice, 0x0001, posix_nice__doc__}, {"getpriority", posix_getpriority, 0x0001, posix_getpriority__doc__}, {"setpriority", posix_setpriority, 0x0001, posix_setpriority__doc__}, {"readlink", posix_readlink, 0x0001, posix_readlink__doc__}, {"rename", posix_rename, 0x0001, posix_rename__doc__}, {"rmdir", posix_rmdir, 0x0001, posix_rmdir__doc__}, {"stat", posix_stat, 0x0001, posix_stat__doc__}, {"stat_float_times", stat_float_times, 0x0001, stat_float_times__doc__}, {"symlink", posix_symlink, 0x0001, posix_symlink__doc__}, {"system", posix_system, 0x0001, posix_system__doc__}, {"umask", posix_umask, 0x0001, posix_umask__doc__}, {"uname", posix_uname, 0x0004, posix_uname__doc__}, {"unlink", posix_unlink, 0x0001, posix_unlink__doc__}, {"remove", posix_unlink, 0x0001, posix_remove__doc__}, {"utime", posix_utime, 0x0001, posix_utime__doc__}, {"futimes", posix_futimes, 0x0001, posix_futimes__doc__}, {"futimens", posix_futimens, 0x0001, posix_futimens__doc__}, {"times", posix_times, 0x0004, posix_times__doc__}, {"_exit", posix__exit, 0x0001, posix__exit__doc__}, {"execv", posix_execv, 0x0001, posix_execv__doc__}, {"execve", posix_execve, 0x0001, posix_execve__doc__}, # 10070 "./Modules/posixmodule.c" {"fork", posix_fork, 0x0004, posix_fork__doc__}, {"sched_get_priority_max", posix_sched_get_priority_max, 0x0001, posix_sched_get_priority_max__doc__}, {"sched_get_priority_min", posix_sched_get_priority_min, 0x0001, posix_sched_get_priority_min__doc__}, # 10090 "./Modules/posixmodule.c" {"sched_yield", posix_sched_yield, 0x0004, posix_sched_yield__doc__}, {"openpty", posix_openpty, 0x0004, posix_openpty__doc__}, {"forkpty", posix_forkpty, 0x0004, posix_forkpty__doc__}, {"getegid", posix_getegid, 0x0004, posix_getegid__doc__}, {"geteuid", posix_geteuid, 0x0004, posix_geteuid__doc__}, {"getgid", posix_getgid, 0x0004, posix_getgid__doc__}, {"getgrouplist", posix_getgrouplist, 0x0001, posix_getgrouplist__doc__}, {"getgroups", posix_getgroups, 0x0004, posix_getgroups__doc__}, {"getpid", posix_getpid, 0x0004, posix_getpid__doc__}, {"getpgrp", posix_getpgrp, 0x0004, posix_getpgrp__doc__}, {"getppid", posix_getppid, 0x0004, posix_getppid__doc__}, {"getuid", posix_getuid, 0x0004, posix_getuid__doc__}, {"getlogin", posix_getlogin, 0x0004, posix_getlogin__doc__}, {"kill", posix_kill, 0x0001, posix_kill__doc__}, {"killpg", posix_killpg, 0x0001, posix_killpg__doc__}, # 10145 "./Modules/posixmodule.c" {"setuid", posix_setuid, 0x0001, posix_setuid__doc__}, {"seteuid", posix_seteuid, 0x0001, posix_seteuid__doc__}, {"setegid", posix_setegid, 0x0001, posix_setegid__doc__}, {"setreuid", posix_setreuid, 0x0001, posix_setreuid__doc__}, {"setregid", posix_setregid, 0x0001, posix_setregid__doc__}, {"setgid", posix_setgid, 0x0001, posix_setgid__doc__}, {"setgroups", posix_setgroups, 0x0008, posix_setgroups__doc__}, {"initgroups", posix_initgroups, 0x0001, posix_initgroups__doc__}, {"getpgid", posix_getpgid, 0x0001, posix_getpgid__doc__}, {"setpgrp", posix_setpgrp, 0x0004, posix_setpgrp__doc__}, {"wait", posix_wait, 0x0004, posix_wait__doc__}, {"wait3", posix_wait3, 0x0001, posix_wait3__doc__}, {"wait4", posix_wait4, 0x0001, posix_wait4__doc__}, {"waitpid", posix_waitpid, 0x0001, posix_waitpid__doc__}, {"getsid", posix_getsid, 0x0001, posix_getsid__doc__}, {"setsid", posix_setsid, 0x0004, posix_setsid__doc__}, {"setpgid", posix_setpgid, 0x0001, posix_setpgid__doc__}, {"tcgetpgrp", posix_tcgetpgrp, 0x0001, posix_tcgetpgrp__doc__}, {"tcsetpgrp", posix_tcsetpgrp, 0x0001, posix_tcsetpgrp__doc__}, {"open", posix_open, 0x0001, posix_open__doc__}, {"close", posix_close, 0x0001, posix_close__doc__}, {"closerange", posix_closerange, 0x0001, posix_closerange__doc__}, {"device_encoding", device_encoding, 0x0001, device_encoding__doc__}, {"dup", posix_dup, 0x0001, posix_dup__doc__}, {"dup2", posix_dup2, 0x0001, posix_dup2__doc__}, {"lockf", posix_lockf, 0x0001, posix_lockf__doc__}, {"lseek", posix_lseek, 0x0001, posix_lseek__doc__}, {"read", posix_read, 0x0001, posix_read__doc__}, {"readv", posix_readv, 0x0001, posix_readv__doc__}, {"pread", posix_pread, 0x0001, posix_pread__doc__}, {"write", posix_write, 0x0001, posix_write__doc__}, {"writev", posix_writev, 0x0001, posix_writev__doc__}, {"pwrite", posix_pwrite, 0x0001, posix_pwrite__doc__}, {"fstat", posix_fstat, 0x0001, posix_fstat__doc__}, {"isatty", posix_isatty, 0x0001, posix_isatty__doc__}, {"pipe", posix_pipe, 0x0004, posix_pipe__doc__}, {"mkfifo", posix_mkfifo, 0x0001, posix_mkfifo__doc__}, {"mknod", posix_mknod, 0x0001, posix_mknod__doc__}, {"major", posix_major, 0x0001, posix_major__doc__}, {"minor", posix_minor, 0x0001, posix_minor__doc__}, {"makedev", posix_makedev, 0x0001, posix_makedev__doc__}, {"ftruncate", posix_ftruncate, 0x0001, posix_ftruncate__doc__}, {"truncate", posix_truncate, 0x0001, posix_truncate__doc__}, # 10264 "./Modules/posixmodule.c" {"putenv", posix_putenv, 0x0001, posix_putenv__doc__}, {"unsetenv", posix_unsetenv, 0x0001, posix_unsetenv__doc__}, {"strerror", posix_strerror, 0x0001, posix_strerror__doc__}, {"fchdir", posix_fchdir, 0x0008, posix_fchdir__doc__}, {"fsync", posix_fsync, 0x0008, posix_fsync__doc__}, {"sync", posix_sync, 0x0004, posix_sync__doc__}, {"WCOREDUMP", posix_WCOREDUMP, 0x0001, posix_WCOREDUMP__doc__}, {"WIFCONTINUED",posix_WIFCONTINUED, 0x0001, posix_WIFCONTINUED__doc__}, {"WIFSTOPPED", posix_WIFSTOPPED, 0x0001, posix_WIFSTOPPED__doc__}, {"WIFSIGNALED", posix_WIFSIGNALED, 0x0001, posix_WIFSIGNALED__doc__}, {"WIFEXITED", posix_WIFEXITED, 0x0001, posix_WIFEXITED__doc__}, {"WEXITSTATUS", posix_WEXITSTATUS, 0x0001, posix_WEXITSTATUS__doc__}, {"WTERMSIG", posix_WTERMSIG, 0x0001, posix_WTERMSIG__doc__}, {"WSTOPSIG", posix_WSTOPSIG, 0x0001, posix_WSTOPSIG__doc__}, {"fstatvfs", posix_fstatvfs, 0x0001, posix_fstatvfs__doc__}, {"statvfs", posix_statvfs, 0x0001, posix_statvfs__doc__}, {"confstr", posix_confstr, 0x0001, posix_confstr__doc__}, {"sysconf", posix_sysconf, 0x0001, posix_sysconf__doc__}, {"fpathconf", posix_fpathconf, 0x0001, posix_fpathconf__doc__}, {"pathconf", posix_pathconf, 0x0001, posix_pathconf__doc__}, {"abort", posix_abort, 0x0004, posix_abort__doc__}, # 10335 "./Modules/posixmodule.c" {"getloadavg", posix_getloadavg, 0x0004, posix_getloadavg__doc__}, # 10344 "./Modules/posixmodule.c" {"setresuid", posix_setresuid, 0x0001, posix_setresuid__doc__}, {"setresgid", posix_setresgid, 0x0001, posix_setresgid__doc__}, {"getresuid", posix_getresuid, 0x0004, posix_getresuid__doc__}, {"getresgid", posix_getresgid, 0x0004, posix_getresgid__doc__}, {"faccessat", posix_faccessat, 0x0001, posix_faccessat__doc__}, {"fchmodat", posix_fchmodat, 0x0001, posix_fchmodat__doc__}, {"fchownat", posix_fchownat, 0x0001, posix_fchownat__doc__}, {"fstatat", posix_fstatat, 0x0001, posix_fstatat__doc__}, {"linkat", posix_linkat, 0x0001, posix_linkat__doc__}, {"mkdirat", posix_mkdirat, 0x0001, posix_mkdirat__doc__}, {"mknodat", posix_mknodat, 0x0001, posix_mknodat__doc__}, {"openat", posix_openat, 0x0001, posix_openat__doc__}, {"readlinkat", posix_readlinkat, 0x0001, posix_readlinkat__doc__}, {"renameat", posix_renameat, 0x0001, posix_renameat__doc__}, {"symlinkat", posix_symlinkat, 0x0001, posix_symlinkat__doc__}, {"unlinkat", posix_unlinkat, 0x0001, posix_unlinkat__doc__}, {"utimensat", posix_utimensat, 0x0001, posix_utimensat__doc__}, {"mkfifoat", posix_mkfifoat, 0x0001, posix_mkfifoat__doc__}, {((void *)0), ((void *)0)} }; static int ins(PyObject *module, char *symbol, long value) { return PyModule_AddIntConstant(module, symbol, value); } # 10494 "./Modules/posixmodule.c" static int all_ins(PyObject *d) { if (ins(d, "F_OK", (long)0)) return -1; if (ins(d, "R_OK", (long)0x04)) return -1; if (ins(d, "W_OK", (long)0x02)) return -1; if (ins(d, "X_OK", (long)0x01)) return -1; if (ins(d, "NGROUPS_MAX", (long)16)) return -1; if (ins(d, "TMP_MAX", (long)308915776)) return -1; if (ins(d, "WCONTINUED", (long)8)) return -1; if (ins(d, "WNOHANG", (long)1)) return -1; if (ins(d, "WUNTRACED", (long)2)) return -1; if (ins(d, "O_RDONLY", (long)0x0000)) return -1; if (ins(d, "O_WRONLY", (long)0x0001)) return -1; if (ins(d, "O_RDWR", (long)0x0002)) return -1; if (ins(d, "O_NDELAY", (long)0x0004)) return -1; if (ins(d, "O_NONBLOCK", (long)0x0004)) return -1; if (ins(d, "O_APPEND", (long)0x0008)) return -1; if (ins(d, "O_DSYNC", (long)0x0080)) return -1; if (ins(d, "O_RSYNC", (long)0x0080)) return -1; if (ins(d, "O_SYNC", (long)0x0080)) return -1; if (ins(d, "O_NOCTTY", (long)0x8000)) return -1; if (ins(d, "O_CREAT", (long)0x0200)) return -1; if (ins(d, "O_EXCL", (long)0x0800)) return -1; if (ins(d, "O_TRUNC", (long)0x0400)) return -1; # 10573 "./Modules/posixmodule.c" if (ins(d, "O_SHLOCK", (long)0x0010)) return -1; if (ins(d, "O_EXLOCK", (long)0x0020)) return -1; if (ins(d, "PRIO_PROCESS", (long)0)) return -1; if (ins(d, "PRIO_PGRP", (long)1)) return -1; if (ins(d, "PRIO_USER", (long)2)) return -1; if (ins(d, "O_CLOEXEC", (long)0x10000)) return -1; # 10641 "./Modules/posixmodule.c" if (ins(d, "O_ASYNC", (long)0x0040)) return -1; if (ins(d, "O_DIRECTORY", (long)0x20000)) return -1; if (ins(d, "O_NOFOLLOW", (long)0x0100)) return -1; # 10662 "./Modules/posixmodule.c" if (ins(d, "EX_OK", (long)0)) return -1; if (ins(d, "EX_USAGE", (long)64)) return -1; if (ins(d, "EX_DATAERR", (long)65)) return -1; if (ins(d, "EX_NOINPUT", (long)66)) return -1; if (ins(d, "EX_NOUSER", (long)67)) return -1; if (ins(d, "EX_NOHOST", (long)68)) return -1; if (ins(d, "EX_UNAVAILABLE", (long)69)) return -1; if (ins(d, "EX_SOFTWARE", (long)70)) return -1; if (ins(d, "EX_OSERR", (long)71)) return -1; if (ins(d, "EX_OSFILE", (long)72)) return -1; if (ins(d, "EX_CANTCREAT", (long)73)) return -1; if (ins(d, "EX_IOERR", (long)74)) return -1; if (ins(d, "EX_TEMPFAIL", (long)75)) return -1; if (ins(d, "EX_PROTOCOL", (long)76)) return -1; if (ins(d, "EX_NOPERM", (long)77)) return -1; if (ins(d, "EX_CONFIG", (long)78)) return -1; if (ins(d, "ST_RDONLY", (long)0x0001UL)) return -1; if (ins(d, "ST_NOSUID", (long)0x0002UL)) return -1; # 10765 "./Modules/posixmodule.c" if (ins(d, "WSTOPPED", (long)0177)) return -1; if (ins(d, "CLD_EXITED", (long)1)) return -1; if (ins(d, "CLD_DUMPED", (long)3)) return -1; if (ins(d, "CLD_TRAPPED", (long)4)) return -1; if (ins(d, "CLD_CONTINUED", (long)6)) return -1; if (ins(d, "F_LOCK", (long)1)) return -1; if (ins(d, "F_TLOCK", (long)2)) return -1; if (ins(d, "F_ULOCK", (long)0)) return -1; if (ins(d, "F_TEST", (long)3)) return -1; # 10834 "./Modules/posixmodule.c" if (ins(d, "SCHED_FIFO", (long)1)) return -1; if (ins(d, "SCHED_RR", (long)3)) return -1; if (ins(d, "SCHED_OTHER", (long)2)) return -1; # 10854 "./Modules/posixmodule.c" return 0; } # 10871 "./Modules/posixmodule.c" static struct PyModuleDef posixmodule = { { { 1, ((void *)0) }, ((void *)0), 0, ((void *)0), }, "posix", posix__doc__, -1, posix_methods, ((void *)0), ((void *)0), ((void *)0), ((void *)0) }; PyObject* PyInit_posix(void) { PyObject *m, *v; m = PyModule_Create2(&posixmodule, 1013); if (m == ((void *)0)) return ((void *)0); v = convertenviron(); do { if ((v) == ((void *)0)) ; else ( ((PyObject*)(v))->ob_refcnt++); } while (0); if (v == ((void *)0) || PyModule_AddObject(m, "environ", v) != 0) return ((void *)0); do { if ( --((PyObject*)(v))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(v)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(v)))); } while (0); if (all_ins(m)) return ((void *)0); if (setup_confname_tables(m)) return ((void *)0); ( ((PyObject*)(PyExc_OSError))->ob_refcnt++); PyModule_AddObject(m, "error", PyExc_OSError); # 10921 "./Modules/posixmodule.c" if (posix_putenv_garbage == ((void *)0)) posix_putenv_garbage = PyDict_New(); if (!initialized) { stat_result_desc.name = "posix" ".stat_result"; stat_result_desc.fields[7].name = PyStructSequence_UnnamedField; stat_result_desc.fields[8].name = PyStructSequence_UnnamedField; stat_result_desc.fields[9].name = PyStructSequence_UnnamedField; PyStructSequence_InitType(&StatResultType, &stat_result_desc); structseq_new = StatResultType.tp_new; StatResultType.tp_new = statresult_new; statvfs_result_desc.name = "posix" ".statvfs_result"; PyStructSequence_InitType(&StatVFSResultType, &statvfs_result_desc); ticks_per_second = sysconf(3); # 10956 "./Modules/posixmodule.c" } ( ((PyObject*)((PyObject*) &StatResultType))->ob_refcnt++); PyModule_AddObject(m, "stat_result", (PyObject*) &StatResultType); ( ((PyObject*)((PyObject*) &StatVFSResultType))->ob_refcnt++); PyModule_AddObject(m, "statvfs_result", (PyObject*) &StatVFSResultType); initialized = 1; # 11010 "./Modules/posixmodule.c" return m; }