Mercurial > cpython-lru_cache-weakref
diff Objects/mappingobject.c @ 3986:9c2cbf306864 legacy-trunk
Support for tp_getattro, tp_setattro (Sjoerd)
| author | Guido van Rossum <guido@python.org> |
|---|---|
| date | Fri, 09 Aug 1996 20:52:03 +0000 |
| parents | fa1480e60ed6 |
| children | 65d2d8e67da3 |
line wrap: on
line diff
--- a/Objects/mappingobject.c Fri Aug 09 20:51:27 1996 +0000 +++ b/Objects/mappingobject.c Fri Aug 09 20:52:03 1996 +0000 @@ -769,6 +769,9 @@ 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 @@ 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);
