2017-09-08 02:51:28 -03:00
|
|
|
#ifndef Py_INTERNAL_CEVAL_H
|
|
|
|
#define Py_INTERNAL_CEVAL_H
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2019-04-17 18:02:26 -03:00
|
|
|
#ifndef Py_BUILD_CORE
|
|
|
|
# error "this header requires Py_BUILD_CORE define"
|
2018-11-09 08:03:37 -04:00
|
|
|
#endif
|
|
|
|
|
2019-10-02 18:51:20 -03:00
|
|
|
/* Forward declarations */
|
2019-10-03 21:21:05 -03:00
|
|
|
struct pyruntimestate;
|
2019-10-02 18:51:20 -03:00
|
|
|
struct _ceval_runtime_state;
|
2019-11-14 07:20:46 -04:00
|
|
|
struct _frame;
|
|
|
|
|
|
|
|
#include "pycore_pystate.h" /* PyInterpreterState.eval_frame */
|
2017-09-08 02:51:28 -03:00
|
|
|
|
2020-01-13 13:46:59 -04:00
|
|
|
PyAPI_FUNC(void) _Py_FinishPendingCalls(PyThreadState *tstate);
|
2017-09-08 02:51:28 -03:00
|
|
|
PyAPI_FUNC(void) _PyEval_Initialize(struct _ceval_runtime_state *);
|
2019-05-10 18:39:09 -03:00
|
|
|
PyAPI_FUNC(void) _PyEval_FiniThreads(
|
2019-06-03 13:14:24 -03:00
|
|
|
struct _ceval_runtime_state *ceval);
|
2019-05-10 18:39:09 -03:00
|
|
|
PyAPI_FUNC(void) _PyEval_SignalReceived(
|
2019-06-03 13:14:24 -03:00
|
|
|
struct _ceval_runtime_state *ceval);
|
2019-05-10 18:39:09 -03:00
|
|
|
PyAPI_FUNC(int) _PyEval_AddPendingCall(
|
2019-05-24 12:01:38 -03:00
|
|
|
PyThreadState *tstate,
|
2019-06-03 13:14:24 -03:00
|
|
|
struct _ceval_runtime_state *ceval,
|
2019-05-10 18:39:09 -03:00
|
|
|
int (*func)(void *),
|
|
|
|
void *arg);
|
|
|
|
PyAPI_FUNC(void) _PyEval_SignalAsyncExc(
|
2019-06-03 13:14:24 -03:00
|
|
|
struct _ceval_runtime_state *ceval);
|
2019-05-13 07:35:37 -03:00
|
|
|
PyAPI_FUNC(void) _PyEval_ReInitThreads(
|
2019-10-03 21:21:05 -03:00
|
|
|
struct pyruntimestate *runtime);
|
2019-06-13 17:41:23 -03:00
|
|
|
PyAPI_FUNC(void) _PyEval_SetCoroutineOriginTrackingDepth(
|
|
|
|
PyThreadState *tstate,
|
|
|
|
int new_depth);
|
2017-09-08 02:51:28 -03:00
|
|
|
|
2019-06-03 09:30:58 -03:00
|
|
|
/* Private function */
|
|
|
|
void _PyEval_Fini(void);
|
|
|
|
|
2019-11-14 07:20:46 -04:00
|
|
|
static inline PyObject*
|
|
|
|
_PyEval_EvalFrame(PyThreadState *tstate, struct _frame *f, int throwflag)
|
|
|
|
{
|
|
|
|
return tstate->interp->eval_frame(f, throwflag);
|
|
|
|
}
|
|
|
|
|
2019-11-15 20:03:22 -04:00
|
|
|
extern PyObject *_PyEval_EvalCode(
|
|
|
|
PyThreadState *tstate,
|
|
|
|
PyObject *_co, PyObject *globals, PyObject *locals,
|
|
|
|
PyObject *const *args, Py_ssize_t argcount,
|
|
|
|
PyObject *const *kwnames, PyObject *const *kwargs,
|
|
|
|
Py_ssize_t kwcount, int kwstep,
|
|
|
|
PyObject *const *defs, Py_ssize_t defcount,
|
|
|
|
PyObject *kwdefs, PyObject *closure,
|
|
|
|
PyObject *name, PyObject *qualname);
|
|
|
|
|
2020-03-09 20:37:48 -03:00
|
|
|
extern int _PyEval_ThreadsInitialized(_PyRuntimeState *runtime);
|
2020-03-09 17:24:14 -03:00
|
|
|
extern PyStatus _PyEval_InitThreads(PyThreadState *tstate);
|
|
|
|
|
2017-09-08 02:51:28 -03:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
#endif /* !Py_INTERNAL_CEVAL_H */
|