mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
* accessobject.c (ownercheck): allow a base class access to protected
objects of its derived classes; allow anything that has an attribute named "__privileged__" access to anything. * object.[ch]: added hasattr() -- test whether getattr() will succeed.
This commit is contained in:
parent
697e7abbc8
commit
ed18fdc9fc
3 changed files with 42 additions and 15 deletions
|
@ -203,6 +203,7 @@ extern int printobject PROTO((object *, FILE *, int));
|
|||
extern object * reprobject PROTO((object *));
|
||||
extern int cmpobject PROTO((object *, object *));
|
||||
extern object *getattr PROTO((object *, char *));
|
||||
extern int hasattr PROTO((object *, char *));
|
||||
extern object *getattro PROTO((object *, object *));
|
||||
extern int setattro PROTO((object *, object *, object *));
|
||||
extern long hashobject PROTO((object *));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue