Mercurial > cpython-lru_cache-weakref
diff Include/pythonrun.h @ 86399:9cd88b39ef62
Issue #16129: Add `Py_SetStandardStreamEncoding`
This new pre-initialization API allows embedding
applications like Blender to force a particular
encoding and error handler for the standard IO streams.
Also refactors Modules/_testembed.c to let us start
testing multiple embedding scenarios.
(Initial patch by Bastien Montagne)
| author | Nick Coghlan <ncoghlan@gmail.com> |
|---|---|
| date | Thu, 17 Oct 2013 22:35:35 +1000 |
| parents | acc7439b1406 |
| children | 537e13ca7683 |
line wrap: on
line diff
--- a/Include/pythonrun.h Thu Oct 17 13:56:18 2013 +0100 +++ b/Include/pythonrun.h Thu Oct 17 22:35:35 2013 +1000 @@ -38,6 +38,8 @@ PyAPI_FUNC(PyThreadState *) Py_NewInterpreter(void); PyAPI_FUNC(void) Py_EndInterpreter(PyThreadState *); +PyAPI_FUNC(int) Py_SetStandardStreamEncoding(const char *encoding, const char *errors); + #ifndef Py_LIMITED_API PyAPI_FUNC(int) PyRun_SimpleStringFlags(const char *, PyCompilerFlags *); PyAPI_FUNC(int) PyRun_AnyFileFlags(FILE *, const char *, PyCompilerFlags *);
