Issue #8589: Decode PYTHONWARNINGS environment variable with the file system

encoding and surrogateespace error handler instead of the locale encoding to be
consistent with os.environ. Add PySys_AddWarnOptionUnicode() function.
This commit is contained in:
Victor Stinner 2010-05-19 16:53:30 +00:00
parent a5bf3f520c
commit 9ca9c25bcd
5 changed files with 27 additions and 12 deletions

View file

@ -21,6 +21,7 @@ PyAPI_DATA(PyObject *) _PySys_TraceFunc, *_PySys_ProfileFunc;
PyAPI_FUNC(void) PySys_ResetWarnOptions(void);
PyAPI_FUNC(void) PySys_AddWarnOption(const wchar_t *);
PyAPI_FUNC(void) PySys_AddWarnOptionUnicode(PyObject *);
PyAPI_FUNC(int) PySys_HasWarnOptions(void);
#ifdef __cplusplus