Guido van Rossum | 87d5e70 | 1996-05-28 22:50:17 +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 |
Guido van Rossum | d266eb4 | 1996-10-25 14:44:06 +0000 | [diff] [blame] | 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. |
Guido van Rossum | 87d5e70 | 1996-05-28 22:50:17 +0000 | [diff] [blame] | 16 | |
Guido van Rossum | d266eb4 | 1996-10-25 14:44:06 +0000 | [diff] [blame] | 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. |
Guido van Rossum | 87d5e70 | 1996-05-28 22:50:17 +0000 | [diff] [blame] | 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(); |
Guido van Rossum | 1bc716f | 1996-06-28 19:12:06 +0000 | [diff] [blame] | 42 | extern void initcmath(); |
Guido van Rossum | 950a126 | 1996-07-30 17:38:17 +0000 | [diff] [blame] | 43 | extern void initerrno(); |
Guido van Rossum | 87d5e70 | 1996-05-28 22:50:17 +0000 | [diff] [blame] | 44 | extern void initimageop(); |
| 45 | extern void initmath(); |
| 46 | extern void initmd5(); |
| 47 | extern void initnew(); |
| 48 | extern void initnt(); |
Guido van Rossum | 950a126 | 1996-07-30 17:38:17 +0000 | [diff] [blame] | 49 | extern void initoperator(); |
Guido van Rossum | 87d5e70 | 1996-05-28 22:50:17 +0000 | [diff] [blame] | 50 | extern void initregex(); |
Guido van Rossum | 8b523f9 | 1997-08-21 02:28:40 +0000 | [diff] [blame] | 51 | extern void initreop(); |
Guido van Rossum | 87d5e70 | 1996-05-28 22:50:17 +0000 | [diff] [blame] | 52 | extern void initrgbimg(); |
| 53 | extern void initrotor(); |
| 54 | extern void initsignal(); |
Guido van Rossum | 1bc716f | 1996-06-28 19:12:06 +0000 | [diff] [blame] | 55 | extern void initselect(); |
Guido van Rossum | f2e98b4 | 1996-06-26 19:53:41 +0000 | [diff] [blame] | 56 | extern void init_socket(); |
Guido van Rossum | 87d5e70 | 1996-05-28 22:50:17 +0000 | [diff] [blame] | 57 | extern void initsoundex(); |
| 58 | extern void initstrop(); |
| 59 | extern void initstruct(); |
| 60 | extern void inittime(); |
Guido van Rossum | bf57ed5 | 1996-08-22 00:43:42 +0000 | [diff] [blame] | 61 | extern void initthread(); |
Guido van Rossum | 42c2e6a | 1997-05-06 15:59:14 +0000 | [diff] [blame] | 62 | extern void initcStringIO(); |
| 63 | extern void initcPickle(); |
Guido van Rossum | 29c1ea5 | 1997-08-07 00:11:34 +0000 | [diff] [blame] | 64 | #ifdef WIN32 |
| 65 | extern void initmsvcrt(); |
| 66 | #endif |
Guido van Rossum | 87d5e70 | 1996-05-28 22:50:17 +0000 | [diff] [blame] | 67 | |
| 68 | /* -- ADDMODULE MARKER 1 -- */ |
| 69 | |
| 70 | extern void PyMarshal_Init(); |
| 71 | extern void initimp(); |
| 72 | |
Guido van Rossum | 2b713b2 | 1997-04-29 20:46:45 +0000 | [diff] [blame] | 73 | struct _inittab _PyImport_Inittab[] = { |
Guido van Rossum | 87d5e70 | 1996-05-28 22:50:17 +0000 | [diff] [blame] | 74 | |
| 75 | {"array", initarray}, |
| 76 | #ifdef M_I386 |
| 77 | {"audioop", initaudioop}, |
| 78 | #endif |
| 79 | {"binascii", initbinascii}, |
Guido van Rossum | 1bc716f | 1996-06-28 19:12:06 +0000 | [diff] [blame] | 80 | {"cmath", initcmath}, |
Guido van Rossum | 950a126 | 1996-07-30 17:38:17 +0000 | [diff] [blame] | 81 | {"errno", initerrno}, |
Guido van Rossum | 87d5e70 | 1996-05-28 22:50:17 +0000 | [diff] [blame] | 82 | {"imageop", initimageop}, |
| 83 | {"math", initmath}, |
| 84 | {"md5", initmd5}, |
| 85 | {"new", initnew}, |
Guido van Rossum | 2e146b3 | 1997-05-06 16:00:32 +0000 | [diff] [blame] | 86 | {"nt", initnt}, /* Use the NT os functions, not posix */ |
Guido van Rossum | 950a126 | 1996-07-30 17:38:17 +0000 | [diff] [blame] | 87 | {"operator", initoperator}, |
Guido van Rossum | 87d5e70 | 1996-05-28 22:50:17 +0000 | [diff] [blame] | 88 | {"regex", initregex}, |
Guido van Rossum | 8b523f9 | 1997-08-21 02:28:40 +0000 | [diff] [blame] | 89 | {"reop", initreop}, |
Guido van Rossum | 87d5e70 | 1996-05-28 22:50:17 +0000 | [diff] [blame] | 90 | {"rgbimg", initrgbimg}, |
| 91 | {"rotor", initrotor}, |
| 92 | {"signal", initsignal}, |
| 93 | #ifdef USE_SOCKET |
Guido van Rossum | 2e146b3 | 1997-05-06 16:00:32 +0000 | [diff] [blame] | 94 | {"_socket", init_socket}, |
| 95 | {"select", initselect}, |
Guido van Rossum | 87d5e70 | 1996-05-28 22:50:17 +0000 | [diff] [blame] | 96 | #endif |
| 97 | {"soundex", initsoundex}, |
| 98 | {"strop", initstrop}, |
| 99 | {"struct", initstruct}, |
| 100 | {"time", inittime}, |
Guido van Rossum | bf57ed5 | 1996-08-22 00:43:42 +0000 | [diff] [blame] | 101 | #ifdef WITH_THREAD |
| 102 | {"thread", initthread}, |
| 103 | #endif |
Guido van Rossum | 2e146b3 | 1997-05-06 16:00:32 +0000 | [diff] [blame] | 104 | {"cStringIO", initcStringIO}, |
| 105 | {"cPickle", initcPickle}, |
Guido van Rossum | 29c1ea5 | 1997-08-07 00:11:34 +0000 | [diff] [blame] | 106 | #ifdef WIN32 |
| 107 | {"msvcrt", initmsvcrt}, |
| 108 | #endif |
Guido van Rossum | 87d5e70 | 1996-05-28 22:50:17 +0000 | [diff] [blame] | 109 | |
| 110 | /* -- ADDMODULE MARKER 2 -- */ |
| 111 | |
| 112 | /* This module "lives in" with marshal.c */ |
| 113 | {"marshal", PyMarshal_Init}, |
| 114 | |
| 115 | /* This lives it with import.c */ |
| 116 | {"imp", initimp}, |
| 117 | |
| 118 | /* These entries are here for sys.builtin_module_names */ |
| 119 | {"__main__", NULL}, |
| 120 | {"__builtin__", NULL}, |
| 121 | {"sys", NULL}, |
| 122 | |
| 123 | /* Sentinel */ |
| 124 | {0, 0} |
| 125 | }; |