added "magic" number to the _sre module, to avoid weird errors caused

by compiler/engine mismatches
This commit is contained in:
Fredrik Lundh 2001-01-15 12:46:09 +00:00
parent 142297ac92
commit b35ffc0417
4 changed files with 21 additions and 1 deletions

View file

@ -9,8 +9,15 @@
# See the sre.py file for information on usage and redistribution.
#
# update when constants are added or removed
MAGIC = 20010115
# max code word in this release
MAXREPEAT = 65535
# SRE standard exception (access as sre.error)
# should this really be here?
class error(Exception):
@ -211,6 +218,8 @@ if __name__ == "__main__":
""")
f.write("#define SRE_MAGIC %d\n" % MAGIC)
dump(f, OPCODES, "SRE_OP")
dump(f, ATCODES, "SRE")
dump(f, CHCODES, "SRE")