summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorMarc-André Lemburg <mal@egenix.com>2000-09-18 16:22:27 (GMT)
committerMarc-André Lemburg <mal@egenix.com>2000-09-18 16:22:27 (GMT)
commit691270feee4fd2da19b36eca3bfac4b83ceb119a (patch)
tree76439a4de2a1638274a6c4283b3d5bf211a65d65 /Python
parent1675375a7c0c37265e36e36e9bb6a109373d8276 (diff)
downloadcpython-691270feee4fd2da19b36eca3bfac4b83ceb119a.zip
cpython-691270feee4fd2da19b36eca3bfac4b83ceb119a.tar.gz
cpython-691270feee4fd2da19b36eca3bfac4b83ceb119a.tar.bz2
Deferred the attribute name object type checking to the underlying
PyObject_Set/GetAttr() calls. This patch fixes bug #113829.
Diffstat (limited to 'Python')
-rw-r--r--Python/bltinmodule.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/Python/bltinmodule.c b/Python/bltinmodule.c
index 47c8af3..3eac8d5 100644
--- a/Python/bltinmodule.c
+++ b/Python/bltinmodule.c
@@ -824,7 +824,7 @@ builtin_getattr(PyObject *self, PyObject *args)
PyObject *v, *result, *dflt = NULL;
PyObject *name;
- if (!PyArg_ParseTuple(args, "OS|O:getattr", &v, &name, &dflt))
+ if (!PyArg_ParseTuple(args, "OO|O:getattr", &v, &name, &dflt))
return NULL;
result = PyObject_GetAttr(v, name);
if (result == NULL && dflt != NULL) {
@@ -867,7 +867,7 @@ builtin_hasattr(PyObject *self, PyObject *args)
PyObject *v;
PyObject *name;
- if (!PyArg_ParseTuple(args, "OS:hasattr", &v, &name))
+ if (!PyArg_ParseTuple(args, "OO:hasattr", &v, &name))
return NULL;
v = PyObject_GetAttr(v, name);
if (v == NULL) {
@@ -1076,7 +1076,7 @@ builtin_setattr(PyObject *self, PyObject *args)
PyObject *name;
PyObject *value;
- if (!PyArg_ParseTuple(args, "OSO:setattr", &v, &name, &value))
+ if (!PyArg_ParseTuple(args, "OOO:setattr", &v, &name, &value))
return NULL;
if (PyObject_SetAttr(v, name, value) != 0)
return NULL;
@@ -1097,7 +1097,7 @@ builtin_delattr(PyObject *self, PyObject *args)
PyObject *v;
PyObject *name;
- if (!PyArg_ParseTuple(args, "OS:delattr", &v, &name))
+ if (!PyArg_ParseTuple(args, "OO:delattr", &v, &name))
return NULL;
if (PyObject_SetAttr(v, name, (PyObject *)NULL) != 0)
return NULL;