mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
bpo-45582: Port getpath[p].c to Python (GH-29041)
The getpath.py file is frozen at build time and executed as code over a namespace. It is never imported, nor is it meant to be importable or reusable. However, it should be easier to read, modify, and patch than the previous code. This commit attempts to preserve every previously tested quirk, but these may be changed in the future to better align platforms.
This commit is contained in:
parent
9f2f7e4226
commit
99fcf15052
40 changed files with 3686 additions and 3838 deletions
|
@ -74,14 +74,15 @@ extern int _Py_EncodeNonUnicodeWchar_InPlace(
|
|||
Py_ssize_t size);
|
||||
#endif
|
||||
|
||||
extern int _Py_isabs(const wchar_t *path);
|
||||
extern int _Py_abspath(const wchar_t *path, wchar_t **abspath_p);
|
||||
extern wchar_t * _Py_join_relfile(const wchar_t *dirname,
|
||||
const wchar_t *relfile);
|
||||
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);
|
||||
PyAPI_FUNC(wchar_t *) _Py_normpath(wchar_t *path, Py_ssize_t size);
|
||||
|
||||
|
||||
// Macros to protect CRT calls against instant termination when passed an
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue