File indexing completed on 2025-11-19 09:50:53
0001
0002
0003 #ifndef Py_CEVAL_H
0004 #define Py_CEVAL_H
0005 #ifdef __cplusplus
0006 extern "C" {
0007 #endif
0008
0009
0010 PyAPI_FUNC(PyObject *) PyEval_EvalCode(PyObject *, PyObject *, PyObject *);
0011
0012 PyAPI_FUNC(PyObject *) PyEval_EvalCodeEx(PyObject *co,
0013 PyObject *globals,
0014 PyObject *locals,
0015 PyObject *const *args, int argc,
0016 PyObject *const *kwds, int kwdc,
0017 PyObject *const *defs, int defc,
0018 PyObject *kwdefs, PyObject *closure);
0019
0020 PyAPI_FUNC(PyObject *) PyEval_GetBuiltins(void);
0021 PyAPI_FUNC(PyObject *) PyEval_GetGlobals(void);
0022 PyAPI_FUNC(PyObject *) PyEval_GetLocals(void);
0023 PyAPI_FUNC(PyFrameObject *) PyEval_GetFrame(void);
0024
0025 PyAPI_FUNC(PyObject *) PyEval_GetFrameBuiltins(void);
0026 PyAPI_FUNC(PyObject *) PyEval_GetFrameGlobals(void);
0027 PyAPI_FUNC(PyObject *) PyEval_GetFrameLocals(void);
0028
0029 PyAPI_FUNC(int) Py_AddPendingCall(int (*func)(void *), void *arg);
0030 PyAPI_FUNC(int) Py_MakePendingCalls(void);
0031
0032
0033
0034
0035
0036
0037
0038
0039
0040
0041
0042
0043
0044
0045
0046
0047
0048
0049
0050
0051
0052
0053
0054
0055
0056
0057 PyAPI_FUNC(void) Py_SetRecursionLimit(int);
0058 PyAPI_FUNC(int) Py_GetRecursionLimit(void);
0059
0060 PyAPI_FUNC(int) Py_EnterRecursiveCall(const char *where);
0061 PyAPI_FUNC(void) Py_LeaveRecursiveCall(void);
0062
0063 PyAPI_FUNC(const char *) PyEval_GetFuncName(PyObject *);
0064 PyAPI_FUNC(const char *) PyEval_GetFuncDesc(PyObject *);
0065
0066 PyAPI_FUNC(PyObject *) PyEval_EvalFrame(PyFrameObject *);
0067 PyAPI_FUNC(PyObject *) PyEval_EvalFrameEx(PyFrameObject *f, int exc);
0068
0069
0070
0071
0072
0073
0074
0075
0076
0077
0078
0079
0080
0081
0082
0083
0084
0085
0086
0087
0088
0089
0090
0091
0092
0093
0094
0095
0096
0097
0098
0099
0100
0101
0102
0103
0104
0105
0106
0107
0108
0109
0110
0111 PyAPI_FUNC(PyThreadState *) PyEval_SaveThread(void);
0112 PyAPI_FUNC(void) PyEval_RestoreThread(PyThreadState *);
0113
0114 Py_DEPRECATED(3.9) PyAPI_FUNC(void) PyEval_InitThreads(void);
0115
0116 PyAPI_FUNC(void) PyEval_AcquireThread(PyThreadState *tstate);
0117 PyAPI_FUNC(void) PyEval_ReleaseThread(PyThreadState *tstate);
0118
0119 #define Py_BEGIN_ALLOW_THREADS { \
0120 PyThreadState *_save; \
0121 _save = PyEval_SaveThread();
0122 #define Py_BLOCK_THREADS PyEval_RestoreThread(_save);
0123 #define Py_UNBLOCK_THREADS _save = PyEval_SaveThread();
0124 #define Py_END_ALLOW_THREADS PyEval_RestoreThread(_save); \
0125 }
0126
0127
0128 #define FVC_MASK 0x3
0129 #define FVC_NONE 0x0
0130 #define FVC_STR 0x1
0131 #define FVC_REPR 0x2
0132 #define FVC_ASCII 0x3
0133 #define FVS_MASK 0x4
0134 #define FVS_HAVE_SPEC 0x4
0135
0136 #ifndef Py_LIMITED_API
0137 # define Py_CPYTHON_CEVAL_H
0138 # include "cpython/ceval.h"
0139 # undef Py_CPYTHON_CEVAL_H
0140 #endif
0141
0142 #ifdef __cplusplus
0143 }
0144 #endif
0145 #endif