Author: walter.doerwald
Date: Thu Jun  7 20:41:59 2007
New Revision: 55810

Modified:
   python/branches/py3k-struni/Python/sysmodule.c
Log:
Change most sys attributes that were str8 objects into str objects
(executable, prefix and exec_prefix are still str8).


Modified: python/branches/py3k-struni/Python/sysmodule.c
==============================================================================
--- python/branches/py3k-struni/Python/sysmodule.c      (original)
+++ python/branches/py3k-struni/Python/sysmodule.c      Thu Jun  7 20:41:59 2007
@@ -1049,13 +1049,13 @@
        PyDict_SetItemString(sysdict, "__excepthook__",
                              PyDict_GetItemString(sysdict, "excepthook"));
        PyDict_SetItemString(sysdict, "version",
-                            v = PyString_FromString(Py_GetVersion()));
+                            v = PyUnicode_FromString(Py_GetVersion()));
        Py_XDECREF(v);
        PyDict_SetItemString(sysdict, "hexversion",
                             v = PyInt_FromLong(PY_VERSION_HEX));
        Py_XDECREF(v);
        svnversion_init();
-       v = Py_BuildValue("(ssz)", "CPython", branch, svn_revision);
+       v = Py_BuildValue("(UUU)", "CPython", branch, svn_revision);
        PyDict_SetItemString(sysdict, "subversion", v);
        Py_XDECREF(v);
        /*
@@ -1079,16 +1079,16 @@
        Py_XDECREF(v)
 
        SET_SYS_FROM_STRING("version_info",
-                           Py_BuildValue("iiisi", PY_MAJOR_VERSION,
+                           Py_BuildValue("iiiUi", PY_MAJOR_VERSION,
                                               PY_MINOR_VERSION,
                                               PY_MICRO_VERSION, s,
                                               PY_RELEASE_SERIAL));
        SET_SYS_FROM_STRING("api_version",
                            PyInt_FromLong(PYTHON_API_VERSION));
        SET_SYS_FROM_STRING("copyright",
-                           PyString_FromString(Py_GetCopyright()));
+                           PyUnicode_FromString(Py_GetCopyright()));
        SET_SYS_FROM_STRING("platform",
-                           PyString_FromString(Py_GetPlatform()));
+                           PyUnicode_FromString(Py_GetPlatform()));
        SET_SYS_FROM_STRING("executable",
                            PyString_FromString(Py_GetProgramFullPath()));
        SET_SYS_FROM_STRING("prefix",
@@ -1113,13 +1113,13 @@
                else
                        value = "little";
                SET_SYS_FROM_STRING("byteorder",
-                                   PyString_FromString(value));
+                                   PyUnicode_FromString(value));
        }
 #ifdef MS_COREDLL
        SET_SYS_FROM_STRING("dllhandle",
                            PyLong_FromVoidPtr(PyWin_DLLhModule));
        SET_SYS_FROM_STRING("winver",
-                           PyString_FromString(PyWin_DLLVersionString));
+                           PyUnicode_FromString(PyWin_DLLVersionString));
 #endif
 #undef SET_SYS_FROM_STRING
        if (warnoptions == NULL) {
_______________________________________________
Python-3000-checkins mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-3000-checkins

Reply via email to