diff options
| author | Guido van Rossum <guido@python.org> | 1993-05-20 14:24:46 (GMT) | 
|---|---|---|
| committer | Guido van Rossum <guido@python.org> | 1993-05-20 14:24:46 (GMT) | 
| commit | 81daa32c15cfa9f05eda037916cdbfd5b4323431 (patch) | |
| tree | 82d67f6db4ff6f1ae1a682f2ec4b01d075f3e405 /Objects/moduleobject.c | |
| parent | 25831652fd4c03323066d4cafdc0551c396a993e (diff) | |
| download | cpython-81daa32c15cfa9f05eda037916cdbfd5b4323431.zip cpython-81daa32c15cfa9f05eda037916cdbfd5b4323431.tar.gz cpython-81daa32c15cfa9f05eda037916cdbfd5b4323431.tar.bz2  | |
Access checks now work, at least for instance data (not for methods
yet).  The class is now passed to eval_code and stored in the current
frame.  It is also stored in instance method objects.  An "unbound"
instance method is now returned when a function is retrieved through
"classname.funcname", which when called passes the class to eval_code.
Diffstat (limited to 'Objects/moduleobject.c')
| -rw-r--r-- | Objects/moduleobject.c | 5 | 
1 files changed, 3 insertions, 2 deletions
diff --git a/Objects/moduleobject.c b/Objects/moduleobject.c index 8949c7d..5c0db15 100644 --- a/Objects/moduleobject.c +++ b/Objects/moduleobject.c @@ -25,6 +25,7 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.  /* Module object implementation */  #include "allobjects.h" +#include "ceval.h"  typedef struct {  	OB_HEAD @@ -111,7 +112,7 @@ module_getattr(m, name)  		err_setstr(AttributeError, name);  	else {  		if (is_accessobject(res)) -			res = getaccessvalue(res, (object *)NULL); +			res = getaccessvalue(res, getclass());  		else  			INCREF(res);  	} @@ -134,7 +135,7 @@ module_setattr(m, name, v)  	}  	ac = dictlookup(m->md_dict, name);  	if (ac != NULL && is_accessobject(ac)) -		return setaccessvalue(ac, (object *)NULL, v); +		return setaccessvalue(ac, getclass(), v);  	if (v == NULL) {  		int rv = dictremove(m->md_dict, name);  		if (rv < 0)  | 
