bpo-45211: Move helpers from getpath.c to internal API. (gh-28550)

This accomplishes 2 things:

* consolidates some common code between getpath.c and getpathp.c
* makes the helpers available to code in other files

FWIW, the signature of the join_relfile() function (in fileutils.c) intentionally mirrors that of Windows' PathCchCombineEx().

Note that this change is mostly moving code around. No behavior is meant to change.

https://bugs.python.org/issue45211
This commit is contained in:
Eric Snow 2021-09-27 10:00:32 -06:00 committed by GitHub
parent e5f13ce5b4
commit ae7839bbe8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 164 additions and 100 deletions

View file

@ -587,11 +587,6 @@ Py_GetArgcArgv(int *argc, wchar_t ***argv)
/* --- PyConfig ---------------------------------------------- */
#define DECODE_LOCALE_ERR(NAME, LEN) \
(((LEN) == -2) \
? _PyStatus_ERR("cannot decode " NAME) \
: _PyStatus_NO_MEMORY())
#define MAX_HASH_SEED 4294967295UL