Guido van Rossum | f70e43a | 1991-02-19 12:39:46 +0000 | [diff] [blame] | 1 | |
Guido van Rossum | 3f5da24 | 1990-12-20 15:06:42 +0000 | [diff] [blame] | 2 | /* Interfaces to parse and execute pieces of python code */ |
| 3 | |
Fred Drake | 3cf4d2b | 2000-07-09 00:55:06 +0000 | [diff] [blame] | 4 | #ifndef Py_PYTHONRUN_H |
| 5 | #define Py_PYTHONRUN_H |
| 6 | #ifdef __cplusplus |
| 7 | extern "C" { |
| 8 | #endif |
Guido van Rossum | 57d8e3f | 1997-07-19 19:50:52 +0000 | [diff] [blame] | 9 | |
Martin v. Löwis | 0d012f2 | 2010-12-04 12:00:49 +0000 | [diff] [blame] | 10 | PyAPI_FUNC(PyObject *) Py_CompileString(const char *, const char *, int); |
Victor Stinner | fe6e5e7 | 2020-12-08 23:51:54 +0100 | [diff] [blame] | 11 | |
Mark Hammond | 91a681d | 2002-08-12 07:21:58 +0000 | [diff] [blame] | 12 | PyAPI_FUNC(void) PyErr_Print(void); |
| 13 | PyAPI_FUNC(void) PyErr_PrintEx(int); |
| 14 | PyAPI_FUNC(void) PyErr_Display(PyObject *, PyObject *, PyObject *); |
Guido van Rossum | c6cf1dd | 1994-09-07 14:35:10 +0000 | [diff] [blame] | 15 | |
Jeremy Hylton | 3e0055f | 2005-10-20 19:59:25 +0000 | [diff] [blame] | 16 | |
Guido van Rossum | 3fb1aea | 1997-08-12 15:14:22 +0000 | [diff] [blame] | 17 | /* Stuff with no proper home (yet) */ |
Mark Hammond | 5d54667 | 2002-08-12 13:06:35 +0000 | [diff] [blame] | 18 | PyAPI_DATA(int) (*PyOS_InputHook)(void); |
Serhiy Storchaka | c679227 | 2013-10-19 21:03:34 +0300 | [diff] [blame] | 19 | PyAPI_DATA(char) *(*PyOS_ReadlineFunctionPointer)(FILE *, FILE *, const char *); |
Fredrik Lundh | 2f15b25 | 2000-08-27 19:15:31 +0000 | [diff] [blame] | 20 | |
| 21 | /* Stack size, in "pointers" (so we get extra safety margins |
| 22 | on 64-bit platforms). On a 32-bit platform, this translates |
Martin Panter | 4c35964 | 2016-05-08 13:53:41 +0000 | [diff] [blame] | 23 | to an 8k margin. */ |
Fredrik Lundh | 2f15b25 | 2000-08-27 19:15:31 +0000 | [diff] [blame] | 24 | #define PYOS_STACK_MARGIN 2048 |
| 25 | |
Paul Monson | 11efd79 | 2019-04-17 18:09:16 -0700 | [diff] [blame] | 26 | #if defined(WIN32) && !defined(MS_WIN64) && !defined(_M_ARM) && defined(_MSC_VER) && _MSC_VER >= 1300 |
Fredrik Lundh | 2f15b25 | 2000-08-27 19:15:31 +0000 | [diff] [blame] | 27 | /* Enable stack checking under Microsoft C */ |
| 28 | #define USE_STACKCHECK |
| 29 | #endif |
| 30 | |
Jack Jansen | 275abb3 | 2000-08-07 21:00:42 +0000 | [diff] [blame] | 31 | #ifdef USE_STACKCHECK |
Fredrik Lundh | 2f15b25 | 2000-08-27 19:15:31 +0000 | [diff] [blame] | 32 | /* Check that we aren't overflowing our stack */ |
Mark Hammond | 91a681d | 2002-08-12 07:21:58 +0000 | [diff] [blame] | 33 | PyAPI_FUNC(int) PyOS_CheckStack(void); |
Jack Jansen | 275abb3 | 2000-08-07 21:00:42 +0000 | [diff] [blame] | 34 | #endif |
Guido van Rossum | 3fb1aea | 1997-08-12 15:14:22 +0000 | [diff] [blame] | 35 | |
Victor Stinner | fe6e5e7 | 2020-12-08 23:51:54 +0100 | [diff] [blame] | 36 | #ifndef Py_LIMITED_API |
| 37 | # define Py_CPYTHON_PYTHONRUN_H |
| 38 | # include "cpython/pythonrun.h" |
| 39 | # undef Py_CPYTHON_PYTHONRUN_H |
| 40 | #endif |
| 41 | |
Guido van Rossum | a330996 | 1993-07-28 09:05:47 +0000 | [diff] [blame] | 42 | #ifdef __cplusplus |
| 43 | } |
| 44 | #endif |
| 45 | #endif /* !Py_PYTHONRUN_H */ |