Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c388068

Browse files
committed
magic number changes of CR/LF are swapped
1 parent 8c89a6f commit c388068

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

Python/import.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,9 @@ extern int verbose; /* Defined in pythonrun.c */
4848
extern long getmtime(); /* In getmtime.c */
4949

5050
/* Magic word to reject .pyc files generated by other Python versions */
51-
#define MAGIC 0x999903L /* Increment by one for each incompatible change */
51+
/* Increment by one for each incompatible change */
52+
/* MPW swaps CR and LF, so their value is incorporated as well */
53+
#define MAGIC (0x999903L ^ (('\n'^10L)<<16) ^ (('\r'^13L)<<8))
5254

5355
object *import_modules; /* This becomes sys.modules */
5456

0 commit comments

Comments
 (0)