summaryrefslogtreecommitdiffstats
path: root/Mac/scripts
diff options
context:
space:
mode:
authorJack Jansen <jack.jansen@cwi.nl>2003-03-21 12:04:19 (GMT)
committerJack Jansen <jack.jansen@cwi.nl>2003-03-21 12:04:19 (GMT)
commit7e0bc112b8bc1174449f5573c03e51e00805218b (patch)
tree5b7bfcbe29cb015a763cdf6b4ea682fe8031d78e /Mac/scripts
parent82ad32ec394ef9e20a5073e0dad13436972b10fa (diff)
downloadcpython-7e0bc112b8bc1174449f5573c03e51e00805218b.zip
cpython-7e0bc112b8bc1174449f5573c03e51e00805218b.tar.gz
cpython-7e0bc112b8bc1174449f5573c03e51e00805218b.tar.bz2
Patch 702620 by Donovan Preston: Fix AE inheritance.
Diffstat (limited to 'Mac/scripts')
-rw-r--r--Mac/scripts/gensuitemodule.py13
1 files changed, 7 insertions, 6 deletions
diff --git a/Mac/scripts/gensuitemodule.py b/Mac/scripts/gensuitemodule.py
index 1cd2ef6..cd725d4 100644
--- a/Mac/scripts/gensuitemodule.py
+++ b/Mac/scripts/gensuitemodule.py
@@ -321,14 +321,15 @@ def compileaete(aete, resinfo, fname):
fp.write("from %s import *\n"%modname)
# Generate property dicts and element dicts for all types declared in this module
- fp.write("def getbaseclasses(v):\n")
- fp.write("\tif hasattr(v, '_superclassnames') and not hasattr(v, '_propdict'):\n")
+ fp.write("\ndef getbaseclasses(v):\n")
+ fp.write("\tif not v._propdict:\n")
fp.write("\t\tv._propdict = {}\n")
fp.write("\t\tv._elemdict = {}\n")
- fp.write("\t\tfor superclass in v._superclassnames:\n")
-## fp.write("\t\t\tgetbaseclasses(superclass)\n")
- fp.write("\t\t\tv._propdict.update(getattr(eval(superclass), '_privpropdict', {}))\n")
- fp.write("\t\t\tv._elemdict.update(getattr(eval(superclass), '_privelemdict', {}))\n")
+ fp.write("\t\tfor superclassname in getattr(v, '_superclassnames', []):\n")
+ fp.write("\t\t\tsuperclass = eval(superclassname)\n")
+ fp.write("\t\t\tgetbaseclasses(superclass)\n")
+ fp.write("\t\t\tv._propdict.update(getattr(superclass, '_propdict', {}))\n")
+ fp.write("\t\t\tv._elemdict.update(getattr(superclass, '_elemdict', {}))\n")
fp.write("\t\tv._propdict.update(v._privpropdict)\n")
fp.write("\t\tv._elemdict.update(v._privelemdict)\n")
fp.write("\n")