Kaydet (Commit) 982b2fa3 authored tarafından Amaury Forgeot d'Arc's avatar Amaury Forgeot d'Arc

Better name a variable: 'buf' seems to imply a mutable buffer.

üst 1ba9c873
......@@ -1802,7 +1802,7 @@ static int init_builtin(char *); /* Forward */
its module object WITH INCREMENTED REFERENCE COUNT */
static PyObject *
load_module(char *name, FILE *fp, char *buf, int type, PyObject *loader)
load_module(char *name, FILE *fp, char *pathname, int type, PyObject *loader)
{
PyObject *modules;
PyObject *m;
......@@ -1823,27 +1823,27 @@ load_module(char *name, FILE *fp, char *buf, int type, PyObject *loader)
switch (type) {
case PY_SOURCE:
m = load_source_module(name, buf, fp);
m = load_source_module(name, pathname, fp);
break;
case PY_COMPILED:
m = load_compiled_module(name, buf, fp);
m = load_compiled_module(name, pathname, fp);
break;
#ifdef HAVE_DYNAMIC_LOADING
case C_EXTENSION:
m = _PyImport_LoadDynamicModule(name, buf, fp);
m = _PyImport_LoadDynamicModule(name, pathname, fp);
break;
#endif
case PKG_DIRECTORY:
m = load_package(name, buf);
m = load_package(name, pathname);
break;
case C_BUILTIN:
case PY_FROZEN:
if (buf != NULL && buf[0] != '\0')
name = buf;
if (pathname != NULL && pathname[0] != '\0')
name = pathname;
if (type == C_BUILTIN)
err = init_builtin(name);
else
......
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