Kaydet (Commit) 0bbf253e authored tarafından Guido van Rossum's avatar Guido van Rossum

Insert "./" in front of pathname when it contains no '/' (if USE_SHLIB)

üst 2878a699
...@@ -242,6 +242,12 @@ load_dynamic_module(name, pathname, fp) ...@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment