mirror of
https://github.com/python/cpython.git
synced 2025-08-02 16:13:13 +00:00
Insert "./" in front of pathname when it contains no '/' (if USE_SHLIB)
This commit is contained in:
parent
2878a69922
commit
0bbf253e97
1 changed files with 6 additions and 0 deletions
|
@ -242,6 +242,12 @@ load_dynamic_module(name, pathname, fp)
|
||||||
void *handle;
|
void *handle;
|
||||||
} handles[128];
|
} handles[128];
|
||||||
static int nhandles = 0;
|
static int nhandles = 0;
|
||||||
|
char pathbuf[260];
|
||||||
|
if (strchr(pathname, '/') == NULL) {
|
||||||
|
/* Prefix bare filename with "./" */
|
||||||
|
sprintf(pathbuf, "./%-.255s", pathname);
|
||||||
|
pathname = pathbuf;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
sprintf(funcname, FUNCNAME_PATTERN, name);
|
sprintf(funcname, FUNCNAME_PATTERN, name);
|
||||||
#ifdef USE_SHLIB
|
#ifdef USE_SHLIB
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue