diff options
author | Christian Heimes <christian@cheimes.de> | 2007-11-22 07:43:40 (GMT) |
---|---|---|
committer | Christian Heimes <christian@cheimes.de> | 2007-11-22 07:43:40 (GMT) |
commit | 830a4bcfd44ec651c2cb23bdaf4c1b4a3529e2f3 (patch) | |
tree | e1b106461590192ba431d6afa69d0f579a5291c8 /Modules | |
parent | b2b6262831694a6b21657f3fbfd1683a87da2823 (diff) | |
download | cpython-830a4bcfd44ec651c2cb23bdaf4c1b4a3529e2f3.zip cpython-830a4bcfd44ec651c2cb23bdaf4c1b4a3529e2f3.tar.gz cpython-830a4bcfd44ec651c2cb23bdaf4c1b4a3529e2f3.tar.bz2 |
os.environ contains PyUnicode instances and not PyString instances
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/posixmodule.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c index 5d65985..55ea3b9 100644 --- a/Modules/posixmodule.c +++ b/Modules/posixmodule.c @@ -3026,7 +3026,7 @@ posix_execve(PyObject *self, PyObject *args) /* Omit Pseudo-Env Vars that Would Confuse Programs if Passed On */ if (stricmp(k, "BEGINLIBPATH") != 0 && stricmp(k, "ENDLIBPATH") != 0) { #endif - len = PyString_Size(key) + PyString_Size(val) + 2; + len = PyUnicode_GetSize(key) + PyUnicode_GetSize(val) + 2; p = PyMem_NEW(char, len); if (p == NULL) { PyErr_NoMemory(); @@ -3256,7 +3256,7 @@ posix_spawnve(PyObject *self, PyObject *args) { goto fail_2; } - len = PyString_Size(key) + PyString_Size(val) + 2; + len = PyUnicode_GetSize(key) + PyUnicode_GetSize(val) + 2; p = PyMem_NEW(char, len); if (p == NULL) { PyErr_NoMemory(); @@ -3489,7 +3489,7 @@ posix_spawnvpe(PyObject *self, PyObject *args) { goto fail_2; } - len = PyString_Size(key) + PyString_Size(val) + 2; + len = PyUnicode_GetSize(key) + PyUnicode_GetSize(val) + 2; p = PyMem_NEW(char, len); if (p == NULL) { PyErr_NoMemory(); |