You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

50 lines
1.3 KiB

  1. /* Interfaces to parse and execute pieces of python code */
  2. #ifndef Py_PYTHONRUN_H
  3. #define Py_PYTHONRUN_H
  4. #ifdef __cplusplus
  5. extern "C" {
  6. #endif
  7. PyAPI_FUNC(PyObject *) Py_CompileString(const char *, const char *, int);
  8. PyAPI_FUNC(struct symtable *) Py_SymtableString(
  9. const char *str,
  10. const char *filename, /* decoded from the filesystem encoding */
  11. int start);
  12. PyAPI_FUNC(void) PyErr_Print(void);
  13. PyAPI_FUNC(void) PyErr_PrintEx(int);
  14. PyAPI_FUNC(void) PyErr_Display(PyObject *, PyObject *, PyObject *);
  15. /* Stuff with no proper home (yet) */
  16. PyAPI_DATA(int) (*PyOS_InputHook)(void);
  17. PyAPI_DATA(char) *(*PyOS_ReadlineFunctionPointer)(FILE *, FILE *, const char *);
  18. /* Stack size, in "pointers" (so we get extra safety margins
  19. on 64-bit platforms). On a 32-bit platform, this translates
  20. to an 8k margin. */
  21. #define PYOS_STACK_MARGIN 2048
  22. #if defined(WIN32) && !defined(MS_WIN64) && !defined(_M_ARM) && defined(_MSC_VER) && _MSC_VER >= 1300
  23. /* Enable stack checking under Microsoft C */
  24. #define USE_STACKCHECK
  25. #endif
  26. #ifdef USE_STACKCHECK
  27. /* Check that we aren't overflowing our stack */
  28. PyAPI_FUNC(int) PyOS_CheckStack(void);
  29. #endif
  30. #ifndef Py_LIMITED_API
  31. # define Py_CPYTHON_PYTHONRUN_H
  32. # include "cpython/pythonrun.h"
  33. # undef Py_CPYTHON_PYTHONRUN_H
  34. #endif
  35. #ifdef __cplusplus
  36. }
  37. #endif
  38. #endif /* !Py_PYTHONRUN_H */