summaryrefslogtreecommitdiff
path: root/Include/pythonrun.h
diff options
context:
space:
mode:
authorNick Coghlan <ncoghlan@gmail.com>2013-10-18 23:11:47 +1000
committerNick Coghlan <ncoghlan@gmail.com>2013-10-18 23:11:47 +1000
commit1805a62f1fe551b73b80d87a429ef496c1701b07 (patch)
tree3925c6426a13a6c46550befcc2c1f7ba253493f5 /Include/pythonrun.h
parentac1a2489681d16ecc92985aefbd944e3b70fd26f (diff)
downloadcpython-git-1805a62f1fe551b73b80d87a429ef496c1701b07.tar.gz
Issue #16129: Py_SetStandardStreamEncoding cleanups
- don't call PyErr_NoMemory with interpreter is not initialised - note that it's OK to call _PyMem_RawStrDup here - don't include this in the limited API - capitalise "IO" - be explicit that a non-zero return indicates an error - include versionadded marker in docs
Diffstat (limited to 'Include/pythonrun.h')
-rw-r--r--Include/pythonrun.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/Include/pythonrun.h b/Include/pythonrun.h
index 4cc4dcd07a..7f67ab7829 100644
--- a/Include/pythonrun.h
+++ b/Include/pythonrun.h
@@ -28,8 +28,13 @@ PyAPI_FUNC(wchar_t *) Py_GetProgramName(void);
PyAPI_FUNC(void) Py_SetPythonHome(wchar_t *);
PyAPI_FUNC(wchar_t *) Py_GetPythonHome(void);
+#ifndef Py_LIMITED_API
+/* Only used by applications that embed the interpreter and need to
+ * override the standard encoding determination mechanism
+ */
PyAPI_FUNC(int) Py_SetStandardStreamEncoding(const char *encoding,
const char *errors);
+#endif
PyAPI_FUNC(void) Py_Initialize(void);
PyAPI_FUNC(void) Py_InitializeEx(int);