summaryrefslogtreecommitdiffstats
path: root/Objects/dictobject.c
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1996-08-09 20:52:03 (GMT)
committerGuido van Rossum <guido@python.org>1996-08-09 20:52:03 (GMT)
commitd8eb1b340f47bdac2141c996b113ad665c0343f2 (patch)
treea36fc5f2c214044d50b18d2ee0837d8fb3265746 /Objects/dictobject.c
parent929f1b83ea8810c66a5e1e9f162d8680463abb0f (diff)
downloadcpython-d8eb1b340f47bdac2141c996b113ad665c0343f2.zip
cpython-d8eb1b340f47bdac2141c996b113ad665c0343f2.tar.gz
cpython-d8eb1b340f47bdac2141c996b113ad665c0343f2.tar.bz2
Support for tp_getattro, tp_setattro (Sjoerd)
Diffstat (limited to 'Objects/dictobject.c')
-rw-r--r--Objects/dictobject.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/Objects/dictobject.c b/Objects/dictobject.c
index f655828..605c6db 100644
--- a/Objects/dictobject.c
+++ b/Objects/dictobject.c
@@ -769,6 +769,9 @@ getattro(v, name)
object *v;
object *name;
{
+ if (v->ob_type->tp_getattro != NULL)
+ return (*v->ob_type->tp_getattro)(v, name);
+
if (name != last_name_object) {
XDECREF(last_name_object);
INCREF(name);
@@ -784,6 +787,9 @@ setattro(v, name, value)
object *name;
object *value;
{
+ if (v->ob_type->tp_setattro != NULL)
+ return (*v->ob_type->tp_setattro)(v, name, value);
+
if (name != last_name_object) {
XDECREF(last_name_object);
INCREF(name);