1991-02-19 20:39:46 +08:00
|
|
|
|
1990-12-20 23:06:42 +08:00
|
|
|
/* Interfaces to parse and execute pieces of python code */
|
|
|
|
|
2000-07-09 08:55:06 +08:00
|
|
|
#ifndef Py_PYTHONRUN_H
|
|
|
|
#define Py_PYTHONRUN_H
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2010-12-04 20:00:49 +08:00
|
|
|
PyAPI_FUNC(PyObject *) Py_CompileString(const char *, const char *, int);
|
2020-12-09 06:51:54 +08:00
|
|
|
|
2002-08-12 15:21:58 +08:00
|
|
|
PyAPI_FUNC(void) PyErr_Print(void);
|
|
|
|
PyAPI_FUNC(void) PyErr_PrintEx(int);
|
|
|
|
PyAPI_FUNC(void) PyErr_Display(PyObject *, PyObject *, PyObject *);
|
1990-12-20 23:06:42 +08:00
|
|
|
|
2005-10-21 03:59:25 +08:00
|
|
|
|
1997-08-12 23:14:22 +08:00
|
|
|
/* Stuff with no proper home (yet) */
|
2002-08-12 21:06:35 +08:00
|
|
|
PyAPI_DATA(int) (*PyOS_InputHook)(void);
|
2000-08-28 03:15:31 +08:00
|
|
|
|
|
|
|
/* Stack size, in "pointers" (so we get extra safety margins
|
|
|
|
on 64-bit platforms). On a 32-bit platform, this translates
|
2016-05-08 21:53:41 +08:00
|
|
|
to an 8k margin. */
|
2000-08-28 03:15:31 +08:00
|
|
|
#define PYOS_STACK_MARGIN 2048
|
|
|
|
|
2019-04-18 09:09:16 +08:00
|
|
|
#if defined(WIN32) && !defined(MS_WIN64) && !defined(_M_ARM) && defined(_MSC_VER) && _MSC_VER >= 1300
|
2000-08-28 03:15:31 +08:00
|
|
|
/* Enable stack checking under Microsoft C */
|
2022-04-22 18:44:43 +08:00
|
|
|
// When changing the platforms, ensure PyOS_CheckStack() docs are still correct
|
2000-08-28 03:15:31 +08:00
|
|
|
#define USE_STACKCHECK
|
|
|
|
#endif
|
|
|
|
|
2000-08-08 05:00:42 +08:00
|
|
|
#ifdef USE_STACKCHECK
|
2000-08-28 03:15:31 +08:00
|
|
|
/* Check that we aren't overflowing our stack */
|
2002-08-12 15:21:58 +08:00
|
|
|
PyAPI_FUNC(int) PyOS_CheckStack(void);
|
2000-08-08 05:00:42 +08:00
|
|
|
#endif
|
1997-08-12 23:14:22 +08:00
|
|
|
|
2020-12-09 06:51:54 +08:00
|
|
|
#ifndef Py_LIMITED_API
|
|
|
|
# define Py_CPYTHON_PYTHONRUN_H
|
2021-10-15 07:50:04 +08:00
|
|
|
# include "cpython/pythonrun.h"
|
2020-12-09 06:51:54 +08:00
|
|
|
# undef Py_CPYTHON_PYTHONRUN_H
|
|
|
|
#endif
|
|
|
|
|
1993-07-28 17:05:47 +08:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
#endif /* !Py_PYTHONRUN_H */
|