Mercurial > cpython-lru_cache-weakref
diff Include/pythonrun.h @ 86426:12d7b6171b28
Issue #16129: Py_SetStandardStreamEncoding cleanups
- don't call PyErr_NoMemory with interpreter is not initialised
- note that it's OK to call _PyMem_RawStrDup here
- don't include this in the limited API
- capitalise "IO"
- be explicit that a non-zero return indicates an error
- include versionadded marker in docs
| author | Nick Coghlan <ncoghlan@gmail.com> |
|---|---|
| date | Fri, 18 Oct 2013 23:11:47 +1000 |
| parents | 537e13ca7683 |
| children | 3055e61f1e66 |
line wrap: on
line diff
--- a/Include/pythonrun.h Fri Oct 18 22:39:50 2013 +1000 +++ b/Include/pythonrun.h Fri Oct 18 23:11:47 2013 +1000 @@ -28,8 +28,13 @@ PyAPI_FUNC(void) Py_SetPythonHome(wchar_t *); PyAPI_FUNC(wchar_t *) Py_GetPythonHome(void); +#ifndef Py_LIMITED_API +/* Only used by applications that embed the interpreter and need to + * override the standard encoding determination mechanism + */ PyAPI_FUNC(int) Py_SetStandardStreamEncoding(const char *encoding, const char *errors); +#endif PyAPI_FUNC(void) Py_Initialize(void); PyAPI_FUNC(void) Py_InitializeEx(int);
