diff Objects/moduleobject.c @ 5456:7316eecb1e6b legacy-trunk

removed last #ifdef SUPPORT_OBSOLETE_ACCESS bits.
author Guido van Rossum <guido@python.org>
date Fri, 09 May 1997 01:07:15 +0000
parents d1447950fa04
children 8c01cfee14ba
line wrap: on
line diff
--- a/Objects/moduleobject.c	Fri May 09 01:00:56 1997 +0000
+++ b/Objects/moduleobject.c	Fri May 09 01:07:15 1997 +0000
@@ -133,14 +133,8 @@
 	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 @@
 	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)