File indexing completed on 2025-01-18 10:06:48
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
0021
0022
0023
0024
0025
0026
0027 Py_DEPRECATED(3.9) PyAPI_FUNC(PyObject *) PyEval_CallObjectWithKeywords(
0028 PyObject *callable,
0029 PyObject *args,
0030 PyObject *kwargs);
0031
0032
0033 #define PyEval_CallObject(callable, arg) \
0034 PyEval_CallObjectWithKeywords((callable), (arg), _PyObject_CAST(_Py_NULL))
0035
0036 Py_DEPRECATED(3.9) PyAPI_FUNC(PyObject *) PyEval_CallFunction(
0037 PyObject *callable, const char *format, ...);
0038 Py_DEPRECATED(3.9) PyAPI_FUNC(PyObject *) PyEval_CallMethod(
0039 PyObject *obj, const char *name, const char *format, ...);
0040
0041 PyAPI_FUNC(PyObject *) PyEval_GetBuiltins(void);
0042 PyAPI_FUNC(PyObject *) PyEval_GetGlobals(void);
0043 PyAPI_FUNC(PyObject *) PyEval_GetLocals(void);
0044 PyAPI_FUNC(PyFrameObject *) PyEval_GetFrame(void);
0045
0046 PyAPI_FUNC(int) Py_AddPendingCall(int (*func)(void *), void *arg);
0047 PyAPI_FUNC(int) Py_MakePendingCalls(void);
0048
0049
0050
0051
0052
0053
0054
0055
0056
0057
0058
0059
0060
0061
0062
0063
0064
0065
0066
0067
0068
0069
0070
0071
0072
0073
0074 PyAPI_FUNC(void) Py_SetRecursionLimit(int);
0075 PyAPI_FUNC(int) Py_GetRecursionLimit(void);
0076
0077 PyAPI_FUNC(int) Py_EnterRecursiveCall(const char *where);
0078 PyAPI_FUNC(void) Py_LeaveRecursiveCall(void);
0079
0080 PyAPI_FUNC(const char *) PyEval_GetFuncName(PyObject *);
0081 PyAPI_FUNC(const char *) PyEval_GetFuncDesc(PyObject *);
0082
0083 PyAPI_FUNC(PyObject *) PyEval_EvalFrame(PyFrameObject *);
0084 PyAPI_FUNC(PyObject *) PyEval_EvalFrameEx(PyFrameObject *f, int exc);
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
0112
0113
0114
0115
0116
0117
0118
0119
0120
0121
0122
0123
0124
0125
0126
0127
0128 PyAPI_FUNC(PyThreadState *) PyEval_SaveThread(void);
0129 PyAPI_FUNC(void) PyEval_RestoreThread(PyThreadState *);
0130
0131 Py_DEPRECATED(3.9) PyAPI_FUNC(int) PyEval_ThreadsInitialized(void);
0132 Py_DEPRECATED(3.9) PyAPI_FUNC(void) PyEval_InitThreads(void);
0133
0134
0135
0136
0137 Py_DEPRECATED(3.2) PyAPI_FUNC(void) PyEval_AcquireLock(void);
0138 Py_DEPRECATED(3.2) PyAPI_FUNC(void) PyEval_ReleaseLock(void);
0139 PyAPI_FUNC(void) PyEval_AcquireThread(PyThreadState *tstate);
0140 PyAPI_FUNC(void) PyEval_ReleaseThread(PyThreadState *tstate);
0141
0142 #define Py_BEGIN_ALLOW_THREADS { \
0143 PyThreadState *_save; \
0144 _save = PyEval_SaveThread();
0145 #define Py_BLOCK_THREADS PyEval_RestoreThread(_save);
0146 #define Py_UNBLOCK_THREADS _save = PyEval_SaveThread();
0147 #define Py_END_ALLOW_THREADS PyEval_RestoreThread(_save); \
0148 }
0149
0150
0151 #define FVC_MASK 0x3
0152 #define FVC_NONE 0x0
0153 #define FVC_STR 0x1
0154 #define FVC_REPR 0x2
0155 #define FVC_ASCII 0x3
0156 #define FVS_MASK 0x4
0157 #define FVS_HAVE_SPEC 0x4
0158
0159 #ifndef Py_LIMITED_API
0160 # define Py_CPYTHON_CEVAL_H
0161 # include "cpython/ceval.h"
0162 # undef Py_CPYTHON_CEVAL_H
0163 #endif
0164
0165 #ifdef __cplusplus
0166 }
0167 #endif
0168 #endif