diff options
author | Jack Jansen <jack.jansen@cwi.nl> | 2000-08-20 19:42:52 (GMT) |
---|---|---|
committer | Jack Jansen <jack.jansen@cwi.nl> | 2000-08-20 19:42:52 (GMT) |
commit | 2eda24475c46448b8eab09509fc921b31f87cc13 (patch) | |
tree | 45db9c0eec56f494642c8aef4b524963a187ebb4 /Mac/scripts | |
parent | 12b2b76608e7551e3b5ce5c5db98d0b59ff75056 (diff) | |
download | cpython-2eda24475c46448b8eab09509fc921b31f87cc13.zip cpython-2eda24475c46448b8eab09509fc921b31f87cc13.tar.gz cpython-2eda24475c46448b8eab09509fc921b31f87cc13.tar.bz2 |
Enums we cannot find are set to None, and enumsubst understands this (no substitution done). This is need for what I think are bugs in the Finder aete resources (some events use unknown enums).
Diffstat (limited to 'Mac/scripts')
-rw-r--r-- | Mac/scripts/gensuitemodule.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/Mac/scripts/gensuitemodule.py b/Mac/scripts/gensuitemodule.py index df1e455..8059cc7 100644 --- a/Mac/scripts/gensuitemodule.py +++ b/Mac/scripts/gensuitemodule.py @@ -667,16 +667,17 @@ class ObjectCompiler: return pname = identify(name) if self.namemappers[0].hascode('property', code): - # XXXX Why don't we handle these the same as classes?? + # plural forms and such + othername, dummy, dummy = self.namemappers[0].findcodename('property', code) if self.fp: - self.fp.write("# repeated property %s %s\n"%(pname, what[1])) + self.fp.write("\n%s = %s\n"%(pname, othername)) else: if self.fp: self.fp.write("class %s(aetools.NProperty):\n" % pname) self.fp.write('\t"""%s - %s """\n' % (name, what[1])) self.fp.write("\twhich = %s\n" % `code`) self.fp.write("\twant = %s\n" % `what[0]`) - self.namemappers[0].addnamecode('property', pname, code) + self.namemappers[0].addnamecode('property', pname, code) def compileelement(self, elem): [code, keyform] = elem @@ -747,7 +748,7 @@ class ObjectCompiler: name, fullname, module = self.findcodename('enum', enum) if not name: if self.fp: - self.fp.write("# XXXX enum %s not found!!\n"%(enum)) + self.fp.write("_Enum_%s = None # XXXX enum %s not found!!\n"%(identify(enum), enum)) return if module: if self.fp: |