mirror of
https://github.com/python/cpython.git
synced 2025-11-25 21:11:09 +00:00
bpo-38353: getpath.c: allocates strings on the heap (GH-16585)
* _Py_FindEnvConfigValue() now returns a string allocated by PyMem_RawMalloc(). * calculate_init() now decodes VPATH macro. * Add calculate_open_pyenv() function. * Add substring() and joinpath2() functions. * Fix add_exe_suffix() And a few cleanup changes.
This commit is contained in:
parent
abd7cd856b
commit
c02b41b1fb
4 changed files with 427 additions and 319 deletions
|
|
@ -56,11 +56,10 @@ extern PyStatus _PyPathConfig_Calculate(
|
|||
extern int _PyPathConfig_ComputeSysPath0(
|
||||
const PyWideStringList *argv,
|
||||
PyObject **path0);
|
||||
extern int _Py_FindEnvConfigValue(
|
||||
extern PyStatus _Py_FindEnvConfigValue(
|
||||
FILE *env_file,
|
||||
const wchar_t *key,
|
||||
wchar_t *value,
|
||||
size_t value_size);
|
||||
wchar_t **value_p);
|
||||
|
||||
#ifdef MS_WINDOWS
|
||||
extern wchar_t* _Py_GetDLLPath(void);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue