Guido van Rossum | 87d5e70 | 1996-05-28 22:50:17 +0000 | [diff] [blame] | 1 | /* Module configuration */ |
| 2 | |
| 3 | /* This file contains the table of built-in modules. |
| 4 | See init_builtin() in import.c. */ |
| 5 | |
| 6 | #include "Python.h" |
| 7 | |
Thomas Wouters | 7889010 | 2000-07-22 19:25:51 +0000 | [diff] [blame] | 8 | extern void initarray(void); |
Guido van Rossum | 23ef82f | 2000-05-08 14:15:19 +0000 | [diff] [blame] | 9 | #ifndef MS_WIN64 |
Thomas Wouters | 7889010 | 2000-07-22 19:25:51 +0000 | [diff] [blame] | 10 | extern void initaudioop(void); |
Guido van Rossum | 23ef82f | 2000-05-08 14:15:19 +0000 | [diff] [blame] | 11 | #endif |
Trent Mick | c85eb0b | 2000-10-04 20:57:29 +0000 | [diff] [blame] | 12 | extern void initbinascii(void); |
Thomas Wouters | 7889010 | 2000-07-22 19:25:51 +0000 | [diff] [blame] | 13 | extern void initcmath(void); |
| 14 | extern void initerrno(void); |
Jeremy Hylton | c5007aa | 2000-06-30 05:02:53 +0000 | [diff] [blame] | 15 | #ifdef WITH_CYCLE_GC |
Thomas Wouters | 7889010 | 2000-07-22 19:25:51 +0000 | [diff] [blame] | 16 | extern void initgc(void); |
Jeremy Hylton | c5007aa | 2000-06-30 05:02:53 +0000 | [diff] [blame] | 17 | #endif |
Guido van Rossum | 23ef82f | 2000-05-08 14:15:19 +0000 | [diff] [blame] | 18 | #ifndef MS_WIN64 |
Thomas Wouters | 7889010 | 2000-07-22 19:25:51 +0000 | [diff] [blame] | 19 | extern void initimageop(void); |
Guido van Rossum | 23ef82f | 2000-05-08 14:15:19 +0000 | [diff] [blame] | 20 | #endif |
Thomas Wouters | 7889010 | 2000-07-22 19:25:51 +0000 | [diff] [blame] | 21 | extern void initmath(void); |
| 22 | extern void initmd5(void); |
| 23 | extern void initnew(void); |
| 24 | extern void initnt(void); |
| 25 | extern void initoperator(void); |
| 26 | extern void initregex(void); |
Guido van Rossum | 23ef82f | 2000-05-08 14:15:19 +0000 | [diff] [blame] | 27 | #ifndef MS_WIN64 |
Thomas Wouters | 7889010 | 2000-07-22 19:25:51 +0000 | [diff] [blame] | 28 | extern void initrgbimg(void); |
Guido van Rossum | 23ef82f | 2000-05-08 14:15:19 +0000 | [diff] [blame] | 29 | #endif |
Thomas Wouters | 7889010 | 2000-07-22 19:25:51 +0000 | [diff] [blame] | 30 | extern void initrotor(void); |
| 31 | extern void initsignal(void); |
| 32 | extern void initsha(void); |
| 33 | extern void initstrop(void); |
| 34 | extern void initstruct(void); |
| 35 | extern void inittime(void); |
| 36 | extern void initthread(void); |
| 37 | extern void initcStringIO(void); |
| 38 | extern void initcPickle(void); |
| 39 | extern void initpcre(void); |
Guido van Rossum | 29c1ea5 | 1997-08-07 00:11:34 +0000 | [diff] [blame] | 40 | #ifdef WIN32 |
Thomas Wouters | 7889010 | 2000-07-22 19:25:51 +0000 | [diff] [blame] | 41 | extern void initmsvcrt(void); |
| 42 | extern void init_locale(void); |
Guido van Rossum | 29c1ea5 | 1997-08-07 00:11:34 +0000 | [diff] [blame] | 43 | #endif |
Thomas Wouters | 7889010 | 2000-07-22 19:25:51 +0000 | [diff] [blame] | 44 | extern void init_codecs(void); |
Tim Peters | 58c82f0 | 2001-01-09 23:26:39 +0000 | [diff] [blame] | 45 | extern void initxreadlines(void); |
Tim Peters | 747d5b6 | 2001-02-02 00:07:07 +0000 | [diff] [blame] | 46 | extern void init_weakref(void); |
Guido van Rossum | 87d5e70 | 1996-05-28 22:50:17 +0000 | [diff] [blame] | 47 | |
Tim Peters | 58c82f0 | 2001-01-09 23:26:39 +0000 | [diff] [blame] | 48 | /* XXX tim: what's the purpose of ADDMODULE MARKER? */ |
Guido van Rossum | 87d5e70 | 1996-05-28 22:50:17 +0000 | [diff] [blame] | 49 | /* -- ADDMODULE MARKER 1 -- */ |
| 50 | |
Thomas Wouters | 7889010 | 2000-07-22 19:25:51 +0000 | [diff] [blame] | 51 | extern void PyMarshal_Init(void); |
| 52 | extern void initimp(void); |
Guido van Rossum | 87d5e70 | 1996-05-28 22:50:17 +0000 | [diff] [blame] | 53 | |
Guido van Rossum | 2b713b2 | 1997-04-29 20:46:45 +0000 | [diff] [blame] | 54 | struct _inittab _PyImport_Inittab[] = { |
Guido van Rossum | 87d5e70 | 1996-05-28 22:50:17 +0000 | [diff] [blame] | 55 | |
| 56 | {"array", initarray}, |
Guido van Rossum | 8f81a22 | 1999-02-05 22:34:57 +0000 | [diff] [blame] | 57 | #ifdef MS_WINDOWS |
Guido van Rossum | 23ef82f | 2000-05-08 14:15:19 +0000 | [diff] [blame] | 58 | #ifndef MS_WIN64 |
Guido van Rossum | 87d5e70 | 1996-05-28 22:50:17 +0000 | [diff] [blame] | 59 | {"audioop", initaudioop}, |
| 60 | #endif |
Guido van Rossum | 23ef82f | 2000-05-08 14:15:19 +0000 | [diff] [blame] | 61 | #endif |
Guido van Rossum | 87d5e70 | 1996-05-28 22:50:17 +0000 | [diff] [blame] | 62 | {"binascii", initbinascii}, |
Guido van Rossum | 1bc716f | 1996-06-28 19:12:06 +0000 | [diff] [blame] | 63 | {"cmath", initcmath}, |
Guido van Rossum | 950a126 | 1996-07-30 17:38:17 +0000 | [diff] [blame] | 64 | {"errno", initerrno}, |
Jeremy Hylton | c5007aa | 2000-06-30 05:02:53 +0000 | [diff] [blame] | 65 | #ifdef WITH_CYCLE_GC |
| 66 | {"gc", initgc}, |
| 67 | #endif |
Guido van Rossum | 23ef82f | 2000-05-08 14:15:19 +0000 | [diff] [blame] | 68 | #ifndef MS_WIN64 |
Guido van Rossum | 87d5e70 | 1996-05-28 22:50:17 +0000 | [diff] [blame] | 69 | {"imageop", initimageop}, |
Guido van Rossum | 23ef82f | 2000-05-08 14:15:19 +0000 | [diff] [blame] | 70 | #endif |
Guido van Rossum | 87d5e70 | 1996-05-28 22:50:17 +0000 | [diff] [blame] | 71 | {"math", initmath}, |
| 72 | {"md5", initmd5}, |
| 73 | {"new", initnew}, |
Guido van Rossum | 2e146b3 | 1997-05-06 16:00:32 +0000 | [diff] [blame] | 74 | {"nt", initnt}, /* Use the NT os functions, not posix */ |
Guido van Rossum | 950a126 | 1996-07-30 17:38:17 +0000 | [diff] [blame] | 75 | {"operator", initoperator}, |
Guido van Rossum | 87d5e70 | 1996-05-28 22:50:17 +0000 | [diff] [blame] | 76 | {"regex", initregex}, |
Guido van Rossum | 23ef82f | 2000-05-08 14:15:19 +0000 | [diff] [blame] | 77 | #ifndef MS_WIN64 |
Guido van Rossum | 87d5e70 | 1996-05-28 22:50:17 +0000 | [diff] [blame] | 78 | {"rgbimg", initrgbimg}, |
Guido van Rossum | 23ef82f | 2000-05-08 14:15:19 +0000 | [diff] [blame] | 79 | #endif |
Guido van Rossum | 87d5e70 | 1996-05-28 22:50:17 +0000 | [diff] [blame] | 80 | {"rotor", initrotor}, |
| 81 | {"signal", initsignal}, |
Guido van Rossum | be211a5 | 1999-04-13 15:41:10 +0000 | [diff] [blame] | 82 | {"sha", initsha}, |
Guido van Rossum | 87d5e70 | 1996-05-28 22:50:17 +0000 | [diff] [blame] | 83 | {"strop", initstrop}, |
| 84 | {"struct", initstruct}, |
| 85 | {"time", inittime}, |
Guido van Rossum | bf57ed5 | 1996-08-22 00:43:42 +0000 | [diff] [blame] | 86 | #ifdef WITH_THREAD |
| 87 | {"thread", initthread}, |
| 88 | #endif |
Guido van Rossum | 2e146b3 | 1997-05-06 16:00:32 +0000 | [diff] [blame] | 89 | {"cStringIO", initcStringIO}, |
| 90 | {"cPickle", initcPickle}, |
Guido van Rossum | 36e18e3 | 1997-11-25 06:00:59 +0000 | [diff] [blame] | 91 | {"pcre", initpcre}, |
Guido van Rossum | 29c1ea5 | 1997-08-07 00:11:34 +0000 | [diff] [blame] | 92 | #ifdef WIN32 |
Guido van Rossum | 23ef82f | 2000-05-08 14:15:19 +0000 | [diff] [blame] | 93 | {"msvcrt", initmsvcrt}, |
| 94 | {"_locale", init_locale}, |
Guido van Rossum | 29c1ea5 | 1997-08-07 00:11:34 +0000 | [diff] [blame] | 95 | #endif |
Guido van Rossum | 87d5e70 | 1996-05-28 22:50:17 +0000 | [diff] [blame] | 96 | |
Guido van Rossum | 23ef82f | 2000-05-08 14:15:19 +0000 | [diff] [blame] | 97 | {"_codecs", init_codecs}, |
Tim Peters | 58c82f0 | 2001-01-09 23:26:39 +0000 | [diff] [blame] | 98 | {"xreadlines", initxreadlines}, |
Tim Peters | 747d5b6 | 2001-02-02 00:07:07 +0000 | [diff] [blame] | 99 | {"_weakref", init_weakref}, |
Guido van Rossum | 76bd689 | 2000-03-11 00:13:14 +0000 | [diff] [blame] | 100 | |
Tim Peters | 58c82f0 | 2001-01-09 23:26:39 +0000 | [diff] [blame] | 101 | /* XXX tim: what's the purpose of ADDMODULE MARKER? */ |
Guido van Rossum | 87d5e70 | 1996-05-28 22:50:17 +0000 | [diff] [blame] | 102 | /* -- ADDMODULE MARKER 2 -- */ |
| 103 | |
| 104 | /* This module "lives in" with marshal.c */ |
| 105 | {"marshal", PyMarshal_Init}, |
| 106 | |
| 107 | /* This lives it with import.c */ |
| 108 | {"imp", initimp}, |
| 109 | |
| 110 | /* These entries are here for sys.builtin_module_names */ |
| 111 | {"__main__", NULL}, |
| 112 | {"__builtin__", NULL}, |
| 113 | {"sys", NULL}, |
Guido van Rossum | f981c8f | 2000-07-12 12:11:36 +0000 | [diff] [blame] | 114 | {"exceptions", NULL}, |
Guido van Rossum | 87d5e70 | 1996-05-28 22:50:17 +0000 | [diff] [blame] | 115 | |
| 116 | /* Sentinel */ |
| 117 | {0, 0} |
| 118 | }; |