mirror of
https://github.com/python/cpython.git
synced 2025-12-10 11:00:14 +00:00
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)
This commit is contained in:
parent
26f92680da
commit
7d270ee05d
8 changed files with 266 additions and 48 deletions
|
|
@ -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 *);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue