Guido van Rossum | 50d4cc2 | 1997-11-22 21:59:45 +0000 | [diff] [blame] | 1 | /* -*- C -*- *********************************************** |
Guido van Rossum | fd71b9e | 2000-06-30 23:50:40 +0000 | [diff] [blame] | 2 | Copyright (c) 2000, BeOpen.com. |
| 3 | Copyright (c) 1995-2000, Corporation for National Research Initiatives. |
| 4 | Copyright (c) 1990-1995, Stichting Mathematisch Centrum. |
| 5 | All rights reserved. |
Guido van Rossum | 50d4cc2 | 1997-11-22 21:59:45 +0000 | [diff] [blame] | 6 | |
Guido van Rossum | fd71b9e | 2000-06-30 23:50:40 +0000 | [diff] [blame] | 7 | See the file "Misc/COPYRIGHT" for information on usage and |
| 8 | redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. |
Guido van Rossum | 50d4cc2 | 1997-11-22 21:59:45 +0000 | [diff] [blame] | 9 | ******************************************************************/ |
| 10 | |
| 11 | /* Module configuration */ |
| 12 | |
| 13 | /* This file contains the table of built-in modules. |
| 14 | See init_builtin() in import.c. */ |
| 15 | |
| 16 | #include "Python.h" |
| 17 | |
Thomas Wouters | 7889010 | 2000-07-22 19:25:51 +0000 | [diff] [blame] | 18 | extern void initarray(void); |
| 19 | extern void initaudioop(void); |
| 20 | extern void initbinascii(void); |
| 21 | extern void initcmath(void); |
| 22 | extern void initerrno(void); |
| 23 | extern void initimageop(void); |
| 24 | extern void initmath(void); |
| 25 | extern void initmd5(void); |
Thomas Wouters | 7889010 | 2000-07-22 19:25:51 +0000 | [diff] [blame] | 26 | extern void initnt(void); |
| 27 | extern void initos2(void); |
| 28 | extern void initoperator(void); |
| 29 | extern void initposix(void); |
| 30 | extern void initregex(void); |
| 31 | extern void initrgbimg(void); |
Thomas Wouters | 7889010 | 2000-07-22 19:25:51 +0000 | [diff] [blame] | 32 | extern void initsignal(void); |
| 33 | extern void initselect(void); |
| 34 | extern void init_socket(void); |
Thomas Wouters | 7889010 | 2000-07-22 19:25:51 +0000 | [diff] [blame] | 35 | extern void initstrop(void); |
| 36 | extern void initstruct(void); |
| 37 | extern void inittime(void); |
| 38 | extern void initthread(void); |
| 39 | extern void initcStringIO(void); |
| 40 | extern void initcPickle(void); |
| 41 | extern void initpcre(void); |
Guido van Rossum | 50d4cc2 | 1997-11-22 21:59:45 +0000 | [diff] [blame] | 42 | #ifdef WIN32 |
Thomas Wouters | 7889010 | 2000-07-22 19:25:51 +0000 | [diff] [blame] | 43 | extern void initmsvcrt(void); |
Guido van Rossum | 50d4cc2 | 1997-11-22 21:59:45 +0000 | [diff] [blame] | 44 | #endif |
| 45 | |
| 46 | /* -- ADDMODULE MARKER 1 -- */ |
| 47 | |
Thomas Wouters | 7889010 | 2000-07-22 19:25:51 +0000 | [diff] [blame] | 48 | extern void PyMarshal_Init(void); |
| 49 | extern void initimp(void); |
Guido van Rossum | 50d4cc2 | 1997-11-22 21:59:45 +0000 | [diff] [blame] | 50 | |
| 51 | struct _inittab _PyImport_Inittab[] = { |
| 52 | |
| 53 | {"array", initarray}, |
| 54 | #ifdef M_I386 |
| 55 | {"audioop", initaudioop}, |
| 56 | #endif |
| 57 | {"binascii", initbinascii}, |
| 58 | {"cmath", initcmath}, |
| 59 | {"errno", initerrno}, |
| 60 | // {"imageop", initimageop}, |
| 61 | {"math", initmath}, |
| 62 | {"md5", initmd5}, |
Guido van Rossum | 50d4cc2 | 1997-11-22 21:59:45 +0000 | [diff] [blame] | 63 | #if defined(MS_WINDOWS) || defined(__BORLANDC__) || defined(__WATCOMC__) |
| 64 | {"nt", initnt}, /* Use the NT os functions, not posix */ |
| 65 | #else |
| 66 | #if defined(PYOS_OS2) |
| 67 | {"os2", initos2}, |
| 68 | #else |
| 69 | {"posix", initposix}, |
| 70 | #endif |
| 71 | #endif |
| 72 | {"operator", initoperator}, |
| 73 | {"regex", initregex}, |
Guido van Rossum | 50d4cc2 | 1997-11-22 21:59:45 +0000 | [diff] [blame] | 74 | // {"rgbimg", initrgbimg}, |
Guido van Rossum | 50d4cc2 | 1997-11-22 21:59:45 +0000 | [diff] [blame] | 75 | {"signal", initsignal}, |
| 76 | #ifdef USE_SOCKET |
| 77 | {"_socket", init_socket}, |
| 78 | {"select", initselect}, |
| 79 | #endif |
Guido van Rossum | 50d4cc2 | 1997-11-22 21:59:45 +0000 | [diff] [blame] | 80 | {"strop", initstrop}, |
| 81 | {"struct", initstruct}, |
| 82 | {"time", inittime}, |
| 83 | #ifdef WITH_THREAD |
| 84 | {"thread", initthread}, |
| 85 | #endif |
| 86 | {"cStringIO", initcStringIO}, |
| 87 | {"cPickle", initcPickle}, |
Guido van Rossum | a34c313 | 1997-12-05 22:07:14 +0000 | [diff] [blame] | 88 | {"pcre", initpcre}, |
Guido van Rossum | 50d4cc2 | 1997-11-22 21:59:45 +0000 | [diff] [blame] | 89 | #ifdef WIN32 |
| 90 | {"msvcrt", initmsvcrt}, |
| 91 | #endif |
| 92 | |
| 93 | /* -- ADDMODULE MARKER 2 -- */ |
| 94 | |
| 95 | /* This module "lives in" with marshal.c */ |
| 96 | {"marshal", PyMarshal_Init}, |
| 97 | |
| 98 | /* This lives it with import.c */ |
| 99 | {"imp", initimp}, |
| 100 | |
| 101 | /* These entries are here for sys.builtin_module_names */ |
| 102 | {"__main__", NULL}, |
| 103 | {"__builtin__", NULL}, |
| 104 | {"sys", NULL}, |
| 105 | |
| 106 | /* Sentinel */ |
| 107 | {0, 0} |
| 108 | }; |