summaryrefslogtreecommitdiffstats
path: root/Python/sysmodule.c
diff options
context:
space:
mode:
authorWalter Dörwald <walter@livinglogic.de>2007-06-07 18:41:59 (GMT)
committerWalter Dörwald <walter@livinglogic.de>2007-06-07 18:41:59 (GMT)
commit94093ffcb68f79180c35b1c651738194a97a1bcb (patch)
treeb05b0bfbacb9c572f18fbfa3c19ae4430f0294af /Python/sysmodule.c
parent3d1d712afcbfc3ccc106f15ca37adc72087b449f (diff)
downloadcpython-94093ffcb68f79180c35b1c651738194a97a1bcb.zip
cpython-94093ffcb68f79180c35b1c651738194a97a1bcb.tar.gz
cpython-94093ffcb68f79180c35b1c651738194a97a1bcb.tar.bz2
Change most sys attributes that were str8 objects into str objects
(executable, prefix and exec_prefix are still str8).
Diffstat (limited to 'Python/sysmodule.c')
-rw-r--r--Python/sysmodule.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/Python/sysmodule.c b/Python/sysmodule.c
index 442e66a..30e0180 100644
--- a/Python/sysmodule.c
+++ b/Python/sysmodule.c
@@ -1049,13 +1049,13 @@ _PySys_Init(void)
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 @@ _PySys_Init(void)
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 @@ _PySys_Init(void)
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) {