summaryrefslogtreecommitdiffstats
path: root/Include
diff options
context:
space:
mode:
authorEric Snow <ericsnowcurrently@gmail.com>2021-10-22 23:20:03 (GMT)
committerGitHub <noreply@github.com>2021-10-22 23:20:03 (GMT)
commit17c61045c51512add61a9e75e9c7343cf4e4fb82 (patch)
tree59a98afdea508cacfb4dc4f10acf2f5b402ea0b2 /Include
parentf30ad65dbf3c6b1b5eec14dc954d65ef32327857 (diff)
downloadcpython-17c61045c51512add61a9e75e9c7343cf4e4fb82.zip
cpython-17c61045c51512add61a9e75e9c7343cf4e4fb82.tar.gz
cpython-17c61045c51512add61a9e75e9c7343cf4e4fb82.tar.bz2
bpo-45506: Normalize _PyPathConfig.stdlib_dir when calculated. (#29040)
The recently added PyConfig.stdlib_dir was being set with ".." entries. When __file__ was added for from modules this caused a problem on out-of-tree builds. This PR fixes that by normalizing "stdlib_dir" when it is calculated in getpath.c. https://bugs.python.org/issue45506
Diffstat (limited to 'Include')
-rw-r--r--Include/internal/pycore_fileutils.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/Include/internal/pycore_fileutils.h b/Include/internal/pycore_fileutils.h
index ab436ae..d1caf9c 100644
--- a/Include/internal/pycore_fileutils.h
+++ b/Include/internal/pycore_fileutils.h
@@ -80,6 +80,9 @@ extern int _Py_add_relfile(wchar_t *dirname,
const wchar_t *relfile,
size_t bufsize);
extern size_t _Py_find_basename(const wchar_t *filename);
+PyAPI_FUNC(int) _Py_normalize_path(const wchar_t *path,
+ wchar_t *buf, const size_t buf_len);
+
// Macros to protect CRT calls against instant termination when passed an
// invalid parameter (bpo-23524). IPH stands for Invalid Parameter Handler.