mirror of
https://github.com/python/cpython.git
synced 2025-09-07 01:11:26 +00:00
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.
This commit is contained in:
parent
25831652fd
commit
81daa32c15
14 changed files with 655 additions and 150 deletions
|
@ -303,7 +303,7 @@ get_module(m, name, m_ret)
|
|||
}
|
||||
}
|
||||
}
|
||||
v = eval_code(co, d, d, (object *)NULL);
|
||||
v = eval_code(co, d, d, (object *)NULL, (object *)NULL);
|
||||
DECREF(co);
|
||||
return v;
|
||||
}
|
||||
|
@ -422,7 +422,7 @@ init_frozen(name)
|
|||
return -1;
|
||||
if ((m = add_module(name)) == NULL ||
|
||||
(d = getmoduledict(m)) == NULL ||
|
||||
(v = eval_code(co, d, d, (object *)NULL)) == NULL) {
|
||||
(v = eval_code(co, d, d, (object*)NULL, (object*)NULL)) == NULL) {
|
||||
DECREF(co);
|
||||
return -1;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue