mirror of
https://github.com/python/cpython.git
synced 2025-10-09 16:34:44 +00:00
Several optimizations and speed improvements.
cstubs: Use Matrix type instead of float[4][4].
This commit is contained in:
parent
a75d306e2b
commit
3bb8a05947
10 changed files with 216 additions and 63 deletions
|
@ -355,13 +355,15 @@ instance_getattr(inst, name)
|
|||
{
|
||||
register object *v;
|
||||
classobject *class;
|
||||
if (strcmp(name, "__dict__") == 0) {
|
||||
INCREF(inst->in_dict);
|
||||
return inst->in_dict;
|
||||
}
|
||||
if (strcmp(name, "__class__") == 0) {
|
||||
INCREF(inst->in_class);
|
||||
return (object *)inst->in_class;
|
||||
if (name[0] == '_' && name[1] == '_') {
|
||||
if (strcmp(name, "__dict__") == 0) {
|
||||
INCREF(inst->in_dict);
|
||||
return inst->in_dict;
|
||||
}
|
||||
if (strcmp(name, "__class__") == 0) {
|
||||
INCREF(inst->in_class);
|
||||
return (object *)inst->in_class;
|
||||
}
|
||||
}
|
||||
class = NULL;
|
||||
v = dictlookup(inst->in_dict, name);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue