Files
cpython/Include/internal/pycore_sysmodule.h
T
Victor Stinner 1b41c7b722 gh-152132: Enhance Py_RunMain() and fix bugs (#153461)
* Check for signals more often. Previously, a pending exception could
  be removed by PyErr_Clear().
* Only call _PyInterpreterState_SetNotRunningMain() if
  _PyInterpreterState_SetRunningMain() has been called.
* Add pymain_error() and pyrun_error(): write the error message to
  sys.stderr instead of the C stream stderr.
* Convert _PyPathConfig_UpdateGlobal() PyStatus error to an
  exception.
* Simplify pymain_run_startup(): avoid strerror() which is decoded
  from the wrong encoding. Instead display the exception, Py_fopen()
  raises an OSError with the path object (and can raise other exceptions).
* Add pymain_set_path0() function.
* Add _PySys_FormatV() function.
2026-07-10 01:29:53 +02:00

34 lines
841 B
C

#ifndef Py_INTERNAL_SYSMODULE_H
#define Py_INTERNAL_SYSMODULE_H
#ifdef __cplusplus
extern "C" {
#endif
#ifndef Py_BUILD_CORE
# error "this header requires Py_BUILD_CORE define"
#endif
// Export for '_pickle' shared extension
PyAPI_FUNC(size_t) _PySys_GetSizeOf(PyObject *);
extern int _PySys_SetAttr(PyObject *, PyObject *);
extern int _PySys_ClearAttrString(PyInterpreterState *interp,
const char *name, int verbose);
extern int _PySys_SetFlagObj(Py_ssize_t pos, PyObject *new_value);
extern int _PySys_SetIntMaxStrDigits(int maxdigits);
extern int _PySysRemoteDebug_SendExec(int pid, int tid, const char *debugger_script_path);
extern void _PySys_FormatV(
PyObject *key,
FILE *fp,
const char *format,
va_list va);
#ifdef __cplusplus
}
#endif
#endif /* !Py_INTERNAL_SYSMODULE_H */