summaryrefslogtreecommitdiffstats
path: root/Python/sysmodule.c
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2007-06-15 03:49:03 (GMT)
committerGuido van Rossum <guido@python.org>2007-06-15 03:49:03 (GMT)
commit96ca6916b43cda557934707cabce222ecfa87064 (patch)
treebcb8e349b7ee18db2b4ee1726ea0fa932a4615da /Python/sysmodule.c
parentaa588c4699877fd812c59debee71aa704b8f6dd4 (diff)
downloadcpython-96ca6916b43cda557934707cabce222ecfa87064.zip
cpython-96ca6916b43cda557934707cabce222ecfa87064.tar.gz
cpython-96ca6916b43cda557934707cabce222ecfa87064.tar.bz2
Make sys.path and sys.argv into lists of strings.
Remove the hack in test_popen.py to overcome this issue.
Diffstat (limited to 'Python/sysmodule.c')
-rw-r--r--Python/sysmodule.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/Python/sysmodule.c b/Python/sysmodule.c
index 71a455a..245d22a 100644
--- a/Python/sysmodule.c
+++ b/Python/sysmodule.c
@@ -1145,7 +1145,7 @@ makepathobject(char *path, int delim)
p = strchr(path, delim);
if (p == NULL)
p = strchr(path, '\0'); /* End of string */
- w = PyString_FromStringAndSize(path, (Py_ssize_t) (p - path));
+ w = PyUnicode_FromStringAndSize(path, (Py_ssize_t) (p - path));
if (w == NULL) {
Py_DECREF(v);
return NULL;
@@ -1190,14 +1190,14 @@ makeargvobject(int argc, char **argv)
if (i == 0) {
char* fn = decc$translate_vms(argv[0]);
if ((fn == (char *)0) || fn == (char *)-1)
- v = PyString_FromString(argv[0]);
+ v = PyUnicode_FromString(argv[0]);
else
- v = PyString_FromString(
+ v = PyUnicode_FromString(
decc$translate_vms(argv[0]));
} else
- v = PyString_FromString(argv[i]);
+ v = PyUnicode_FromString(argv[i]);
#else
- PyObject *v = PyString_FromString(argv[i]);
+ PyObject *v = PyUnicode_FromString(argv[i]);
#endif
if (v == NULL) {
Py_DECREF(av);
@@ -1301,7 +1301,7 @@ PySys_SetArgv(int argc, char **argv)
#endif /* Unix */
}
#endif /* All others */
- a = PyString_FromStringAndSize(argv0, n);
+ a = PyUnicode_FromStringAndSize(argv0, n);
if (a == NULL)
Py_FatalError("no mem for sys.path insertion");
if (PyList_Insert(path, 0, a) < 0)