2017-09-07 23:51:28 -06:00
|
|
|
#ifndef Py_INTERNAL_CEVAL_H
|
|
|
|
#define Py_INTERNAL_CEVAL_H
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2019-04-17 23:02:26 +02:00
|
|
|
#ifndef Py_BUILD_CORE
|
|
|
|
# error "this header requires Py_BUILD_CORE define"
|
2018-11-09 13:03:37 +01:00
|
|
|
#endif
|
|
|
|
|
2019-10-02 23:51:20 +02:00
|
|
|
/* Forward declarations */
|
2019-10-04 02:21:05 +02:00
|
|
|
struct pyruntimestate;
|
2019-10-02 23:51:20 +02:00
|
|
|
struct _ceval_runtime_state;
|
2019-11-14 12:20:46 +01:00
|
|
|
struct _frame;
|
|
|
|
|
|
|
|
#include "pycore_pystate.h" /* PyInterpreterState.eval_frame */
|
2017-09-07 23:51:28 -06:00
|
|
|
|
2020-01-13 18:46:59 +01:00
|
|
|
PyAPI_FUNC(void) _Py_FinishPendingCalls(PyThreadState *tstate);
|
2017-09-07 23:51:28 -06:00
|
|
|
PyAPI_FUNC(void) _PyEval_Initialize(struct _ceval_runtime_state *);
|
2019-05-10 23:39:09 +02:00
|
|
|
PyAPI_FUNC(void) _PyEval_FiniThreads(
|
2019-06-03 18:14:24 +02:00
|
|
|
struct _ceval_runtime_state *ceval);
|
2019-05-10 23:39:09 +02:00
|
|
|
PyAPI_FUNC(void) _PyEval_SignalReceived(
|
2019-06-03 18:14:24 +02:00
|
|
|
struct _ceval_runtime_state *ceval);
|
2019-05-10 23:39:09 +02:00
|
|
|
PyAPI_FUNC(int) _PyEval_AddPendingCall(
|
2019-05-24 17:01:38 +02:00
|
|
|
PyThreadState *tstate,
|
2019-06-03 18:14:24 +02:00
|
|
|
struct _ceval_runtime_state *ceval,
|
2019-05-10 23:39:09 +02:00
|
|
|
int (*func)(void *),
|
|
|
|
void *arg);
|
|
|
|
PyAPI_FUNC(void) _PyEval_SignalAsyncExc(
|
2019-06-03 18:14:24 +02:00
|
|
|
struct _ceval_runtime_state *ceval);
|
2019-05-13 12:35:37 +02:00
|
|
|
PyAPI_FUNC(void) _PyEval_ReInitThreads(
|
2019-10-04 02:21:05 +02:00
|
|
|
struct pyruntimestate *runtime);
|
2019-06-13 22:41:23 +02:00
|
|
|
PyAPI_FUNC(void) _PyEval_SetCoroutineOriginTrackingDepth(
|
|
|
|
PyThreadState *tstate,
|
|
|
|
int new_depth);
|
2017-09-07 23:51:28 -06:00
|
|
|
|
2019-06-03 21:30:58 +09:00
|
|
|
/* Private function */
|
|
|
|
void _PyEval_Fini(void);
|
|
|
|
|
2019-11-14 12:20:46 +01:00
|
|
|
static inline PyObject*
|
|
|
|
_PyEval_EvalFrame(PyThreadState *tstate, struct _frame *f, int throwflag)
|
|
|
|
{
|
|
|
|
return tstate->interp->eval_frame(f, throwflag);
|
|
|
|
}
|
|
|
|
|
2019-11-16 01:03:22 +01: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);
|
|
|
|
|
2017-09-07 23:51:28 -06:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
#endif /* !Py_INTERNAL_CEVAL_H */
|