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