[pywin32-checkins] pywin32/win32/Lib win32rcparser.py,1.4,1.5
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: Mark H. <mha...@us...> - 2008-07-04 01:55:10
|
Update of /cvsroot/pywin32/pywin32/win32/Lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5386/lib Modified Files: win32rcparser.py Log Message: Fix [ 1953828 ] win32rcparser: stringTable error in GenerateFrozenResource >From Hugh Emberson Index: win32rcparser.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/Lib/win32rcparser.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** win32rcparser.py 6 Sep 2004 23:51:03 -0000 1.4 --- win32rcparser.py 4 Jul 2008 01:55:13 -0000 1.5 *************** *** 112,115 **** --- 112,118 ---- self.value = value + def __repr__(self): + return "StringDef(%r, %r, %r)" % (self.id, self.idNum, self.value) + class RCParser: next_id = 1001 *************** *** 491,495 **** def ParseStreams(rc_file, h_file): rcp = RCParser() ! rcp.parseH(h_file) try: rcp.load(rc_file) --- 494,499 ---- def ParseStreams(rc_file, h_file): rcp = RCParser() ! if h_file: ! rcp.parseH(h_file) try: rcp.load(rc_file) *************** *** 544,547 **** --- 548,560 ---- out.write("__version__=%r\n" % __version__) out.write("_rc_size_=%d\n_rc_mtime_=%d\n" % (in_stat[stat.ST_SIZE], in_stat[stat.ST_MTIME])) + + out.write("class StringDef:\n") + out.write("\tdef __init__(self, id, idNum, value):\n") + out.write("\t\tself.id = id\n") + out.write("\t\tself.idNum = idNum\n") + out.write("\t\tself.value = value\n") + out.write("\tdef __repr__(self):\n") + out.write("\t\treturn \"StringDef(%r, %r, %r)\" % (self.id, self.idNum, self.value)\n") + out.write("class FakeParser:\n") |