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