This reverts r63675 based on the discussion in this thread:
http://mail.python.org/pipermail/python-dev/2008-June/079988.html
Python 2.6 should stick with PyString_* in its codebase. The PyBytes_* names
in the spirit of 3.0 are available via a #define only. See the email thread.
diff --git a/Doc/includes/noddy3.c b/Doc/includes/noddy3.c
index 5a0a6c1..60260ad 100644
--- a/Doc/includes/noddy3.c
+++ b/Doc/includes/noddy3.c
@@ -23,14 +23,14 @@
self = (Noddy *)type->tp_alloc(type, 0);
if (self != NULL) {
- self->first = PyBytes_FromString("");
+ self->first = PyString_FromString("");
if (self->first == NULL)
{
Py_DECREF(self);
return NULL;
}
- self->last = PyBytes_FromString("");
+ self->last = PyString_FromString("");
if (self->last == NULL)
{
Py_DECREF(self);
@@ -93,7 +93,7 @@
return -1;
}
- if (! PyBytes_Check(value)) {
+ if (! PyString_Check(value)) {
PyErr_SetString(PyExc_TypeError,
"The first attribute value must be a string");
return -1;
@@ -121,7 +121,7 @@
return -1;
}
- if (! PyBytes_Check(value)) {
+ if (! PyString_Check(value)) {
PyErr_SetString(PyExc_TypeError,
"The last attribute value must be a string");
return -1;
@@ -153,7 +153,7 @@
PyObject *args, *result;
if (format == NULL) {
- format = PyBytes_FromString("%s %s");
+ format = PyString_FromString("%s %s");
if (format == NULL)
return NULL;
}
@@ -162,7 +162,7 @@
if (args == NULL)
return NULL;
- result = PyBytes_Format(format, args);
+ result = PyString_Format(format, args);
Py_DECREF(args);
return result;