summaryrefslogtreecommitdiffstats
path: root/Objects/descrobject.c
diff options
context:
space:
mode:
authorChristian Heimes <christian@cheimes.de>2008-05-26 12:51:38 (GMT)
committerChristian Heimes <christian@cheimes.de>2008-05-26 12:51:38 (GMT)
commit593daf545bd9b7e7bcb27b498ecc6f36db9ae395 (patch)
treec0a57029b9ab0eb18a2bb4f8fd65f0817f1a1707 /Objects/descrobject.c
parentc3cb683d638e9d660c18a05293a576f98965166e (diff)
downloadcpython-593daf545bd9b7e7bcb27b498ecc6f36db9ae395.zip
cpython-593daf545bd9b7e7bcb27b498ecc6f36db9ae395.tar.gz
cpython-593daf545bd9b7e7bcb27b498ecc6f36db9ae395.tar.bz2
Renamed PyString to PyBytes
Diffstat (limited to 'Objects/descrobject.c')
-rw-r--r--Objects/descrobject.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/Objects/descrobject.c b/Objects/descrobject.c
index fcc174e..7cf5e62 100644
--- a/Objects/descrobject.c
+++ b/Objects/descrobject.c
@@ -15,8 +15,8 @@ descr_dealloc(PyDescrObject *descr)
static char *
descr_name(PyDescrObject *descr)
{
- if (descr->d_name != NULL && PyString_Check(descr->d_name))
- return PyString_AS_STRING(descr->d_name);
+ if (descr->d_name != NULL && PyBytes_Check(descr->d_name))
+ return PyBytes_AS_STRING(descr->d_name);
else
return "?";
}
@@ -24,7 +24,7 @@ descr_name(PyDescrObject *descr)
static PyObject *
descr_repr(PyDescrObject *descr, char *format)
{
- return PyString_FromFormat(format, descr_name(descr),
+ return PyBytes_FromFormat(format, descr_name(descr),
descr->d_type->tp_name);
}
@@ -314,7 +314,7 @@ method_get_doc(PyMethodDescrObject *descr, void *closure)
Py_INCREF(Py_None);
return Py_None;
}
- return PyString_FromString(descr->d_method->ml_doc);
+ return PyBytes_FromString(descr->d_method->ml_doc);
}
static PyMemberDef descr_members[] = {
@@ -335,7 +335,7 @@ member_get_doc(PyMemberDescrObject *descr, void *closure)
Py_INCREF(Py_None);
return Py_None;
}
- return PyString_FromString(descr->d_member->doc);
+ return PyBytes_FromString(descr->d_member->doc);
}
static PyGetSetDef member_getset[] = {
@@ -350,7 +350,7 @@ getset_get_doc(PyGetSetDescrObject *descr, void *closure)
Py_INCREF(Py_None);
return Py_None;
}
- return PyString_FromString(descr->d_getset->doc);
+ return PyBytes_FromString(descr->d_getset->doc);
}
static PyGetSetDef getset_getset[] = {
@@ -365,7 +365,7 @@ wrapperdescr_get_doc(PyWrapperDescrObject *descr, void *closure)
Py_INCREF(Py_None);
return Py_None;
}
- return PyString_FromString(descr->d_base->doc);
+ return PyBytes_FromString(descr->d_base->doc);
}
static PyGetSetDef wrapperdescr_getset[] = {
@@ -576,7 +576,7 @@ descr_new(PyTypeObject *descrtype, PyTypeObject *type, const char *name)
if (descr != NULL) {
Py_XINCREF(type);
descr->d_type = type;
- descr->d_name = PyString_InternFromString(name);
+ descr->d_name = PyBytes_InternFromString(name);
if (descr->d_name == NULL) {
Py_DECREF(descr);
descr = NULL;
@@ -922,7 +922,7 @@ wrapper_hash(wrapperobject *wp)
static PyObject *
wrapper_repr(wrapperobject *wp)
{
- return PyString_FromFormat("<method-wrapper '%s' of %s object at %p>",
+ return PyBytes_FromFormat("<method-wrapper '%s' of %s object at %p>",
wp->descr->d_base->name,
wp->self->ob_type->tp_name,
wp->self);
@@ -947,7 +947,7 @@ wrapper_name(wrapperobject *wp)
{
char *s = wp->descr->d_base->name;
- return PyString_FromString(s);
+ return PyBytes_FromString(s);
}
static PyObject *
@@ -960,7 +960,7 @@ wrapper_doc(wrapperobject *wp)
return Py_None;
}
else {
- return PyString_FromString(s);
+ return PyBytes_FromString(s);
}
}