diff Objects/classobject.c @ 1356:043da19302ef legacy-trunk

Several optimizations and speed improvements. cstubs: Use Matrix type instead of float[4][4].
author Sjoerd Mullender <sjoerd@acm.org>
date Fri, 22 Oct 1993 12:04:32 +0000
parents e149c77d173c
children c914b10bf2ed
line wrap: on
line diff
--- a/Objects/classobject.c	Mon Oct 18 17:59:42 1993 +0000
+++ b/Objects/classobject.c	Fri Oct 22 12:04:32 1993 +0000
@@ -355,13 +355,15 @@
 {
 	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);