Author: christian.heimes
Date: Thu Nov 22 08:43:40 2007
New Revision: 59113

Modified:
   python/branches/py3k/Modules/posixmodule.c
Log:
os.environ contains PyUnicode instances and not PyString instances

Modified: python/branches/py3k/Modules/posixmodule.c
==============================================================================
--- python/branches/py3k/Modules/posixmodule.c  (original)
+++ python/branches/py3k/Modules/posixmodule.c  Thu Nov 22 08:43:40 2007
@@ -3026,7 +3026,7 @@
         /* 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 @@
                {
                        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 @@
                {
                        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();
_______________________________________________
Python-3000-checkins mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-3000-checkins

Reply via email to