diff options
author | Guido van Rossum <guido@python.org> | 1997-05-09 01:07:15 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1997-05-09 01:07:15 (GMT) |
commit | 0add15f6a5daceda1972746d2263aba8525c34c4 (patch) | |
tree | 6f67909aefc8d926c0130e6e17848ba7c1d01af4 /Objects/moduleobject.c | |
parent | c77b921c8223c2c541f91b488566573e449516ca (diff) | |
download | cpython-0add15f6a5daceda1972746d2263aba8525c34c4.zip cpython-0add15f6a5daceda1972746d2263aba8525c34c4.tar.gz cpython-0add15f6a5daceda1972746d2263aba8525c34c4.tar.bz2 |
removed last #ifdef SUPPORT_OBSOLETE_ACCESS bits.
Diffstat (limited to 'Objects/moduleobject.c')
-rw-r--r-- | Objects/moduleobject.c | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/Objects/moduleobject.c b/Objects/moduleobject.c index 0612119..1ba1a1b 100644 --- a/Objects/moduleobject.c +++ b/Objects/moduleobject.c @@ -133,14 +133,8 @@ module_getattr(m, name) res = PyDict_GetItemString(m->md_dict, name); if (res == NULL) PyErr_SetString(PyExc_AttributeError, name); - else { -#ifdef SUPPORT_OBSOLETE_ACCESS - if (PyAccess_Check(res)) - res = PyAccess_AsValue(res, PyEval_GetGlobals()); - else -#endif - Py_INCREF(res); - } + else + Py_INCREF(res); return res; } @@ -150,19 +144,11 @@ module_setattr(m, name, v) char *name; PyObject *v; { -#ifdef SUPPORT_OBSOLETE_ACCESS - PyObject *ac; -#endif if (name[0] == '_' && strcmp(name, "__dict__") == 0) { PyErr_SetString(PyExc_TypeError, "read-only special attribute"); return -1; } -#ifdef SUPPORT_OBSOLETE_ACCESS - ac = PyDict_GetItemString(m->md_dict, name); - if (ac != NULL && PyAccess_Check(ac)) - return PyAccess_SetValue(ac, PyEval_GetGlobals(), v); -#endif if (v == NULL) { int rv = PyDict_DelItemString(m->md_dict, name); if (rv < 0) |