]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
magic number changes of CR/LF are swapped
authorGuido van Rossum <guido@python.org>
Sun, 19 Feb 1995 15:54:18 +0000 (15:54 +0000)
committerGuido van Rossum <guido@python.org>
Sun, 19 Feb 1995 15:54:18 +0000 (15:54 +0000)
Python/import.c

index 05d2c557bd199106811bd1d3e122b46194b4daa7..155ce34b37c50b75ab19007b2a94c3395e62f8f8 100644 (file)
@@ -48,7 +48,9 @@ extern int verbose; /* Defined in pythonrun.c */
 extern long getmtime(); /* In getmtime.c */
 
 /* Magic word to reject .pyc files generated by other Python versions */
-#define MAGIC 0x999903L /* Increment by one for each incompatible change */
+/* Increment by one for each incompatible change */
+/* MPW swaps CR and LF, so their value is incorporated as well */
+#define MAGIC (0x999903L ^ (('\n'^10L)<<16) ^ (('\r'^13L)<<8))
 
 object *import_modules; /* This becomes sys.modules */