diff options
author | Amaury Forgeot d'Arc <amauryfa@gmail.com> | 2008-09-09 07:28:22 (GMT) |
---|---|---|
committer | Amaury Forgeot d'Arc <amauryfa@gmail.com> | 2008-09-09 07:28:22 (GMT) |
commit | 8530e8590f4d31b5af66e43bd271b0ea1658ff3e (patch) | |
tree | cfdf80cc12f214bbaf6a01ce418a0206e15b08ae /Python | |
parent | 14b785192bb2b83b7826e9c0374c6d63e63f0f04 (diff) | |
download | cpython-8530e8590f4d31b5af66e43bd271b0ea1658ff3e.zip cpython-8530e8590f4d31b5af66e43bd271b0ea1658ff3e.tar.gz cpython-8530e8590f4d31b5af66e43bd271b0ea1658ff3e.tar.bz2 |
Revert r33661, which broke all buildbots.
Diffstat (limited to 'Python')
-rw-r--r-- | Python/import.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/Python/import.c b/Python/import.c index 13e46ad..9c077fe 100644 --- a/Python/import.c +++ b/Python/import.c @@ -2804,7 +2804,6 @@ call_find_module(char *name, PyObject *path) { extern int fclose(FILE *); PyObject *fob, *ret; - PyObject *pathobj; struct filedescr *fdp; char pathname[MAXPATHLEN+1]; FILE *fp = NULL; @@ -2848,9 +2847,9 @@ call_find_module(char *name, PyObject *path) fob = Py_None; Py_INCREF(fob); } - pathobj = PyUnicode_DecodeFSDefault(pathname); - ret = Py_BuildValue("NN(ssi)", - fob, pathobj, fdp->suffix, fdp->mode, fdp->type); + ret = Py_BuildValue("Os(ssi)", + fob, pathname, fdp->suffix, fdp->mode, fdp->type); + Py_DECREF(fob); PyMem_FREE(found_encoding); return ret; @@ -2861,9 +2860,7 @@ imp_find_module(PyObject *self, PyObject *args) { char *name; PyObject *path = NULL; - if (!PyArg_ParseTuple(args, "es|O:find_module", - Py_FileSystemDefaultEncoding, &name, - &path)) + if (!PyArg_ParseTuple(args, "s|O:find_module", &name, &path)) return NULL; return call_find_module(name, path); } |