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