]> granicus.if.org Git - python/commit
bpo-38353: Add subfunctions to getpath.c (GH-16572)
authorVictor Stinner <vstinner@python.org>
Fri, 4 Oct 2019 00:22:39 +0000 (02:22 +0200)
committerGitHub <noreply@github.com>
Fri, 4 Oct 2019 00:22:39 +0000 (02:22 +0200)
commit03a8a56faca0c1851051269e3517d70cbce830b7
tree0ff81cb5696b6d951465a65a70a3a2954002ea53
parente982d8b64f5d358c578bfca5cdfe4524dbc74000
bpo-38353: Add subfunctions to getpath.c (GH-16572)

Following symbolic links is now limited to 40 attempts, just to
prevent loops.

Add subfunctions:

* Add resolve_symlinks()
* Add calculate_argv0_path_framework()
* Add calculate_which()
* Add calculate_program_macos()

Fix also _Py_wreadlink(): readlink() result type is Py_ssize_t, not
int.
Modules/getpath.c
Python/fileutils.c