summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorNeal Norwitz <nnorwitz@gmail.com>2007-10-27 04:00:45 (GMT)
committerNeal Norwitz <nnorwitz@gmail.com>2007-10-27 04:00:45 (GMT)
commitbed678449f55a47fad914fa9e04df547c240f810 (patch)
tree143d515c8b240389ce2a2b541c604d6d3f8f79f9 /Doc
parent841e122f0ea1d73ca10a5ee91692d3a6c878af3c (diff)
downloadcpython-bed678449f55a47fad914fa9e04df547c240f810.zip
cpython-bed678449f55a47fad914fa9e04df547c240f810.tar.gz
cpython-bed678449f55a47fad914fa9e04df547c240f810.tar.bz2
Get rid of more uses of string and use unicode
Diffstat (limited to 'Doc')
-rw-r--r--Doc/includes/noddy2.c8
-rw-r--r--Doc/includes/noddy3.c12
-rw-r--r--Doc/includes/noddy4.c8
-rw-r--r--Doc/includes/run-func.c2
4 files changed, 15 insertions, 15 deletions
diff --git a/Doc/includes/noddy2.c b/Doc/includes/noddy2.c
index 2caf985..eaa355f 100644
--- a/Doc/includes/noddy2.c
+++ b/Doc/includes/noddy2.c
@@ -23,14 +23,14 @@ Noddy_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
self = (Noddy *)type->tp_alloc(type, 0);
if (self != NULL) {
- self->first = PyString_FromString("");
+ self->first = PyUnicode_FromString("");
if (self->first == NULL)
{
Py_DECREF(self);
return NULL;
}
- self->last = PyString_FromString("");
+ self->last = PyUnicode_FromString("");
if (self->last == NULL)
{
Py_DECREF(self);
@@ -90,7 +90,7 @@ Noddy_name(Noddy* self)
PyObject *args, *result;
if (format == NULL) {
- format = PyString_FromString("%s %s");
+ format = PyUnicode_FromString("%s %s");
if (format == NULL)
return NULL;
}
@@ -109,7 +109,7 @@ Noddy_name(Noddy* self)
if (args == NULL)
return NULL;
- result = PyString_Format(format, args);
+ result = PyUnicode_Format(format, args);
Py_DECREF(args);
return result;
diff --git a/Doc/includes/noddy3.c b/Doc/includes/noddy3.c
index 60260ad..3a1c0c2 100644
--- a/Doc/includes/noddy3.c
+++ b/Doc/includes/noddy3.c
@@ -23,14 +23,14 @@ Noddy_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
self = (Noddy *)type->tp_alloc(type, 0);
if (self != NULL) {
- self->first = PyString_FromString("");
+ self->first = PyUnicode_FromString("");
if (self->first == NULL)
{
Py_DECREF(self);
return NULL;
}
- self->last = PyString_FromString("");
+ self->last = PyUnicode_FromString("");
if (self->last == NULL)
{
Py_DECREF(self);
@@ -93,7 +93,7 @@ Noddy_setfirst(Noddy *self, PyObject *value, void *closure)
return -1;
}
- if (! PyString_Check(value)) {
+ if (! PyUnicode_Check(value)) {
PyErr_SetString(PyExc_TypeError,
"The first attribute value must be a string");
return -1;
@@ -121,7 +121,7 @@ Noddy_setlast(Noddy *self, PyObject *value, void *closure)
return -1;
}
- if (! PyString_Check(value)) {
+ if (! PyUnicode_Check(value)) {
PyErr_SetString(PyExc_TypeError,
"The last attribute value must be a string");
return -1;
@@ -153,7 +153,7 @@ Noddy_name(Noddy* self)
PyObject *args, *result;
if (format == NULL) {
- format = PyString_FromString("%s %s");
+ format = PyUnicode_FromString("%s %s");
if (format == NULL)
return NULL;
}
@@ -162,7 +162,7 @@ Noddy_name(Noddy* self)
if (args == NULL)
return NULL;
- result = PyString_Format(format, args);
+ result = PyUnicode_Format(format, args);
Py_DECREF(args);
return result;
diff --git a/Doc/includes/noddy4.c b/Doc/includes/noddy4.c
index 878e086..ac0b1f4 100644
--- a/Doc/includes/noddy4.c
+++ b/Doc/includes/noddy4.c
@@ -57,14 +57,14 @@ Noddy_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
self = (Noddy *)type->tp_alloc(type, 0);
if (self != NULL) {
- self->first = PyString_FromString("");
+ self->first = PyUnicode_FromString("");
if (self->first == NULL)
{
Py_DECREF(self);
return NULL;
}
- self->last = PyString_FromString("");
+ self->last = PyUnicode_FromString("");
if (self->last == NULL)
{
Py_DECREF(self);
@@ -124,7 +124,7 @@ Noddy_name(Noddy* self)
PyObject *args, *result;
if (format == NULL) {
- format = PyString_FromString("%s %s");
+ format = PyUnicode_FromString("%s %s");
if (format == NULL)
return NULL;
}
@@ -143,7 +143,7 @@ Noddy_name(Noddy* self)
if (args == NULL)
return NULL;
- result = PyString_Format(format, args);
+ result = PyUnicode_Format(format, args);
Py_DECREF(args);
return result;
diff --git a/Doc/includes/run-func.c b/Doc/includes/run-func.c
index 5a7df0d..e4f5a27 100644
--- a/Doc/includes/run-func.c
+++ b/Doc/includes/run-func.c
@@ -13,7 +13,7 @@ main(int argc, char *argv[])
}
Py_Initialize();
- pName = PyString_FromString(argv[1]);
+ pName = PyUnicode_FromString(argv[1]);
/* Error checking of pName left out */
pModule = PyImport_Import(pName);