diff options
author | Christian Heimes <christian@cheimes.de> | 2007-11-04 11:43:14 (GMT) |
---|---|---|
committer | Christian Heimes <christian@cheimes.de> | 2007-11-04 11:43:14 (GMT) |
commit | 5894ba7fad07dbf07ac76aedf0fb2f70fb42d40e (patch) | |
tree | 60efee02e3d305b57990e816efc8ff0626fa09ac /Python/sysmodule.c | |
parent | 9c1257ecf83cc52986995367cedbb093fda140af (diff) | |
download | cpython-5894ba7fad07dbf07ac76aedf0fb2f70fb42d40e.zip cpython-5894ba7fad07dbf07ac76aedf0fb2f70fb42d40e.tar.gz cpython-5894ba7fad07dbf07ac76aedf0fb2f70fb42d40e.tar.bz2 |
Fixed a bug in PyUnicode_DecodeFSDefault. strcmp() returns 0 on success.
Added PyUnicode_DecodeFSDefaultAndSize
Fixed a problem with the sys.path code that caused a segfault on Windows when the path contains non ASCII chars. The code for sys.executable, exec_prefix and prefix should be fixed, too.
Diffstat (limited to 'Python/sysmodule.c')
-rw-r--r-- | Python/sysmodule.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/sysmodule.c b/Python/sysmodule.c index 13e0a99..d140fe3 100644 --- a/Python/sysmodule.c +++ b/Python/sysmodule.c @@ -1150,7 +1150,7 @@ makepathobject(const char *path, int delim) p = strchr(path, delim); if (p == NULL) p = strchr(path, '\0'); /* End of string */ - w = PyUnicode_FromStringAndSize(path, (Py_ssize_t) (p - path)); + w = PyUnicode_DecodeFSDefaultAndSize(path, (Py_ssize_t) (p - path)); if (w == NULL) { Py_DECREF(v); return NULL; |