1 #ifndef Py_INTERNAL_INTRINSIC_H 2 #define Py_INTERNAL_INTRINSIC_H 3 4 #ifndef Py_BUILD_CORE 5 # error "this header requires Py_BUILD_CORE define" 6 #endif 7 8 /* Unary Functions: */ 9 #define INTRINSIC_1_INVALID 0 10 #define INTRINSIC_PRINT 1 11 #define INTRINSIC_IMPORT_STAR 2 12 #define INTRINSIC_STOPITERATION_ERROR 3 13 #define INTRINSIC_ASYNC_GEN_WRAP 4 14 #define INTRINSIC_UNARY_POSITIVE 5 15 #define INTRINSIC_LIST_TO_TUPLE 6 16 #define INTRINSIC_TYPEVAR 7 17 #define INTRINSIC_PARAMSPEC 8 18 #define INTRINSIC_TYPEVARTUPLE 9 19 #define INTRINSIC_SUBSCRIPT_GENERIC 10 20 #define INTRINSIC_TYPEALIAS 11 21 22 #define MAX_INTRINSIC_1 11 23 24 25 /* Binary Functions: */ 26 #define INTRINSIC_2_INVALID 0 27 #define INTRINSIC_PREP_RERAISE_STAR 1 28 #define INTRINSIC_TYPEVAR_WITH_BOUND 2 29 #define INTRINSIC_TYPEVAR_WITH_CONSTRAINTS 3 30 #define INTRINSIC_SET_FUNCTION_TYPE_PARAMS 4 31 #define INTRINSIC_SET_TYPEPARAM_DEFAULT 5 32 33 #define MAX_INTRINSIC_2 5 34 35 typedef PyObject *(*intrinsic_func1)(PyThreadState* tstate, PyObject *value); 36 typedef PyObject *(*intrinsic_func2)(PyThreadState* tstate, PyObject *value1, PyObject *value2); 37 38 typedef struct { 39 intrinsic_func1 func; 40 const char *name; 41 } intrinsic_func1_info; 42 43 typedef struct { 44 intrinsic_func2 func; 45 const char *name; 46 } intrinsic_func2_info; 47 48 PyAPI_DATA(const intrinsic_func1_info) _PyIntrinsics_UnaryFunctions[]; 49 PyAPI_DATA(const intrinsic_func2_info) _PyIntrinsics_BinaryFunctions[]; 50 51 #endif // !Py_INTERNAL_INTRINSIC_H 52