sysmodule.h 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. /* System module interface */
  2. #ifndef Py_SYSMODULE_H
  3. #define Py_SYSMODULE_H
  4. #ifdef __cplusplus
  5. extern "C" {
  6. #endif
  7. PyAPI_FUNC(PyObject *) PySys_GetObject(const char *);
  8. PyAPI_FUNC(int) PySys_SetObject(const char *, PyObject *);
  9. Py_DEPRECATED(3.11) PyAPI_FUNC(void) PySys_SetArgv(int, wchar_t **);
  10. Py_DEPRECATED(3.11) PyAPI_FUNC(void) PySys_SetArgvEx(int, wchar_t **, int);
  11. Py_DEPRECATED(3.11) PyAPI_FUNC(void) PySys_SetPath(const wchar_t *);
  12. PyAPI_FUNC(void) PySys_WriteStdout(const char *format, ...)
  13. Py_GCC_ATTRIBUTE((format(printf, 1, 2)));
  14. PyAPI_FUNC(void) PySys_WriteStderr(const char *format, ...)
  15. Py_GCC_ATTRIBUTE((format(printf, 1, 2)));
  16. PyAPI_FUNC(void) PySys_FormatStdout(const char *format, ...);
  17. PyAPI_FUNC(void) PySys_FormatStderr(const char *format, ...);
  18. PyAPI_FUNC(void) PySys_ResetWarnOptions(void);
  19. Py_DEPRECATED(3.11) PyAPI_FUNC(void) PySys_AddWarnOption(const wchar_t *);
  20. Py_DEPRECATED(3.11) PyAPI_FUNC(void) PySys_AddWarnOptionUnicode(PyObject *);
  21. Py_DEPRECATED(3.11) PyAPI_FUNC(int) PySys_HasWarnOptions(void);
  22. Py_DEPRECATED(3.11) PyAPI_FUNC(void) PySys_AddXOption(const wchar_t *);
  23. PyAPI_FUNC(PyObject *) PySys_GetXOptions(void);
  24. #if !defined(Py_LIMITED_API)
  25. typedef struct {
  26. FILE* perf_map;
  27. PyThread_type_lock map_lock;
  28. } PerfMapState;
  29. PyAPI_FUNC(int) PyUnstable_PerfMapState_Init(void);
  30. PyAPI_FUNC(int) PyUnstable_WritePerfMapEntry(const void *code_addr, unsigned int code_size, const char *entry_name);
  31. PyAPI_FUNC(void) PyUnstable_PerfMapState_Fini(void);
  32. #endif
  33. #ifndef Py_LIMITED_API
  34. # define Py_CPYTHON_SYSMODULE_H
  35. # include "cpython/sysmodule.h"
  36. # undef Py_CPYTHON_SYSMODULE_H
  37. #endif
  38. #ifdef __cplusplus
  39. }
  40. #endif
  41. #endif /* !Py_SYSMODULE_H */