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); |
Thomas Wouters | 7889010 | 2000-07-22 19:25:51 +0000 | [diff] [blame] | 30 | extern void initrgbimg(void); |
Thomas Wouters | 7889010 | 2000-07-22 19:25:51 +0000 | [diff] [blame] | 31 | extern void initsignal(void); |
| 32 | extern void initselect(void); |
| 33 | extern void init_socket(void); |
Thomas Wouters | 7889010 | 2000-07-22 19:25:51 +0000 | [diff] [blame] | 34 | extern void initstruct(void); |
| 35 | extern void inittime(void); |
Georg Brandl | 2067bfd | 2008-05-25 13:05:15 +0000 | [diff] [blame] | 36 | extern void init_thread(void); |
Thomas Wouters | 7889010 | 2000-07-22 19:25:51 +0000 | [diff] [blame] | 37 | extern void initpcre(void); |
Guido van Rossum | 50d4cc2 | 1997-11-22 21:59:45 +0000 | [diff] [blame] | 38 | #ifdef WIN32 |
Thomas Wouters | 7889010 | 2000-07-22 19:25:51 +0000 | [diff] [blame] | 39 | extern void initmsvcrt(void); |
Guido van Rossum | 50d4cc2 | 1997-11-22 21:59:45 +0000 | [diff] [blame] | 40 | #endif |
| 41 | |
| 42 | /* -- ADDMODULE MARKER 1 -- */ |
| 43 | |
Thomas Wouters | 7889010 | 2000-07-22 19:25:51 +0000 | [diff] [blame] | 44 | extern void PyMarshal_Init(void); |
| 45 | extern void initimp(void); |
Guido van Rossum | 50d4cc2 | 1997-11-22 21:59:45 +0000 | [diff] [blame] | 46 | |
| 47 | struct _inittab _PyImport_Inittab[] = { |
| 48 | |
| 49 | {"array", initarray}, |
| 50 | #ifdef M_I386 |
| 51 | {"audioop", initaudioop}, |
| 52 | #endif |
| 53 | {"binascii", initbinascii}, |
| 54 | {"cmath", initcmath}, |
| 55 | {"errno", initerrno}, |
| 56 | // {"imageop", initimageop}, |
| 57 | {"math", initmath}, |
| 58 | {"md5", initmd5}, |
Guido van Rossum | 50d4cc2 | 1997-11-22 21:59:45 +0000 | [diff] [blame] | 59 | #if defined(MS_WINDOWS) || defined(__BORLANDC__) || defined(__WATCOMC__) |
| 60 | {"nt", initnt}, /* Use the NT os functions, not posix */ |
| 61 | #else |
| 62 | #if defined(PYOS_OS2) |
| 63 | {"os2", initos2}, |
| 64 | #else |
| 65 | {"posix", initposix}, |
| 66 | #endif |
| 67 | #endif |
| 68 | {"operator", initoperator}, |
Guido van Rossum | 50d4cc2 | 1997-11-22 21:59:45 +0000 | [diff] [blame] | 69 | // {"rgbimg", initrgbimg}, |
Guido van Rossum | 50d4cc2 | 1997-11-22 21:59:45 +0000 | [diff] [blame] | 70 | {"signal", initsignal}, |
| 71 | #ifdef USE_SOCKET |
| 72 | {"_socket", init_socket}, |
| 73 | {"select", initselect}, |
| 74 | #endif |
Guido van Rossum | 50d4cc2 | 1997-11-22 21:59:45 +0000 | [diff] [blame] | 75 | {"struct", initstruct}, |
| 76 | {"time", inittime}, |
| 77 | #ifdef WITH_THREAD |
Georg Brandl | 2067bfd | 2008-05-25 13:05:15 +0000 | [diff] [blame] | 78 | {"_thread", init_thread}, |
Guido van Rossum | 50d4cc2 | 1997-11-22 21:59:45 +0000 | [diff] [blame] | 79 | #endif |
Guido van Rossum | a34c313 | 1997-12-05 22:07:14 +0000 | [diff] [blame] | 80 | {"pcre", initpcre}, |
Guido van Rossum | 50d4cc2 | 1997-11-22 21:59:45 +0000 | [diff] [blame] | 81 | #ifdef WIN32 |
| 82 | {"msvcrt", initmsvcrt}, |
| 83 | #endif |
| 84 | |
| 85 | /* -- ADDMODULE MARKER 2 -- */ |
| 86 | |
| 87 | /* This module "lives in" with marshal.c */ |
| 88 | {"marshal", PyMarshal_Init}, |
| 89 | |
| 90 | /* This lives it with import.c */ |
| 91 | {"imp", initimp}, |
| 92 | |
| 93 | /* These entries are here for sys.builtin_module_names */ |
| 94 | {"__main__", NULL}, |
Georg Brandl | 1a3284e | 2007-12-02 09:40:06 +0000 | [diff] [blame] | 95 | {"builtins", NULL}, |
Guido van Rossum | 50d4cc2 | 1997-11-22 21:59:45 +0000 | [diff] [blame] | 96 | {"sys", NULL}, |
| 97 | |
| 98 | /* Sentinel */ |
| 99 | {0, 0} |
| 100 | }; |