2019-11-04 19:48:34 +01:00
|
|
|
#ifndef Py_CPYTHON_CEVAL_H
|
|
|
|
|
# error "this header file must not be included directly"
|
|
|
|
|
#endif
|
|
|
|
|
|
2019-11-16 01:04:44 +01:00
|
|
|
PyAPI_FUNC(void) PyEval_SetProfile(Py_tracefunc, PyObject *);
|
2022-08-24 23:21:39 +01:00
|
|
|
PyAPI_FUNC(void) PyEval_SetProfileAllThreads(Py_tracefunc, PyObject *);
|
2019-11-16 01:04:44 +01:00
|
|
|
PyAPI_FUNC(void) PyEval_SetTrace(Py_tracefunc, PyObject *);
|
2022-08-24 23:21:39 +01:00
|
|
|
PyAPI_FUNC(void) PyEval_SetTraceAllThreads(Py_tracefunc, PyObject *);
|
2019-11-16 01:04:44 +01:00
|
|
|
|
|
|
|
|
/* Look at the current frame's (if any) code's co_flags, and turn on
|
|
|
|
|
the corresponding compiler flags in cf->cf_flags. Return 1 if any
|
|
|
|
|
flag was set, else return 0. */
|
|
|
|
|
PyAPI_FUNC(int) PyEval_MergeCompilerFlags(PyCompilerFlags *cf);
|
|
|
|
|
|
2022-04-06 13:58:07 +02:00
|
|
|
PyAPI_FUNC(PyObject *) _PyEval_EvalFrameDefault(PyThreadState *tstate, struct _PyInterpreterFrame *f, int exc);
|
|
|
|
|
|
2023-02-28 09:31:01 +01:00
|
|
|
PyAPI_FUNC(Py_ssize_t) PyUnstable_Eval_RequestCodeExtraIndex(freefunc);
|
|
|
|
|
// Old name -- remove when this API changes:
|
|
|
|
|
_Py_DEPRECATED_EXTERNALLY(3.12) static inline Py_ssize_t
|
|
|
|
|
_PyEval_RequestCodeExtraIndex(freefunc f) {
|
|
|
|
|
return PyUnstable_Eval_RequestCodeExtraIndex(f);
|
|
|
|
|
}
|
2019-11-16 01:04:44 +01:00
|
|
|
|
|
|
|
|
PyAPI_FUNC(int) _PyEval_SliceIndex(PyObject *, Py_ssize_t *);
|
|
|
|
|
PyAPI_FUNC(int) _PyEval_SliceIndexNotNone(PyObject *, Py_ssize_t *);
|
2024-10-18 09:26:08 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
// Trampoline API
|
|
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
|
FILE* perf_map;
|
|
|
|
|
PyThread_type_lock map_lock;
|
|
|
|
|
} PerfMapState;
|
|
|
|
|
|
|
|
|
|
PyAPI_FUNC(int) PyUnstable_PerfMapState_Init(void);
|
|
|
|
|
PyAPI_FUNC(int) PyUnstable_WritePerfMapEntry(
|
|
|
|
|
const void *code_addr,
|
|
|
|
|
unsigned int code_size,
|
|
|
|
|
const char *entry_name);
|
|
|
|
|
PyAPI_FUNC(void) PyUnstable_PerfMapState_Fini(void);
|
|
|
|
|
PyAPI_FUNC(int) PyUnstable_CopyPerfMapFile(const char* parent_filename);
|
|
|
|
|
PyAPI_FUNC(int) PyUnstable_PerfTrampoline_CompileCode(PyCodeObject *);
|
|
|
|
|
PyAPI_FUNC(int) PyUnstable_PerfTrampoline_SetPersistAfterFork(int enable);
|