Several optimizations and speed improvements.

cstubs: Use Matrix type instead of float[4][4].
This commit is contained in:
Sjoerd Mullender 1993-10-22 12:04:32 +00:00
parent a75d306e2b
commit 3bb8a05947
10 changed files with 216 additions and 63 deletions

View file

@ -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);