/* Module definition and import implementation */

#include "Python.h"

#include "Python-ast.h"
#include "pyarena.h"
#include "pythonrun.h"
#include "errcode.h"
#include "marshal.h"
#include "code.h"
#include "compile.h"
#include "eval.h"
#include "osdefs.h"
#include "importdl.h"

#ifdef HAVE_FCNTL_H
#include <fcntl.h>
#endif
#ifdef __cplusplus
extern "C" {
#endif

extern time_t PyOS_GetLastModificationTime(char *, FILE *);
                                               /* In getmtime.c */

/* Magic word to reject .pyc files generated by other Python versions.
  It should change for each incompatible change to the bytecode.

  The value of CR and LF is incorporated so if you ever read or write
  a .pyc file in text mode the magic number will be wrong; also, the
  Apple MPW compiler swaps their values, botching string constants.

  The magic numbers must be spaced apart atleast 2 values, as the
  -U interpeter flag will cause MAGIC+1 being used. They have been
  odd numbers for some time now.

  There were a variety of old schemes for setting the magic number.
  The current working scheme is to increment the previous value by
  10.

  Known values:
      Python 1.5:   20121
      Python 1.5.1: 20121
      Python 1.5.2: 20121
      Python 1.6:   50428
      Python 2.0:   50823
      Python 2.0.1: 50823
      Python 2.1:   60202
      Python 2.1.1: 60202
      Python 2.1.2: 60202
      Python 2.2:   60717
      Python 2.3a0: 62011
      Python 2.3a0: 62021
      Python 2.3a0: 62011 (!)
      Python 2.4a0: 62041
      Python 2.4a3: 62051
      Python 2.4b1: 62061
      Python 2.5a0: 62071
      Python 2.5a0: 62081 (ast-branch)
      Python 2.5a0: 62091 (with)
      Python 2.5a0: 62092 (changed WITH_CLEANUP opcode)
      Python 2.5b3: 62101 (fix wrong code: for x, in ...)
      Python 2.5b3: 62111 (fix wrong code: x += yield)
      Python 2.5c1: 62121 (fix wrong lnotab with for loops and
                           storing constants that should have been removed)
      Python 2.5c2: 62131 (fix wrong code: for x, in ... in listcomp/genexp)