diff options
author | Nick Coghlan <ncoghlan@gmail.com> | 2013-10-17 12:35:35 (GMT) |
---|---|---|
committer | Nick Coghlan <ncoghlan@gmail.com> | 2013-10-17 12:35:35 (GMT) |
commit | 7d270ee05d7553aea1052cf7957358888ac8ad85 (patch) | |
tree | 4b3252363aac65d60104ef68dbc2d5174c0d8a91 /Include | |
parent | 26f92680da305a4f3007c47e11cced893991ec70 (diff) | |
download | cpython-7d270ee05d7553aea1052cf7957358888ac8ad85.zip cpython-7d270ee05d7553aea1052cf7957358888ac8ad85.tar.gz cpython-7d270ee05d7553aea1052cf7957358888ac8ad85.tar.bz2 |
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)
Diffstat (limited to 'Include')
-rw-r--r-- | Include/pythonrun.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Include/pythonrun.h b/Include/pythonrun.h index 8fdb5b5..70c412b 100644 --- a/Include/pythonrun.h +++ b/Include/pythonrun.h @@ -38,6 +38,8 @@ PyAPI_FUNC(int) Py_IsInitialized(void); 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 *); |