|
| 1 | +/* -*- C -*- *********************************************** |
| 2 | +Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, |
| 3 | +The Netherlands. |
| 4 | +
|
| 5 | + All Rights Reserved |
| 6 | +
|
| 7 | +Permission to use, copy, modify, and distribute this software and its |
| 8 | +documentation for any purpose and without fee is hereby granted, |
| 9 | +provided that the above copyright notice appear in all copies and that |
| 10 | +both that copyright notice and this permission notice appear in |
| 11 | +supporting documentation, and that the names of Stichting Mathematisch |
| 12 | +Centrum or CWI or Corporation for National Research Initiatives or |
| 13 | +CNRI not be used in advertising or publicity pertaining to |
| 14 | +distribution of the software without specific, written prior |
| 15 | +permission. |
| 16 | +
|
| 17 | +While CWI is the initial source for this software, a modified version |
| 18 | +is made available by the Corporation for National Research Initiatives |
| 19 | +(CNRI) at the Internet address ftp://ftp.python.org. |
| 20 | +
|
| 21 | +STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH |
| 22 | +REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF |
| 23 | +MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH |
| 24 | +CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL |
| 25 | +DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR |
| 26 | +PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER |
| 27 | +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR |
| 28 | +PERFORMANCE OF THIS SOFTWARE. |
| 29 | +
|
| 30 | +******************************************************************/ |
| 31 | + |
| 32 | +/* Module configuration */ |
| 33 | + |
| 34 | +/* This file contains the table of built-in modules. |
| 35 | + See init_builtin() in import.c. */ |
| 36 | + |
| 37 | +#include "Python.h" |
| 38 | + |
| 39 | +extern void initarray(); |
| 40 | +extern void initaudioop(); |
| 41 | +extern void initbinascii(); |
| 42 | +extern void initcmath(); |
| 43 | +extern void initerrno(); |
| 44 | +extern void initimageop(); |
| 45 | +extern void initmath(); |
| 46 | +extern void initmd5(); |
| 47 | +extern void initnew(); |
| 48 | +extern void initnt(); |
| 49 | +extern void initos2(); |
| 50 | +extern void initoperator(); |
| 51 | +extern void initposix(); |
| 52 | +extern void initregex(); |
| 53 | +extern void initreop(); |
| 54 | +extern void initrgbimg(); |
| 55 | +extern void initrotor(); |
| 56 | +extern void initsignal(); |
| 57 | +extern void initselect(); |
| 58 | +extern void init_socket(); |
| 59 | +extern void initsoundex(); |
| 60 | +extern void initstrop(); |
| 61 | +extern void initstruct(); |
| 62 | +extern void inittime(); |
| 63 | +extern void initthread(); |
| 64 | +extern void initcStringIO(); |
| 65 | +extern void initcPickle(); |
| 66 | +#ifdef WIN32 |
| 67 | +extern void initmsvcrt(); |
| 68 | +#endif |
| 69 | + |
| 70 | +/* -- ADDMODULE MARKER 1 -- */ |
| 71 | + |
| 72 | +extern void PyMarshal_Init(); |
| 73 | +extern void initimp(); |
| 74 | + |
| 75 | +struct _inittab _PyImport_Inittab[] = { |
| 76 | + |
| 77 | + {"array", initarray}, |
| 78 | +#ifdef M_I386 |
| 79 | + {"audioop", initaudioop}, |
| 80 | +#endif |
| 81 | + {"binascii", initbinascii}, |
| 82 | + {"cmath", initcmath}, |
| 83 | + {"errno", initerrno}, |
| 84 | +// {"imageop", initimageop}, |
| 85 | + {"math", initmath}, |
| 86 | + {"md5", initmd5}, |
| 87 | + {"new", initnew}, |
| 88 | +#if defined(MS_WINDOWS) || defined(__BORLANDC__) || defined(__WATCOMC__) |
| 89 | + {"nt", initnt}, /* Use the NT os functions, not posix */ |
| 90 | +#else |
| 91 | +#if defined(PYOS_OS2) |
| 92 | + {"os2", initos2}, |
| 93 | +#else |
| 94 | + {"posix", initposix}, |
| 95 | +#endif |
| 96 | +#endif |
| 97 | + {"operator", initoperator}, |
| 98 | + {"regex", initregex}, |
| 99 | + {"reop", initreop}, |
| 100 | +// {"rgbimg", initrgbimg}, |
| 101 | +// {"rotor", initrotor}, |
| 102 | + {"signal", initsignal}, |
| 103 | +#ifdef USE_SOCKET |
| 104 | + {"_socket", init_socket}, |
| 105 | + {"select", initselect}, |
| 106 | +#endif |
| 107 | + {"soundex", initsoundex}, |
| 108 | + {"strop", initstrop}, |
| 109 | + {"struct", initstruct}, |
| 110 | + {"time", inittime}, |
| 111 | +#ifdef WITH_THREAD |
| 112 | + {"thread", initthread}, |
| 113 | +#endif |
| 114 | + {"cStringIO", initcStringIO}, |
| 115 | + {"cPickle", initcPickle}, |
| 116 | +#ifdef WIN32 |
| 117 | + {"msvcrt", initmsvcrt}, |
| 118 | +#endif |
| 119 | + |
| 120 | +/* -- ADDMODULE MARKER 2 -- */ |
| 121 | + |
| 122 | + /* This module "lives in" with marshal.c */ |
| 123 | + {"marshal", PyMarshal_Init}, |
| 124 | + |
| 125 | + /* This lives it with import.c */ |
| 126 | + {"imp", initimp}, |
| 127 | + |
| 128 | + /* These entries are here for sys.builtin_module_names */ |
| 129 | + {"__main__", NULL}, |
| 130 | + {"__builtin__", NULL}, |
| 131 | + {"sys", NULL}, |
| 132 | + |
| 133 | + /* Sentinel */ |
| 134 | + {0, 0} |
| 135 | +}; |
0 commit comments