• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 
2 /* Interfaces to parse and execute pieces of python code */
3 
4 #ifndef Py_PYTHONRUN_H
5 #define Py_PYTHONRUN_H
6 #ifdef __cplusplus
7 extern "C" {
8 #endif
9 
10 PyAPI_FUNC(PyObject *) Py_CompileString(const char *, const char *, int);
11 
12 PyAPI_FUNC(void) PyErr_Print(void);
13 PyAPI_FUNC(void) PyErr_PrintEx(int);
14 PyAPI_FUNC(void) PyErr_Display(PyObject *, PyObject *, PyObject *);
15 
16 #if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x030C0000
17 PyAPI_FUNC(void) PyErr_DisplayException(PyObject *);
18 #endif
19 
20 
21 /* Stuff with no proper home (yet) */
22 PyAPI_DATA(int) (*PyOS_InputHook)(void);
23 
24 /* Stack size, in "pointers" (so we get extra safety margins
25    on 64-bit platforms).  On a 32-bit platform, this translates
26    to an 8k margin. */
27 #define PYOS_STACK_MARGIN 2048
28 
29 #if defined(WIN32) && !defined(MS_WIN64) && !defined(_M_ARM) && defined(_MSC_VER) && _MSC_VER >= 1300
30 /* Enable stack checking under Microsoft C */
31 // When changing the platforms, ensure PyOS_CheckStack() docs are still correct
32 #define USE_STACKCHECK
33 #endif
34 
35 #ifdef USE_STACKCHECK
36 /* Check that we aren't overflowing our stack */
37 PyAPI_FUNC(int) PyOS_CheckStack(void);
38 #endif
39 
40 #ifndef Py_LIMITED_API
41 #  define Py_CPYTHON_PYTHONRUN_H
42 #  include "cpython/pythonrun.h"
43 #  undef Py_CPYTHON_PYTHONRUN_H
44 #endif
45 
46 #ifdef __cplusplus
47 }
48 #endif
49 #endif /* !Py_PYTHONRUN_H */
50