this repo has no description
at trunk 473 lines 17 kB view raw
1/* Copyright (c) Facebook, Inc. and its affiliates. (http://www.facebook.com) */ 2#ifndef CPYTHON_DATA_H 3#define CPYTHON_DATA_H 4 5#include "cpython-func.h" 6 7#include "pyconfig.h" 8 9#ifdef __cplusplus 10extern "C" { 11#endif 12 13#define PyAPI_DATA(RTYPE) extern __attribute__((visibility("default"))) RTYPE 14#define PyDoc_VAR(name) static char name[] 15#define PyDoc_STRVAR(name, str) PyDoc_VAR(name) = PyDoc_STR(str) 16#define PyDoc_STR(str) str 17 18#define PY_PARSER_REQUIRES_FUTURE_KEYWORD 19#define Py_USING_UNICODE 20#define Py_UNICODE_WIDE 21#define HAVE_PY_SET_53BIT_PRECISION 0 22 23#if __SIZEOF_WCHAR_T__ < 4 24#error sizeof(wchar_t) < 4 not supported 25#endif 26 27#define _Py_XSTRINGIFY(x) #x 28#define Py_STRINGIFY(x) _Py_XSTRINGIFY(x) 29#define Py_FORCE_EXPANSION(X) X 30 31/* Singletons */ 32#define PyAsyncGen_Type (*PyAsyncGen_Type_Ptr()) 33#define PyBaseObject_Type (*PyBaseObject_Type_Ptr()) 34#define PyBool_Type (*PyBool_Type_Ptr()) 35#define PyByteArrayIter_Type (*PyByteArrayIter_Type_Ptr()) 36#define PyByteArray_Type (*PyByteArray_Type_Ptr()) 37#define PyBytesIter_Type (*PyBytesIter_Type_Ptr()) 38#define PyBytes_Type (*PyBytes_Type_Ptr()) 39#define PyClassMethod_Type (*PyClassMethod_Type_Ptr()) 40#define PyCode_Type (*PyCode_Type_Ptr()) 41#define PyComplex_Type (*PyComplex_Type_Ptr()) 42#define PyCoro_Type (*PyCoro_Type_Ptr()) 43#define PyDictItems_Type (*PyDictItems_Type_Ptr()) 44#define PyDictIterItem_Type (*PyDictIterItem_Type_Ptr()) 45#define PyDictIterKey_Type (*PyDictIterKey_Type_Ptr()) 46#define PyDictIterValue_Type (*PyDictIterValue_Type_Ptr()) 47#define PyDictKeys_Type (*PyDictKeys_Type_Ptr()) 48#define PyDictProxy_Type (*PyDictProxy_Type_Ptr()) 49#define PyDictValues_Type (*PyDictValues_Type_Ptr()) 50#define PyDict_Type (*PyDict_Type_Ptr()) 51#define PyEllipsis_Type (*PyEllipsis_Type_Ptr()) 52#define PyEnum_Type (*PyEnum_Type_Ptr()) 53#define PyExc_ArithmeticError PyExc_ArithmeticError_Ptr() 54#define PyExc_AssertionError PyExc_AssertionError_Ptr() 55#define PyExc_AttributeError PyExc_AttributeError_Ptr() 56#define PyExc_BaseException PyExc_BaseException_Ptr() 57#define PyExc_BlockingIOError PyExc_BlockingIOError_Ptr() 58#define PyExc_BrokenPipeError PyExc_BrokenPipeError_Ptr() 59#define PyExc_BufferError PyExc_BufferError_Ptr() 60#define PyExc_BytesWarning PyExc_BytesWarning_Ptr() 61#define PyExc_ChildProcessError PyExc_ChildProcessError_Ptr() 62#define PyExc_ConnectionAbortedError PyExc_ConnectionAbortedError_Ptr() 63#define PyExc_ConnectionError PyExc_ConnectionError_Ptr() 64#define PyExc_ConnectionRefusedError PyExc_ConnectionRefusedError_Ptr() 65#define PyExc_ConnectionResetError PyExc_ConnectionResetError_Ptr() 66#define PyExc_DeprecationWarning PyExc_DeprecationWarning_Ptr() 67#define PyExc_EOFError PyExc_EOFError_Ptr() 68#define PyExc_EnvironmentError PyExc_OSError_Ptr() 69#define PyExc_Exception PyExc_Exception_Ptr() 70#define PyExc_FileExistsError PyExc_FileExistsError_Ptr() 71#define PyExc_FileNotFoundError PyExc_FileNotFoundError_Ptr() 72#define PyExc_FloatingPointError PyExc_FloatingPointError_Ptr() 73#define PyExc_FutureWarning PyExc_FutureWarning_Ptr() 74#define PyExc_GeneratorExit PyExc_GeneratorExit_Ptr() 75#define PyExc_IOError PyExc_OSError_Ptr() 76#define PyExc_ImportError PyExc_ImportError_Ptr() 77#define PyExc_ImportWarning PyExc_ImportWarning_Ptr() 78#define PyExc_IndentationError PyExc_IndentationError_Ptr() 79#define PyExc_IndexError PyExc_IndexError_Ptr() 80#define PyExc_InterruptedError PyExc_InterruptedError_Ptr() 81#define PyExc_IsADirectoryError PyExc_IsADirectoryError_Ptr() 82#define PyExc_KeyError PyExc_KeyError_Ptr() 83#define PyExc_KeyboardInterrupt PyExc_KeyboardInterrupt_Ptr() 84#define PyExc_LookupError PyExc_LookupError_Ptr() 85#define PyExc_MemoryError PyExc_MemoryError_Ptr() 86#define PyExc_ModuleNotFoundError PyExc_ModuleNotFoundError_Ptr() 87#define PyExc_NameError PyExc_NameError_Ptr() 88#define PyExc_NotADirectoryError PyExc_NotADirectoryError_Ptr() 89#define PyExc_NotImplementedError PyExc_NotImplementedError_Ptr() 90#define PyExc_OSError PyExc_OSError_Ptr() 91#define PyExc_OverflowError PyExc_OverflowError_Ptr() 92#define PyExc_PendingDeprecationWarning PyExc_PendingDeprecationWarning_Ptr() 93#define PyExc_PermissionError PyExc_PermissionError_Ptr() 94#define PyExc_ProcessLookupError PyExc_ProcessLookupError_Ptr() 95#define PyExc_RecursionError PyExc_RecursionError_Ptr() 96#define PyExc_ReferenceError PyExc_ReferenceError_Ptr() 97#define PyExc_ResourceWarning PyExc_ResourceWarning_Ptr() 98#define PyExc_RuntimeError PyExc_RuntimeError_Ptr() 99#define PyExc_RuntimeWarning PyExc_RuntimeWarning_Ptr() 100#define PyExc_StopAsyncIteration PyExc_StopAsyncIteration_Ptr() 101#define PyExc_StopIteration PyExc_StopIteration_Ptr() 102#define PyExc_SyntaxError PyExc_SyntaxError_Ptr() 103#define PyExc_SyntaxWarning PyExc_SyntaxWarning_Ptr() 104#define PyExc_SystemError PyExc_SystemError_Ptr() 105#define PyExc_SystemExit PyExc_SystemExit_Ptr() 106#define PyExc_TabError PyExc_TabError_Ptr() 107#define PyExc_TimeoutError PyExc_TimeoutError_Ptr() 108#define PyExc_TypeError PyExc_TypeError_Ptr() 109#define PyExc_UnboundLocalError PyExc_UnboundLocalError_Ptr() 110#define PyExc_UnicodeDecodeError PyExc_UnicodeDecodeError_Ptr() 111#define PyExc_UnicodeEncodeError PyExc_UnicodeEncodeError_Ptr() 112#define PyExc_UnicodeError PyExc_UnicodeError_Ptr() 113#define PyExc_UnicodeTranslateError PyExc_UnicodeTranslateError_Ptr() 114#define PyExc_UnicodeWarning PyExc_UnicodeWarning_Ptr() 115#define PyExc_UserWarning PyExc_UserWarning_Ptr() 116#define PyExc_ValueError PyExc_ValueError_Ptr() 117#define PyExc_Warning PyExc_Warning_Ptr() 118#define PyExc_ZeroDivisionError PyExc_ZeroDivisionError_Ptr() 119#define PyFloat_Type (*PyFloat_Type_Ptr()) 120#define PyFrozenSet_Type (*PyFrozenSet_Type_Ptr()) 121#define PyFunction_Type (*PyFunction_Type_Ptr()) 122#define PyGen_Type (*PyGen_Type_Ptr()) 123#define PyListIter_Type (*PyListIter_Type_Ptr()) 124#define PyList_Type (*PyList_Type_Ptr()) 125#define PyLongRangeIter_Type (*PyLongRangeIter_Type_Ptr()) 126#define PyLong_Type (*PyLong_Type_Ptr()) 127#define PyMemoryView_Type (*PyMemoryView_Type_Ptr()) 128#define PyMethod_Type (*PyMethod_Type_Ptr()) 129#define PyModule_Type (*PyModule_Type_Ptr()) 130#define PyProperty_Type (*PyProperty_Type_Ptr()) 131#define PyRangeIter_Type (*PyRangeIter_Type_Ptr()) 132#define PyRange_Type (*PyRange_Type_Ptr()) 133#define PySeqIter_Type (*PySeqIter_Type_Ptr()) 134#define PySetIter_Type (*PySetIter_Type_Ptr()) 135#define PySet_Type (*PySet_Type_Ptr()) 136#define PySlice_Type (*PySlice_Type_Ptr()) 137#define PyStaticMethod_Type (*PyStaticMethod_Type_Ptr()) 138#define PySuper_Type (*PySuper_Type_Ptr()) 139#define PyTupleIter_Type (*PyTupleIter_Type_Ptr()) 140#define PyTuple_Type (*PyTuple_Type_Ptr()) 141#define PyType_Type (*PyType_Type_Ptr()) 142#define PyUnicodeIter_Type (*PyUnicodeIter_Type_Ptr()) 143#define PyUnicode_Type (*PyUnicode_Type_Ptr()) 144#define Py_Ellipsis PyEllipsis_Ptr() 145#define Py_False PyFalse_Ptr() 146#define Py_None PyNone_Ptr() 147#define Py_NotImplemented PyNotImplemented_Ptr() 148#define Py_True PyTrue_Ptr() 149#define _Py_HashSecret (*_Py_HashSecret_Ptr()) 150#define _PyLong_One _PyLong_One_Ptr() 151#define _PyLong_Zero _PyLong_Zero_Ptr() 152#define _PyNone_Type (*_PyNone_Type_Ptr()) 153#define _PyNotImplemented_Type (*_PyNotImplemented_Type_Ptr()) 154#define _PyRuntime (*_PyRuntime_Ptr()) 155 156#define PYTHON_ABI_STRING "3" 157#define PYTHON_ABI_VERSION 3 158#define PYTHON_API_STRING "1013" 159#define PYTHON_API_VERSION 1013 160 161#define PY_MAJOR_VERSION 3 162#define PY_MICRO_VERSION 5 163#define PY_MINOR_VERSION 8 164#define PY_RELEASE_LEVEL PY_RELEASE_LEVEL_FINAL 165#define PY_RELEASE_LEVEL_ALPHA 0xA 166#define PY_RELEASE_LEVEL_BETA 0xB 167#define PY_RELEASE_LEVEL_FINAL 0xF 168#define PY_RELEASE_LEVEL_GAMMA 0xC 169#define PY_RELEASE_SERIAL 0 170#define PY_VERSION \ 171 Py_STRINGIFY(PY_MAJOR_VERSION) "." Py_STRINGIFY( \ 172 PY_MINOR_VERSION) "." Py_STRINGIFY(PY_MICRO_VERSION) "+" 173#define PY_VERSION_HEX \ 174 ((PY_MAJOR_VERSION << 24) | (PY_MINOR_VERSION << 16) | \ 175 (PY_MICRO_VERSION << 8) | (PY_RELEASE_LEVEL << 4) | \ 176 (PY_RELEASE_SERIAL << 0)) 177 178extern int (*PyOS_InputHook)(void); 179extern char* (*PyOS_ReadlineFunctionPointer)(FILE*, FILE*, const char*); 180extern PyThreadState* _PyOS_ReadlineTState; 181 182#define Py_MATH_PIl 3.1415926535897932384626433832795029L 183#define Py_MATH_PI 3.14159265358979323846 184#define Py_MATH_El 2.7182818284590452353602874713526625L 185#define Py_MATH_E 2.7182818284590452354 186#define Py_MATH_TAU 6.2831853071795864769252867665590057683943L 187 188PyAPI_DATA(int) Py_BytesWarningFlag; 189PyAPI_DATA(int) Py_DebugFlag; 190PyAPI_DATA(int) Py_DontWriteBytecodeFlag; 191PyAPI_DATA(int) Py_FrozenFlag; 192PyAPI_DATA(int) Py_HashRandomizationFlag; 193PyAPI_DATA(int) Py_IgnoreEnvironmentFlag; 194PyAPI_DATA(int) Py_InspectFlag; 195PyAPI_DATA(int) Py_InteractiveFlag; 196PyAPI_DATA(int) Py_IsolatedFlag; 197PyAPI_DATA(int) Py_NoSiteFlag; 198PyAPI_DATA(int) Py_NoUserSiteDirectory; 199PyAPI_DATA(int) Py_OptimizeFlag; 200PyAPI_DATA(int) Py_QuietFlag; 201PyAPI_DATA(int) Py_UTF8Mode; 202PyAPI_DATA(int) Py_UnbufferedStdioFlag; 203PyAPI_DATA(int) Py_VerboseFlag; 204 205#define PY_CTF_LOWER 0x01 206#define PY_CTF_UPPER 0x02 207#define PY_CTF_ALPHA (PY_CTF_LOWER | PY_CTF_UPPER) 208#define PY_CTF_DIGIT 0x04 209#define PY_CTF_ALNUM (PY_CTF_ALPHA | PY_CTF_DIGIT) 210#define PY_CTF_SPACE 0x08 211#define PY_CTF_XDIGIT 0x10 212 213PyAPI_DATA(const unsigned char) _PyLong_DigitValue[256]; 214 215#define Py_CLEANUP_SUPPORTED 0x20000 216 217/* Flags for getting buffers */ 218#define PyBUF_SIMPLE 0 219#define PyBUF_WRITABLE 0x0001 220#define PyBUF_FORMAT 0x0004 221#define PyBUF_ND 0x0008 222#define PyBUF_STRIDES (0x0010 | PyBUF_ND) 223#define PyBUF_C_CONTIGUOUS (0x0020 | PyBUF_STRIDES) 224#define PyBUF_F_CONTIGUOUS (0x0040 | PyBUF_STRIDES) 225#define PyBUF_ANY_CONTIGUOUS (0x0080 | PyBUF_STRIDES) 226#define PyBUF_INDIRECT (0x0100 | PyBUF_STRIDES) 227#define PyBUF_CONTIG (PyBUF_ND | PyBUF_WRITABLE) 228#define PyBUF_CONTIG_RO (PyBUF_ND) 229#define PyBUF_STRIDED (PyBUF_STRIDES | PyBUF_WRITABLE) 230#define PyBUF_STRIDED_RO (PyBUF_STRIDES) 231#define PyBUF_RECORDS (PyBUF_STRIDES | PyBUF_WRITABLE | PyBUF_FORMAT) 232#define PyBUF_RECORDS_RO (PyBUF_STRIDES | PyBUF_FORMAT) 233#define PyBUF_FULL (PyBUF_INDIRECT | PyBUF_WRITABLE | PyBUF_FORMAT) 234#define PyBUF_FULL_RO (PyBUF_INDIRECT | PyBUF_FORMAT) 235 236#define PyBUF_READ 0x100 237#define PyBUF_WRITE 0x200 238 239/* Type Slots */ 240#define Py_bf_getbuffer 1 241#define Py_bf_releasebuffer 2 242#define Py_mp_ass_subscript 3 243#define Py_mp_length 4 244#define Py_mp_subscript 5 245#define Py_nb_absolute 6 246#define Py_nb_add 7 247#define Py_nb_and 8 248#define Py_nb_bool 9 249#define Py_nb_divmod 10 250#define Py_nb_float 11 251#define Py_nb_floor_divide 12 252#define Py_nb_index 13 253#define Py_nb_inplace_add 14 254#define Py_nb_inplace_and 15 255#define Py_nb_inplace_floor_divide 16 256#define Py_nb_inplace_lshift 17 257#define Py_nb_inplace_multiply 18 258#define Py_nb_inplace_or 19 259#define Py_nb_inplace_power 20 260#define Py_nb_inplace_remainder 21 261#define Py_nb_inplace_rshift 22 262#define Py_nb_inplace_subtract 23 263#define Py_nb_inplace_true_divide 24 264#define Py_nb_inplace_xor 25 265#define Py_nb_int 26 266#define Py_nb_invert 27 267#define Py_nb_lshift 28 268#define Py_nb_multiply 29 269#define Py_nb_negative 30 270#define Py_nb_or 31 271#define Py_nb_positive 32 272#define Py_nb_power 33 273#define Py_nb_remainder 34 274#define Py_nb_rshift 35 275#define Py_nb_subtract 36 276#define Py_nb_true_divide 37 277#define Py_nb_xor 38 278#define Py_sq_ass_item 39 279#define Py_sq_concat 40 280#define Py_sq_contains 41 281#define Py_sq_inplace_concat 42 282#define Py_sq_inplace_repeat 43 283#define Py_sq_item 44 284#define Py_sq_length 45 285#define Py_sq_repeat 46 286#define Py_tp_alloc 47 287#define Py_tp_base 48 288#define Py_tp_bases 49 289#define Py_tp_call 50 290#define Py_tp_clear 51 291#define Py_tp_dealloc 52 292#define Py_tp_del 53 293#define Py_tp_descr_get 54 294#define Py_tp_descr_set 55 295#define Py_tp_doc 56 296#define Py_tp_getattr 57 297#define Py_tp_getattro 58 298#define Py_tp_hash 59 299#define Py_tp_init 60 300#define Py_tp_is_gc 61 301#define Py_tp_iter 62 302#define Py_tp_iternext 63 303#define Py_tp_methods 64 304#define Py_tp_new 65 305#define Py_tp_repr 66 306#define Py_tp_richcompare 67 307#define Py_tp_setattr 68 308#define Py_tp_setattro 69 309#define Py_tp_str 70 310#define Py_tp_traverse 71 311#define Py_tp_members 72 312#define Py_tp_getset 73 313#define Py_tp_free 74 314#define Py_nb_matrix_multiply 75 315#define Py_nb_inplace_matrix_multiply 76 316#define Py_am_await 77 317#define Py_am_aiter 78 318#define Py_am_anext 79 319#define Py_tp_finalize 80 320 321/* Method Types */ 322#define METH_VARARGS 0x0001 323#define METH_KEYWORDS 0x0002 324#define METH_NOARGS 0x0004 325#define METH_O 0x0008 326#define METH_CLASS 0x0010 327#define METH_STATIC 0x0020 328#define METH_COEXIST 0x0040 329#define METH_FASTCALL 0x0080 330 331/* Rich comparison opcodes */ 332#define Py_LT 0 333#define Py_LE 1 334#define Py_EQ 2 335#define Py_NE 3 336#define Py_GT 4 337#define Py_GE 5 338 339/* Masks and values used by FORMAT_VALUE opcode. */ 340#define FVC_MASK 0x3 341#define FVC_NONE 0x0 342#define FVC_STR 0x1 343#define FVC_REPR 0x2 344#define FVC_ASCII 0x3 345#define FVS_MASK 0x4 346#define FVS_HAVE_SPEC 0x4 347 348/* Flag bits for printing: */ 349#define Py_PRINT_RAW 1 /* No string quotes etc. */ 350 351#define Py_DTSF_SIGN 0x01 352#define Py_DTSF_ADD_DOT_0 0x02 353#define Py_DTSF_ALT 0x04 354 355#define Py_DTST_FINITE 0 356#define Py_DTST_INFINITE 1 357#define Py_DTST_NAN 2 358 359PyAPI_DATA(char*) PyStructSequence_UnnamedField; 360 361PyAPI_DATA(const char*) Py_FileSystemDefaultEncoding; 362PyAPI_DATA(int) Py_HasFileSystemDefaultEncoding; 363PyAPI_DATA(const char*) Py_FileSystemDefaultEncodeErrors; 364PyAPI_DATA(const char*) Py_hexdigits; 365 366/* Type flags (tp_flags) */ 367#define Py_TPFLAGS_HAVE_FINALIZE (1UL << 0) 368#define Py_TPFLAGS_HEAPTYPE (1UL << 9) 369#define Py_TPFLAGS_BASETYPE (1UL << 10) 370#define Py_TPFLAGS_READY (1UL << 12) 371#define Py_TPFLAGS_READYING (1UL << 13) 372#define Py_TPFLAGS_HAVE_GC (1UL << 14) 373#define Py_TPFLAGS_HAVE_STACKLESS_EXTENSION 0 374#define Py_TPFLAGS_HAVE_VERSION_TAG (1UL << 18) 375#define Py_TPFLAGS_VALID_VERSION_TAG (1UL << 19) 376#define Py_TPFLAGS_IS_ABSTRACT (1UL << 20) 377#define Py_TPFLAGS_LONG_SUBCLASS (1UL << 24) 378#define Py_TPFLAGS_LIST_SUBCLASS (1UL << 25) 379#define Py_TPFLAGS_TUPLE_SUBCLASS (1UL << 26) 380#define Py_TPFLAGS_BYTES_SUBCLASS (1UL << 27) 381#define Py_TPFLAGS_UNICODE_SUBCLASS (1UL << 28) 382#define Py_TPFLAGS_DICT_SUBCLASS (1UL << 29) 383#define Py_TPFLAGS_BASE_EXC_SUBCLASS (1UL << 30) 384#define Py_TPFLAGS_TYPE_SUBCLASS (1UL << 31) 385 386#define Py_TPFLAGS_DEFAULT \ 387 (Py_TPFLAGS_HAVE_STACKLESS_EXTENSION | Py_TPFLAGS_HAVE_VERSION_TAG) 388 389/* Masks for PyCodeObject co_flags */ 390#define CO_OPTIMIZED 0x0001 391#define CO_NEWLOCALS 0x0002 392#define CO_VARARGS 0x0004 393#define CO_VARKEYWORDS 0x0008 394#define CO_NESTED 0x0010 395#define CO_GENERATOR 0x0020 396#define CO_NOFREE 0x0040 397#define CO_COROUTINE 0x0080 398#define CO_ITERABLE_COROUTINE 0x0100 399#define CO_ASYNC_GENERATOR 0x0200 400 401#define CO_FUTURE_DIVISION 0x20000 402#define CO_FUTURE_ABSOLUTE_IMPORT 0x40000 403#define CO_FUTURE_WITH_STATEMENT 0x80000 404#define CO_FUTURE_PRINT_FUNCTION 0x100000 405#define CO_FUTURE_UNICODE_LITERALS 0x200000 406#define CO_FUTURE_BARRY_AS_BDFL 0x400000 407#define CO_FUTURE_GENERATOR_STOP 0x800000 408#define CO_FUTURE_ANNOTATIONS 0x1000000 409 410#define CO_CELL_NOT_AN_ARG 255 411 412#define CO_MAXBLOCKS 20 413 414#define FUTURE_NESTED_SCOPES "nested_scopes" 415#define FUTURE_GENERATORS "generators" 416#define FUTURE_DIVISION "division" 417#define FUTURE_ABSOLUTE_IMPORT "absolute_import" 418#define FUTURE_WITH_STATEMENT "with_statement" 419#define FUTURE_PRINT_FUNCTION "print_function" 420#define FUTURE_UNICODE_LITERALS "unicode_literals" 421#define FUTURE_BARRY_AS_BDFL "barry_as_FLUFL" 422#define FUTURE_GENERATOR_STOP "generator_stop" 423#define FUTURE_ANNOTATIONS "annotations" 424 425#define MAX_CO_EXTRA_USERS 255 426 427#define PY_INVALID_STACK_EFFECT INT_MAX 428 429/* Compiler Flags */ 430#define Py_single_input 256 431#define Py_file_input 257 432#define Py_eval_input 258 433 434#define E_EOF 11 435 436#define PyCF_MASK \ 437 (CO_FUTURE_DIVISION | CO_FUTURE_ABSOLUTE_IMPORT | CO_FUTURE_WITH_STATEMENT | \ 438 CO_FUTURE_PRINT_FUNCTION | CO_FUTURE_UNICODE_LITERALS | \ 439 CO_FUTURE_BARRY_AS_BDFL | CO_FUTURE_GENERATOR_STOP | CO_FUTURE_ANNOTATIONS) 440#define PyCF_MASK_OBSOLETE (CO_NESTED) 441#define PyCF_SOURCE_IS_UTF8 0x0100 442#define PyCF_DONT_IMPLY_DEDENT 0x0200 443#define PyCF_ONLY_AST 0x0400 444#define PyCF_IGNORE_COOKIE 0x0800 445#define PyCF_TYPE_COMMENTS 0x1000 446#define PyCF_ALLOW_TOP_LEVEL_AWAIT 0x2000 447#define PyCF_COMPILE_MASK \ 448 (PyCF_ONLY_AST | PyCF_ALLOW_TOP_LEVEL_AWAIT | PyCF_TYPE_COMMENTS | \ 449 PyCF_DONT_IMPLY_DEDENT) 450 451#define _PyHASH_MULTIPLIER 1000003UL 452#define _PyHASH_BITS (sizeof(void*) < 8 ? 31 : 61) 453#define _PyHASH_MODULUS (((size_t)1 << _PyHASH_BITS) - 1) 454#define _PyHASH_INF 314159 455#define _PyHASH_NAN 0 456#define _PyHASH_IMAG _PyHASH_MULTIPLIER 457 458#define Py_HASH_EXTERNAL 0 459#define Py_HASH_SIPHASH24 1 460#define Py_HASH_FNV 2 461 462#define PY_STDIOTEXTMODE "b" 463 464#define Py_UNICODE_REPLACEMENT_CHARACTER ((Py_UCS4)0xFFFD) 465 466#define WAIT_LOCK 1 467#define NOWAIT_LOCK 0 468 469#ifdef __cplusplus 470} 471#endif 472 473#endif /* !CPYTHON_DATA_H */