[Python-3000-checkins] r57356 - in python/branches/py3k: Modules/_curses_panel.c Modules/bz2module.c Modules/gcmodule.c Modules/zlibmodule.c Objects/dictobject.c Objects/listobject.c Objects/setobject.c
neal.norwitz
python-3000-checkins at python.org
Thu Aug 23 23:42:56 CEST 2007
Author: neal.norwitz
Date: Thu Aug 23 23:42:55 2007
New Revision: 57356
Modified:
python/branches/py3k/Modules/_curses_panel.c
python/branches/py3k/Modules/bz2module.c
python/branches/py3k/Modules/gcmodule.c
python/branches/py3k/Modules/zlibmodule.c
python/branches/py3k/Objects/dictobject.c
python/branches/py3k/Objects/listobject.c
python/branches/py3k/Objects/setobject.c
Log:
Convert a bunch of constant strings in C to unicode.
Modified: python/branches/py3k/Modules/_curses_panel.c
==============================================================================
--- python/branches/py3k/Modules/_curses_panel.c (original)
+++ python/branches/py3k/Modules/_curses_panel.c Thu Aug 23 23:42:55 2007
@@ -472,7 +472,7 @@
PyDict_SetItemString(d, "error", PyCursesError);
/* Make the version available */
- v = PyString_FromString(PyCursesVersion);
+ v = PyUnicode_FromString(PyCursesVersion);
PyDict_SetItemString(d, "version", v);
PyDict_SetItemString(d, "__version__", v);
Py_DECREF(v);
Modified: python/branches/py3k/Modules/bz2module.c
==============================================================================
--- python/branches/py3k/Modules/bz2module.c (original)
+++ python/branches/py3k/Modules/bz2module.c Thu Aug 23 23:42:55 2007
@@ -2048,7 +2048,7 @@
if (m == NULL)
return;
- PyModule_AddObject(m, "__author__", PyString_FromString(__author__));
+ PyModule_AddObject(m, "__author__", PyUnicode_FromString(__author__));
Py_INCREF(&BZ2File_Type);
PyModule_AddObject(m, "BZ2File", (PyObject *)&BZ2File_Type);
Modified: python/branches/py3k/Modules/gcmodule.c
==============================================================================
--- python/branches/py3k/Modules/gcmodule.c (original)
+++ python/branches/py3k/Modules/gcmodule.c Thu Aug 23 23:42:55 2007
@@ -851,7 +851,7 @@
if (PyErr_Occurred()) {
if (gc_str == NULL)
- gc_str = PyString_FromString("garbage collection");
+ gc_str = PyUnicode_FromString("garbage collection");
PyErr_WriteUnraisable(gc_str);
Py_FatalError("unexpected exception during garbage collection");
}
Modified: python/branches/py3k/Modules/zlibmodule.c
==============================================================================
--- python/branches/py3k/Modules/zlibmodule.c (original)
+++ python/branches/py3k/Modules/zlibmodule.c Thu Aug 23 23:42:55 2007
@@ -1039,7 +1039,7 @@
PyModule_AddIntConstant(m, "Z_SYNC_FLUSH", Z_SYNC_FLUSH);
PyModule_AddIntConstant(m, "Z_FULL_FLUSH", Z_FULL_FLUSH);
- ver = PyString_FromString(ZLIB_VERSION);
+ ver = PyUnicode_FromString(ZLIB_VERSION);
if (ver != NULL)
PyModule_AddObject(m, "ZLIB_VERSION", ver);
Modified: python/branches/py3k/Objects/dictobject.c
==============================================================================
--- python/branches/py3k/Objects/dictobject.c (original)
+++ python/branches/py3k/Objects/dictobject.c Thu Aug 23 23:42:55 2007
@@ -194,7 +194,7 @@
{
register dictobject *mp;
if (dummy == NULL) { /* Auto-initialize dummy */
- dummy = PyString_FromString("<dummy key>");
+ dummy = PyUnicode_FromString("<dummy key>");
if (dummy == NULL)
return NULL;
#ifdef SHOW_CONVERSION_COUNTS
Modified: python/branches/py3k/Objects/listobject.c
==============================================================================
--- python/branches/py3k/Objects/listobject.c (original)
+++ python/branches/py3k/Objects/listobject.c Thu Aug 23 23:42:55 2007
@@ -142,7 +142,7 @@
}
if (i < 0 || i >= Py_Size(op)) {
if (indexerr == NULL)
- indexerr = PyString_FromString(
+ indexerr = PyUnicode_FromString(
"list index out of range");
PyErr_SetObject(PyExc_IndexError, indexerr);
return NULL;
@@ -362,7 +362,7 @@
{
if (i < 0 || i >= Py_Size(a)) {
if (indexerr == NULL)
- indexerr = PyString_FromString(
+ indexerr = PyUnicode_FromString(
"list index out of range");
PyErr_SetObject(PyExc_IndexError, indexerr);
return NULL;
Modified: python/branches/py3k/Objects/setobject.c
==============================================================================
--- python/branches/py3k/Objects/setobject.c (original)
+++ python/branches/py3k/Objects/setobject.c Thu Aug 23 23:42:55 2007
@@ -966,7 +966,7 @@
register PySetObject *so = NULL;
if (dummy == NULL) { /* Auto-initialize dummy */
- dummy = PyString_FromString("<dummy key>");
+ dummy = PyUnicode_FromString("<dummy key>");
if (dummy == NULL)
return NULL;
}
More information about the Python-3000-checkins
mailing list