blob: 717f267e90b8ad0a603c004d3c111859dad46cb7 [file] [log] [blame]
Guido van Rossum87d5e701996-05-28 22:50:17 +00001/* 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 Wouters78890102000-07-22 19:25:51 +00008extern void initarray(void);
Guido van Rossum23ef82f2000-05-08 14:15:19 +00009#ifndef MS_WIN64
Thomas Wouters78890102000-07-22 19:25:51 +000010extern void initaudioop(void);
Guido van Rossum23ef82f2000-05-08 14:15:19 +000011#endif
Trent Mickc85eb0b2000-10-04 20:57:29 +000012extern void initbinascii(void);
Thomas Wouters78890102000-07-22 19:25:51 +000013extern void initcmath(void);
14extern void initerrno(void);
Thomas Wouters78890102000-07-22 19:25:51 +000015extern void initgc(void);
Guido van Rossum23ef82f2000-05-08 14:15:19 +000016#ifndef MS_WIN64
Thomas Wouters78890102000-07-22 19:25:51 +000017extern void initimageop(void);
Guido van Rossum23ef82f2000-05-08 14:15:19 +000018#endif
Thomas Wouters78890102000-07-22 19:25:51 +000019extern void initmath(void);
20extern void initmd5(void);
Thomas Wouters78890102000-07-22 19:25:51 +000021extern void initnt(void);
22extern void initoperator(void);
23extern void initregex(void);
Guido van Rossum23ef82f2000-05-08 14:15:19 +000024#ifndef MS_WIN64
Thomas Wouters78890102000-07-22 19:25:51 +000025extern void initrgbimg(void);
Guido van Rossum23ef82f2000-05-08 14:15:19 +000026#endif
Thomas Wouters78890102000-07-22 19:25:51 +000027extern void initrotor(void);
28extern void initsignal(void);
29extern void initsha(void);
30extern void initstrop(void);
31extern void initstruct(void);
32extern void inittime(void);
33extern void initthread(void);
34extern void initcStringIO(void);
35extern void initcPickle(void);
36extern void initpcre(void);
Guido van Rossum29c1ea51997-08-07 00:11:34 +000037#ifdef WIN32
Thomas Wouters78890102000-07-22 19:25:51 +000038extern void initmsvcrt(void);
39extern void init_locale(void);
Guido van Rossum29c1ea51997-08-07 00:11:34 +000040#endif
Thomas Wouters78890102000-07-22 19:25:51 +000041extern void init_codecs(void);
Tim Peters58c82f02001-01-09 23:26:39 +000042extern void initxreadlines(void);
Tim Peters747d5b62001-02-02 00:07:07 +000043extern void init_weakref(void);
Tim Peters1566a172001-10-12 22:08:39 +000044extern void init_hotshot(void);
Tim Peters6d6c1a32001-08-02 04:15:00 +000045extern void initxxsubtype(void);
Just van Rossum52e14d62002-12-30 22:08:05 +000046extern void initzipimport(void);
Tim Petersd1f5ccc2002-12-29 23:46:40 +000047extern void init_random(void);
Raymond Hettinger96ef8112003-02-01 00:10:11 +000048extern void inititertools(void);
Guido van Rossum87d5e701996-05-28 22:50:17 +000049
Tim Peters58c82f02001-01-09 23:26:39 +000050/* XXX tim: what's the purpose of ADDMODULE MARKER? */
Guido van Rossum87d5e701996-05-28 22:50:17 +000051/* -- ADDMODULE MARKER 1 -- */
52
Thomas Wouters78890102000-07-22 19:25:51 +000053extern void PyMarshal_Init(void);
54extern void initimp(void);
Guido van Rossum87d5e701996-05-28 22:50:17 +000055
Guido van Rossum2b713b21997-04-29 20:46:45 +000056struct _inittab _PyImport_Inittab[] = {
Guido van Rossum87d5e701996-05-28 22:50:17 +000057
58 {"array", initarray},
Guido van Rossum8f81a221999-02-05 22:34:57 +000059#ifdef MS_WINDOWS
Guido van Rossum23ef82f2000-05-08 14:15:19 +000060#ifndef MS_WIN64
Guido van Rossum87d5e701996-05-28 22:50:17 +000061 {"audioop", initaudioop},
62#endif
Guido van Rossum23ef82f2000-05-08 14:15:19 +000063#endif
Guido van Rossum87d5e701996-05-28 22:50:17 +000064 {"binascii", initbinascii},
Guido van Rossum1bc716f1996-06-28 19:12:06 +000065 {"cmath", initcmath},
Guido van Rossum950a1261996-07-30 17:38:17 +000066 {"errno", initerrno},
Jeremy Hyltonc5007aa2000-06-30 05:02:53 +000067 {"gc", initgc},
Guido van Rossum23ef82f2000-05-08 14:15:19 +000068#ifndef MS_WIN64
Guido van Rossum87d5e701996-05-28 22:50:17 +000069 {"imageop", initimageop},
Guido van Rossum23ef82f2000-05-08 14:15:19 +000070#endif
Guido van Rossum87d5e701996-05-28 22:50:17 +000071 {"math", initmath},
72 {"md5", initmd5},
Guido van Rossum2e146b31997-05-06 16:00:32 +000073 {"nt", initnt}, /* Use the NT os functions, not posix */
Guido van Rossum950a1261996-07-30 17:38:17 +000074 {"operator", initoperator},
Guido van Rossum87d5e701996-05-28 22:50:17 +000075 {"regex", initregex},
Guido van Rossum23ef82f2000-05-08 14:15:19 +000076#ifndef MS_WIN64
Guido van Rossum87d5e701996-05-28 22:50:17 +000077 {"rgbimg", initrgbimg},
Guido van Rossum23ef82f2000-05-08 14:15:19 +000078#endif
Guido van Rossum87d5e701996-05-28 22:50:17 +000079 {"rotor", initrotor},
80 {"signal", initsignal},
Guido van Rossumbe211a51999-04-13 15:41:10 +000081 {"sha", initsha},
Guido van Rossum87d5e701996-05-28 22:50:17 +000082 {"strop", initstrop},
83 {"struct", initstruct},
84 {"time", inittime},
Guido van Rossumbf57ed51996-08-22 00:43:42 +000085#ifdef WITH_THREAD
86 {"thread", initthread},
87#endif
Guido van Rossum2e146b31997-05-06 16:00:32 +000088 {"cStringIO", initcStringIO},
89 {"cPickle", initcPickle},
Guido van Rossum36e18e31997-11-25 06:00:59 +000090 {"pcre", initpcre},
Guido van Rossum29c1ea51997-08-07 00:11:34 +000091#ifdef WIN32
Guido van Rossum23ef82f2000-05-08 14:15:19 +000092 {"msvcrt", initmsvcrt},
93 {"_locale", init_locale},
Guido van Rossum29c1ea51997-08-07 00:11:34 +000094#endif
Guido van Rossum87d5e701996-05-28 22:50:17 +000095
Guido van Rossum23ef82f2000-05-08 14:15:19 +000096 {"_codecs", init_codecs},
Tim Peters58c82f02001-01-09 23:26:39 +000097 {"xreadlines", initxreadlines},
Tim Peters747d5b62001-02-02 00:07:07 +000098 {"_weakref", init_weakref},
Tim Peters1566a172001-10-12 22:08:39 +000099 {"_hotshot", init_hotshot},
Tim Petersd1f5ccc2002-12-29 23:46:40 +0000100 {"_random", init_random},
Raymond Hettinger96ef8112003-02-01 00:10:11 +0000101 {"itertools", inititertools},
Guido van Rossum76bd6892000-03-11 00:13:14 +0000102
Tim Peters6d6c1a32001-08-02 04:15:00 +0000103 {"xxsubtype", initxxsubtype},
Just van Rossum52e14d62002-12-30 22:08:05 +0000104 {"zipimport", initzipimport},
Tim Peters6d6c1a32001-08-02 04:15:00 +0000105
Tim Peters58c82f02001-01-09 23:26:39 +0000106/* XXX tim: what's the purpose of ADDMODULE MARKER? */
Guido van Rossum87d5e701996-05-28 22:50:17 +0000107/* -- ADDMODULE MARKER 2 -- */
108
109 /* This module "lives in" with marshal.c */
110 {"marshal", PyMarshal_Init},
111
112 /* This lives it with import.c */
113 {"imp", initimp},
114
115 /* These entries are here for sys.builtin_module_names */
116 {"__main__", NULL},
117 {"__builtin__", NULL},
118 {"sys", NULL},
Guido van Rossumf981c8f2000-07-12 12:11:36 +0000119 {"exceptions", NULL},
Guido van Rossum87d5e701996-05-28 22:50:17 +0000120
121 /* Sentinel */
122 {0, 0}
123};