Guido van Rossum | 50d4cc2 | 1997-11-22 21:59:45 +0000 | [diff] [blame] | 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(); |
Guido van Rossum | a34c313 | 1997-12-05 22:07:14 +0000 | [diff] [blame] | 66 | extern void initpcre(); |
Guido van Rossum | 50d4cc2 | 1997-11-22 21:59:45 +0000 | [diff] [blame] | 67 | #ifdef WIN32 |
| 68 | extern void initmsvcrt(); |
| 69 | #endif |
| 70 | |
| 71 | /* -- ADDMODULE MARKER 1 -- */ |
| 72 | |
| 73 | extern void PyMarshal_Init(); |
| 74 | extern void initimp(); |
| 75 | |
| 76 | struct _inittab _PyImport_Inittab[] = { |
| 77 | |
| 78 | {"array", initarray}, |
| 79 | #ifdef M_I386 |
| 80 | {"audioop", initaudioop}, |
| 81 | #endif |
| 82 | {"binascii", initbinascii}, |
| 83 | {"cmath", initcmath}, |
| 84 | {"errno", initerrno}, |
| 85 | // {"imageop", initimageop}, |
| 86 | {"math", initmath}, |
| 87 | {"md5", initmd5}, |
| 88 | {"new", initnew}, |
| 89 | #if defined(MS_WINDOWS) || defined(__BORLANDC__) || defined(__WATCOMC__) |
| 90 | {"nt", initnt}, /* Use the NT os functions, not posix */ |
| 91 | #else |
| 92 | #if defined(PYOS_OS2) |
| 93 | {"os2", initos2}, |
| 94 | #else |
| 95 | {"posix", initposix}, |
| 96 | #endif |
| 97 | #endif |
| 98 | {"operator", initoperator}, |
| 99 | {"regex", initregex}, |
| 100 | {"reop", initreop}, |
| 101 | // {"rgbimg", initrgbimg}, |
| 102 | // {"rotor", initrotor}, |
| 103 | {"signal", initsignal}, |
| 104 | #ifdef USE_SOCKET |
| 105 | {"_socket", init_socket}, |
| 106 | {"select", initselect}, |
| 107 | #endif |
| 108 | {"soundex", initsoundex}, |
| 109 | {"strop", initstrop}, |
| 110 | {"struct", initstruct}, |
| 111 | {"time", inittime}, |
| 112 | #ifdef WITH_THREAD |
| 113 | {"thread", initthread}, |
| 114 | #endif |
| 115 | {"cStringIO", initcStringIO}, |
| 116 | {"cPickle", initcPickle}, |
Guido van Rossum | a34c313 | 1997-12-05 22:07:14 +0000 | [diff] [blame] | 117 | {"pcre", initpcre}, |
Guido van Rossum | 50d4cc2 | 1997-11-22 21:59:45 +0000 | [diff] [blame] | 118 | #ifdef WIN32 |
| 119 | {"msvcrt", initmsvcrt}, |
| 120 | #endif |
| 121 | |
| 122 | /* -- ADDMODULE MARKER 2 -- */ |
| 123 | |
| 124 | /* This module "lives in" with marshal.c */ |
| 125 | {"marshal", PyMarshal_Init}, |
| 126 | |
| 127 | /* This lives it with import.c */ |
| 128 | {"imp", initimp}, |
| 129 | |
| 130 | /* These entries are here for sys.builtin_module_names */ |
| 131 | {"__main__", NULL}, |
| 132 | {"__builtin__", NULL}, |
| 133 | {"sys", NULL}, |
| 134 | |
| 135 | /* Sentinel */ |
| 136 | {0, 0} |
| 137 | }; |