diff options
author | Gregory P. Smith <greg@mad-scientist.com> | 2008-06-09 04:58:54 (GMT) |
---|---|---|
committer | Gregory P. Smith <greg@mad-scientist.com> | 2008-06-09 04:58:54 (GMT) |
commit | dd96db63f689e2f0d8ae5a1436b3b3395eec7de5 (patch) | |
tree | b2299acac9ce44fc488fc7b2ae2a44548cd5fbb8 /Doc | |
parent | e98839a1f48b2915f1cc747884e64f4d6e4c8e7a (diff) | |
download | cpython-dd96db63f689e2f0d8ae5a1436b3b3395eec7de5.zip cpython-dd96db63f689e2f0d8ae5a1436b3b3395eec7de5.tar.gz cpython-dd96db63f689e2f0d8ae5a1436b3b3395eec7de5.tar.bz2 |
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.
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/includes/noddy2.c | 8 | ||||
-rw-r--r-- | Doc/includes/noddy3.c | 12 | ||||
-rw-r--r-- | Doc/includes/noddy4.c | 8 | ||||
-rw-r--r-- | Doc/includes/run-func.c | 2 |
4 files changed, 15 insertions, 15 deletions
diff --git a/Doc/includes/noddy2.c b/Doc/includes/noddy2.c index 837f270..2caf985 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 = 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); @@ -90,7 +90,7 @@ Noddy_name(Noddy* self) PyObject *args, *result; if (format == NULL) { - format = PyBytes_FromString("%s %s"); + format = PyString_FromString("%s %s"); if (format == NULL) return NULL; } @@ -109,7 +109,7 @@ Noddy_name(Noddy* self) if (args == NULL) return NULL; - result = PyBytes_Format(format, args); + result = PyString_Format(format, args); Py_DECREF(args); return result; 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 @@ Noddy_new(PyTypeObject *type, PyObject *args, PyObject *kwds) 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 @@ Noddy_setfirst(Noddy *self, PyObject *value, void *closure) 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 @@ Noddy_setlast(Noddy *self, PyObject *value, void *closure) 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 @@ Noddy_name(Noddy* self) 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 @@ Noddy_name(Noddy* self) if (args == NULL) return NULL; - result = PyBytes_Format(format, args); + result = PyString_Format(format, args); Py_DECREF(args); return result; diff --git a/Doc/includes/noddy4.c b/Doc/includes/noddy4.c index da41b2b..878e086 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 = 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); @@ -124,7 +124,7 @@ Noddy_name(Noddy* self) PyObject *args, *result; if (format == NULL) { - format = PyBytes_FromString("%s %s"); + format = PyString_FromString("%s %s"); if (format == NULL) return NULL; } @@ -143,7 +143,7 @@ Noddy_name(Noddy* self) if (args == NULL) return NULL; - result = PyBytes_Format(format, args); + result = PyString_Format(format, args); Py_DECREF(args); return result; diff --git a/Doc/includes/run-func.c b/Doc/includes/run-func.c index 1b7c942..5a7df0d 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 = PyBytes_FromString(argv[1]); + pName = PyString_FromString(argv[1]); /* Error checking of pName left out */ pModule = PyImport_Import(pName); |