summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJack Jansen <jack.jansen@cwi.nl>2003-04-01 22:01:58 (GMT)
committerJack Jansen <jack.jansen@cwi.nl>2003-04-01 22:01:58 (GMT)
commitbc956056d401f0137e687f878a487fa2a16199df (patch)
treee8a1d421b65f401594e6428fd64798d9703798d7
parent3279cb03154267acbdb4eebe391512a055ba59a1 (diff)
downloadcpython-bc956056d401f0137e687f878a487fa2a16199df.zip
cpython-bc956056d401f0137e687f878a487fa2a16199df.tar.gz
cpython-bc956056d401f0137e687f878a487fa2a16199df.tar.bz2
Properties (like enums) are not in the global namespace but only valid
within a certain context. Give them an _Prop_ prefix, so they don't accidentally obscure an element from another suite (as happened with the Finder). Comparisons I'm not sure about, so I left them as global names. Also got rid of the lists if declarations, they serve no useful purpose.
-rw-r--r--Lib/plat-mac/gensuitemodule.py46
1 files changed, 23 insertions, 23 deletions
diff --git a/Lib/plat-mac/gensuitemodule.py b/Lib/plat-mac/gensuitemodule.py
index 1e604fc..0fcd1c4 100644
--- a/Lib/plat-mac/gensuitemodule.py
+++ b/Lib/plat-mac/gensuitemodule.py
@@ -973,10 +973,10 @@ class ObjectCompiler:
if pname == othername:
return
if self.fp:
- self.fp.write("\n%s = %s\n"%(pname, othername))
+ self.fp.write("\n_Prop_%s = _Prop_%s\n"%(pname, othername))
else:
if self.fp:
- self.fp.write("class %s(aetools.NProperty):\n" % pname)
+ self.fp.write("class _Prop_%s(aetools.NProperty):\n" % pname)
self.fp.write('\t"""%s - %s """\n' % (ascii(name), ascii(what[1])))
self.fp.write("\twhich = %s\n" % `code`)
self.fp.write("\twant = %s\n" % `what[0]`)
@@ -1041,7 +1041,7 @@ class ObjectCompiler:
if self.fp:
self.fp.write("%s._privpropdict = {\n"%cname)
for n in plist:
- self.fp.write("\t'%s' : %s,\n"%(n, n))
+ self.fp.write("\t'%s' : _Prop_%s,\n"%(n, n))
self.fp.write("}\n")
self.fp.write("%s._privelemdict = {\n"%cname)
for n, fulln in elist:
@@ -1094,26 +1094,26 @@ class ObjectCompiler:
self.fp.write("\t%s : %s,\n" % (`k`, v))
self.fp.write("}\n")
- self.fp.write("\n_propdeclarations = {\n")
- proplist = self.namemappers[0].getall('property')
- proplist.sort()
- for k, v in proplist:
- self.fp.write("\t%s : %s,\n" % (`k`, v))
- self.fp.write("}\n")
-
- self.fp.write("\n_compdeclarations = {\n")
- complist = self.namemappers[0].getall('comparison')
- complist.sort()
- for k, v in complist:
- self.fp.write("\t%s : %s,\n" % (`k`, v))
- self.fp.write("}\n")
-
- self.fp.write("\n_enumdeclarations = {\n")
- enumlist = self.namemappers[0].getall('enum')
- enumlist.sort()
- for k, v in enumlist:
- self.fp.write("\t%s : %s,\n" % (`k`, v))
- self.fp.write("}\n")
+## self.fp.write("\n_propdeclarations = {\n")
+## proplist = self.namemappers[0].getall('property')
+## proplist.sort()
+## for k, v in proplist:
+## self.fp.write("\t%s : _Prop_%s,\n" % (`k`, v))
+## self.fp.write("}\n")
+##
+## self.fp.write("\n_compdeclarations = {\n")
+## complist = self.namemappers[0].getall('comparison')
+## complist.sort()
+## for k, v in complist:
+## self.fp.write("\t%s : %s,\n" % (`k`, v))
+## self.fp.write("}\n")
+##
+## self.fp.write("\n_enumdeclarations = {\n")
+## enumlist = self.namemappers[0].getall('enum')
+## enumlist.sort()
+## for k, v in enumlist:
+## self.fp.write("\t%s : %s,\n" % (`k`, v))
+## self.fp.write("}\n")
def compiledata(data):
[type, description, flags] = data