Home | History | Annotate | Download | only in PC
      1 /* Module configuration */
      2 
      3 /* This file contains the table of built-in modules.
      4    See init_builtin() in import.c. */
      5 
      6 #include "Python.h"
      7 
      8 extern void initarray(void);
      9 #ifndef MS_WINI64
     10 extern void initaudioop(void);
     11 #endif
     12 extern void initbinascii(void);
     13 extern void initcmath(void);
     14 extern void initerrno(void);
     15 extern void initfuture_builtins(void);
     16 extern void initgc(void);
     17 #ifndef MS_WINI64
     18 extern void initimageop(void);
     19 #endif
     20 extern void initmath(void);
     21 extern void init_md5(void);
     22 extern void initnt(void);
     23 extern void initoperator(void);
     24 extern void initsignal(void);
     25 extern void init_sha(void);
     26 extern void init_sha256(void);
     27 extern void init_sha512(void);
     28 extern void initstrop(void);
     29 extern void inittime(void);
     30 extern void initthread(void);
     31 extern void initcStringIO(void);
     32 extern void initcPickle(void);
     33 #ifdef WIN32
     34 extern void initmsvcrt(void);
     35 extern void init_locale(void);
     36 #endif
     37 extern void init_codecs(void);
     38 extern void init_weakref(void);
     39 extern void init_hotshot(void);
     40 extern void initxxsubtype(void);
     41 extern void initzipimport(void);
     42 extern void init_random(void);
     43 extern void inititertools(void);
     44 extern void init_collections(void);
     45 extern void init_heapq(void);
     46 extern void init_bisect(void);
     47 extern void init_symtable(void);
     48 extern void initmmap(void);
     49 extern void init_csv(void);
     50 extern void init_sre(void);
     51 extern void initparser(void);
     52 extern void init_winreg(void);
     53 extern void init_struct(void);
     54 extern void initdatetime(void);
     55 extern void init_functools(void);
     56 extern void init_json(void);
     57 extern void initzlib(void);
     58 
     59 extern void init_multibytecodec(void);
     60 extern void init_codecs_cn(void);
     61 extern void init_codecs_hk(void);
     62 extern void init_codecs_iso2022(void);
     63 extern void init_codecs_jp(void);
     64 extern void init_codecs_kr(void);
     65 extern void init_codecs_tw(void);
     66 extern void init_subprocess(void);
     67 extern void init_lsprof(void);
     68 extern void init_ast(void);
     69 extern void init_io(void);
     70 extern void _PyWarnings_Init(void);
     71 
     72 /* tools/freeze/makeconfig.py marker for additional "extern" */
     73 /* -- ADDMODULE MARKER 1 -- */
     74 
     75 extern void PyMarshal_Init(void);
     76 extern void initimp(void);
     77 
     78 struct _inittab _PyImport_Inittab[] = {
     79 
     80     {"array", initarray},
     81     {"_ast", init_ast},
     82 #ifdef MS_WINDOWS
     83 #ifndef MS_WINI64
     84     {"audioop", initaudioop},
     85 #endif
     86 #endif
     87     {"binascii", initbinascii},
     88     {"cmath", initcmath},
     89     {"errno", initerrno},
     90     {"future_builtins", initfuture_builtins},
     91     {"gc", initgc},
     92 #ifndef MS_WINI64
     93     {"imageop", initimageop},
     94 #endif
     95     {"math", initmath},
     96     {"_md5", init_md5},
     97     {"nt", initnt}, /* Use the NT os functions, not posix */
     98     {"operator", initoperator},
     99     {"signal", initsignal},
    100     {"_sha", init_sha},
    101     {"_sha256", init_sha256},
    102     {"_sha512", init_sha512},
    103     {"strop", initstrop},
    104     {"time", inittime},
    105 #ifdef WITH_THREAD
    106     {"thread", initthread},
    107 #endif
    108     {"cStringIO", initcStringIO},
    109     {"cPickle", initcPickle},
    110 #ifdef WIN32
    111     {"msvcrt", initmsvcrt},
    112     {"_locale", init_locale},
    113 #endif
    114     /* XXX Should _subprocess go in a WIN32 block?  not WIN64? */
    115     {"_subprocess", init_subprocess},
    116 
    117     {"_codecs", init_codecs},
    118     {"_weakref", init_weakref},
    119     {"_hotshot", init_hotshot},
    120     {"_random", init_random},
    121     {"_bisect", init_bisect},
    122     {"_heapq", init_heapq},
    123     {"_lsprof", init_lsprof},
    124     {"itertools", inititertools},
    125     {"_collections", init_collections},
    126     {"_symtable", init_symtable},
    127     {"mmap", initmmap},
    128     {"_csv", init_csv},
    129     {"_sre", init_sre},
    130     {"parser", initparser},
    131     {"_winreg", init_winreg},
    132     {"_struct", init_struct},
    133     {"datetime", initdatetime},
    134     {"_functools", init_functools},
    135     {"_json", init_json},
    136 
    137     {"xxsubtype", initxxsubtype},
    138     {"zipimport", initzipimport},
    139     {"zlib", initzlib},
    140 
    141     /* CJK codecs */
    142     {"_multibytecodec", init_multibytecodec},
    143     {"_codecs_cn", init_codecs_cn},
    144     {"_codecs_hk", init_codecs_hk},
    145     {"_codecs_iso2022", init_codecs_iso2022},
    146     {"_codecs_jp", init_codecs_jp},
    147     {"_codecs_kr", init_codecs_kr},
    148     {"_codecs_tw", init_codecs_tw},
    149 
    150 /* tools/freeze/makeconfig.py marker for additional "_inittab" entries */
    151 /* -- ADDMODULE MARKER 2 -- */
    152 
    153     /* This module "lives in" with marshal.c */
    154     {"marshal", PyMarshal_Init},
    155 
    156     /* This lives it with import.c */
    157     {"imp", initimp},
    158 
    159     /* These entries are here for sys.builtin_module_names */
    160     {"__main__", NULL},
    161     {"__builtin__", NULL},
    162     {"sys", NULL},
    163     {"exceptions", NULL},
    164     {"_warnings", _PyWarnings_Init},
    165 
    166     {"_io", init_io},
    167 
    168     /* Sentinel */
    169     {0, 0}
    170 };
    171