From 7d270ee05d7553aea1052cf7957358888ac8ad85 Mon Sep 17 00:00:00 2001 From: Nick Coghlan Date: Thu, 17 Oct 2013 22:35:35 +1000 Subject: 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) --- Include/pythonrun.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Include/pythonrun.h') 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 *); -- cgit v1.2.1