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