summaryrefslogtreecommitdiffstats
path: root/Objects/moduleobject.c
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1997-05-09 01:07:15 (GMT)
committerGuido van Rossum <guido@python.org>1997-05-09 01:07:15 (GMT)
commit0add15f6a5daceda1972746d2263aba8525c34c4 (patch)
tree6f67909aefc8d926c0130e6e17848ba7c1d01af4 /Objects/moduleobject.c
parentc77b921c8223c2c541f91b488566573e449516ca (diff)
downloadcpython-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.c18
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)