Basename of an interpreter path: the segment after the last '/'. Shebangs * are a POSIX convention, so only '/' is treated as a separator. */
| 1085 | /* Basename of an interpreter path: the segment after the last '/'. Shebangs |
| 1086 | * are a POSIX convention, so only '/' is treated as a separator. */ |
| 1087 | static const char *interp_basename(const char *path) { |
| 1088 | const char *slash = strrchr(path, '/'); |
| 1089 | return slash ? slash + SKIP_ONE : path; |
| 1090 | } |
| 1091 | |
| 1092 | /* "python" optionally followed by an explicit numeric version (digits and dots |
| 1093 | * only, e.g. "python3", "python3.12"). Bounded and explicit so arbitrary |