summaryrefslogtreecommitdiff
path: root/Include/pythonrun.h
diff options
context:
space:
mode:
authorNick Coghlan <ncoghlan@gmail.com>2013-10-17 22:35:35 +1000
committerNick Coghlan <ncoghlan@gmail.com>2013-10-17 22:35:35 +1000
commit7d270ee05d7553aea1052cf7957358888ac8ad85 (patch)
tree4b3252363aac65d60104ef68dbc2d5174c0d8a91 /Include/pythonrun.h
parent26f92680da305a4f3007c47e11cced893991ec70 (diff)
downloadcpython-git-7d270ee05d7553aea1052cf7957358888ac8ad85.tar.gz
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/pythonrun.h')
-rw-r--r--Include/pythonrun.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/Include/pythonrun.h b/Include/pythonrun.h
index 8fdb5b5210..70c412be1b 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 *);