diff options
author | Guido van Rossum <guido@python.org> | 1996-08-12 22:00:53 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1996-08-12 22:00:53 (GMT) |
commit | 0dfcf753ad75892c0ad2a68713841402183514d4 (patch) | |
tree | ae704c4e11a11f44c5efd229d78c6558d3b0b78a /Objects/moduleobject.c | |
parent | aacdc9da75e31a48a90a8354f5ea29af4267a178 (diff) | |
download | cpython-0dfcf753ad75892c0ad2a68713841402183514d4.zip cpython-0dfcf753ad75892c0ad2a68713841402183514d4.tar.gz cpython-0dfcf753ad75892c0ad2a68713841402183514d4.tar.bz2 |
Disable support for access statement
Diffstat (limited to 'Objects/moduleobject.c')
-rw-r--r-- | Objects/moduleobject.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Objects/moduleobject.c b/Objects/moduleobject.c index 7377a98..9049d79 100644 --- a/Objects/moduleobject.c +++ b/Objects/moduleobject.c @@ -127,9 +127,11 @@ module_getattr(m, name) if (res == NULL) err_setstr(AttributeError, name); else { +#ifdef SUPPORT_OBSOLETE_ACCESS if (is_accessobject(res)) res = getaccessvalue(res, getglobals()); else +#endif INCREF(res); } return res; @@ -141,14 +143,18 @@ module_setattr(m, name, v) char *name; object *v; { +#ifdef SUPPORT_OBSOLETE_ACCESS object *ac; +#endif if (name[0] == '_' && strcmp(name, "__dict__") == 0) { err_setstr(TypeError, "read-only special attribute"); return -1; } +#ifdef SUPPORT_OBSOLETE_ACCESS ac = dictlookup(m->md_dict, name); if (ac != NULL && is_accessobject(ac)) return setaccessvalue(ac, getglobals(), v); +#endif if (v == NULL) { int rv = dictremove(m->md_dict, name); if (rv < 0) |