summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2010-06-28 02:58:25 (GMT)
committerBenjamin Peterson <benjamin@python.org>2010-06-28 02:58:25 (GMT)
commit4c5bc4d7f82a26f9339f0dd00d030114e4d86a14 (patch)
tree9cb41e97da77721ff795eb118ed3dfbe446362e1 /Objects
parenta70e91c28471e3949d78acb4c54c59b136ee1c9d (diff)
downloadcpython-4c5bc4d7f82a26f9339f0dd00d030114e4d86a14.zip
cpython-4c5bc4d7f82a26f9339f0dd00d030114e4d86a14.tar.gz
cpython-4c5bc4d7f82a26f9339f0dd00d030114e4d86a14.tar.bz2
remove unused last argument to property_copy
Diffstat (limited to 'Objects')
-rw-r--r--Objects/descrobject.c28
1 files changed, 12 insertions, 16 deletions
diff --git a/Objects/descrobject.c b/Objects/descrobject.c
index 0b83233..9d735a2 100644
--- a/Objects/descrobject.c
+++ b/Objects/descrobject.c
@@ -1102,7 +1102,7 @@ typedef struct {
} propertyobject;
static PyObject * property_copy(PyObject *, PyObject *, PyObject *,
- PyObject *, PyObject *);
+ PyObject *);
static PyMemberDef property_members[] = {
{"fget", T_OBJECT, offsetof(propertyobject, prop_get), READONLY},
@@ -1119,7 +1119,7 @@ PyDoc_STRVAR(getter_doc,
static PyObject *
property_getter(PyObject *self, PyObject *getter)
{
- return property_copy(self, getter, NULL, NULL, NULL);
+ return property_copy(self, getter, NULL, NULL);
}
@@ -1129,7 +1129,7 @@ PyDoc_STRVAR(setter_doc,
static PyObject *
property_setter(PyObject *self, PyObject *setter)
{
- return property_copy(self, NULL, setter, NULL, NULL);
+ return property_copy(self, NULL, setter, NULL);
}
@@ -1139,7 +1139,7 @@ PyDoc_STRVAR(deleter_doc,
static PyObject *
property_deleter(PyObject *self, PyObject *deleter)
{
- return property_copy(self, NULL, NULL, deleter, NULL);
+ return property_copy(self, NULL, NULL, deleter);
}
@@ -1208,11 +1208,10 @@ property_descr_set(PyObject *self, PyObject *obj, PyObject *value)
}
static PyObject *
-property_copy(PyObject *old, PyObject *get, PyObject *set, PyObject *del,
- PyObject *doc)
+property_copy(PyObject *old, PyObject *get, PyObject *set, PyObject *del)
{
propertyobject *pold = (propertyobject *)old;
- PyObject *new, *type;
+ PyObject *new, *type, *doc;
type = PyObject_Type(old);
if (type == NULL)
@@ -1230,15 +1229,12 @@ property_copy(PyObject *old, PyObject *get, PyObject *set, PyObject *del,
Py_XDECREF(del);
del = pold->prop_del ? pold->prop_del : Py_None;
}
- if (doc == NULL || doc == Py_None) {
- Py_XDECREF(doc);
- if (pold->getter_doc && get != Py_None) {
- /* make _init use __doc__ from getter */
- doc = Py_None;
- }
- else {
- doc = pold->prop_doc ? pold->prop_doc : Py_None;
- }
+ if (pold->getter_doc && get != Py_None) {
+ /* make _init use __doc__ from getter */
+ doc = Py_None;
+ }
+ else {
+ doc = pold->prop_doc ? pold->prop_doc : Py_None;
}
new = PyObject_CallFunction(type, "OOOO", get, set, del, doc);