summaryrefslogtreecommitdiffstats
path: root/Include/pymem.h
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2017-11-24 21:55:40 (GMT)
committerGitHub <noreply@github.com>2017-11-24 21:55:40 (GMT)
commit46972b7bc385ec2bdc7f567bbd22c9e56ffdf003 (patch)
treee55f61feac1afb22e18bb33274a5e3f0beec5355 /Include/pymem.h
parent84c4b1938fade2b425ac906730beabd413de094d (diff)
downloadcpython-46972b7bc385ec2bdc7f567bbd22c9e56ffdf003.zip
cpython-46972b7bc385ec2bdc7f567bbd22c9e56ffdf003.tar.gz
cpython-46972b7bc385ec2bdc7f567bbd22c9e56ffdf003.tar.bz2
bpo-32030: Add _PyMainInterpreterConfig_ReadEnv() (#4542)
Py_GetPath() and Py_Main() now call _PyMainInterpreterConfig_ReadEnv() to share the same code to get environment variables. Changes: * Add _PyMainInterpreterConfig_ReadEnv() * Add _PyMainInterpreterConfig_Clear() * Add _PyMem_RawWcsdup() * _PyMainInterpreterConfig: rename pythonhome to home * Rename _Py_ReadMainInterpreterConfig() to _PyMainInterpreterConfig_Read() * Use _Py_INIT_USER_ERR(), instead of _Py_INIT_ERR(), for decoding errors: the user is able to fix the issue, it's not a bug in Python. Same change was made in _Py_INIT_NO_MEMORY(). * Remove _Py_GetPythonHomeWithConfig()
Diffstat (limited to 'Include/pymem.h')
-rw-r--r--Include/pymem.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/Include/pymem.h b/Include/pymem.h
index 928851a..57a34cf 100644
--- a/Include/pymem.h
+++ b/Include/pymem.h
@@ -105,8 +105,14 @@ PyAPI_FUNC(void *) PyMem_Realloc(void *ptr, size_t new_size);
PyAPI_FUNC(void) PyMem_Free(void *ptr);
#ifndef Py_LIMITED_API
+/* strdup() using PyMem_RawMalloc() */
PyAPI_FUNC(char *) _PyMem_RawStrdup(const char *str);
+
+/* strdup() using PyMem_Malloc() */
PyAPI_FUNC(char *) _PyMem_Strdup(const char *str);
+
+/* wcsdup() using PyMem_RawMalloc() */
+PyAPI_FUNC(wchar_t*) _PyMem_RawWcsdup(const wchar_t *str);
#endif
/* Macros. */