diff options
author | Fredrik Lundh <fredrik@pythonware.com> | 2001-01-15 12:46:09 (GMT) |
---|---|---|
committer | Fredrik Lundh <fredrik@pythonware.com> | 2001-01-15 12:46:09 (GMT) |
commit | b35ffc0417a0861ccf466c0503c4151725a0267a (patch) | |
tree | be88aec0ae5d7988418b45a29b90dda7a8c37d0c /Lib/sre_constants.py | |
parent | 142297ac9204042743c72cee04ec501236c7986d (diff) | |
download | cpython-b35ffc0417a0861ccf466c0503c4151725a0267a.zip cpython-b35ffc0417a0861ccf466c0503c4151725a0267a.tar.gz cpython-b35ffc0417a0861ccf466c0503c4151725a0267a.tar.bz2 |
added "magic" number to the _sre module, to avoid weird errors caused
by compiler/engine mismatches
Diffstat (limited to 'Lib/sre_constants.py')
-rw-r--r-- | Lib/sre_constants.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Lib/sre_constants.py b/Lib/sre_constants.py index a5e4bb8..b429a33 100644 --- a/Lib/sre_constants.py +++ b/Lib/sre_constants.py @@ -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") |