blob: 9e4da2aab882f9f804c530ee7c5b2b0d9062da5f [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);
Jeremy Hyltonc5007aa2000-06-30 05:02:53 +000015#ifdef WITH_CYCLE_GC
Thomas Wouters78890102000-07-22 19:25:51 +000016extern void initgc(void);
Jeremy Hyltonc5007aa2000-06-30 05:02:53 +000017#endif
Guido van Rossum23ef82f2000-05-08 14:15:19 +000018#ifndef MS_WIN64
Thomas Wouters78890102000-07-22 19:25:51 +000019extern void initimageop(void);
Guido van Rossum23ef82f2000-05-08 14:15:19 +000020#endif
Thomas Wouters78890102000-07-22 19:25:51 +000021extern void initmath(void);
22extern void initmd5(void);
23extern void initnew(void);
24extern void initnt(void);
25extern void initoperator(void);
26extern void initregex(void);
Guido van Rossum23ef82f2000-05-08 14:15:19 +000027#ifndef MS_WIN64
Thomas Wouters78890102000-07-22 19:25:51 +000028extern void initrgbimg(void);
Guido van Rossum23ef82f2000-05-08 14:15:19 +000029#endif
Thomas Wouters78890102000-07-22 19:25:51 +000030extern void initrotor(void);
31extern void initsignal(void);
32extern void initsha(void);
33extern void initstrop(void);
34extern void initstruct(void);
35extern void inittime(void);
36extern void initthread(void);
37extern void initcStringIO(void);
38extern void initcPickle(void);
39extern void initpcre(void);
Guido van Rossum29c1ea51997-08-07 00:11:34 +000040#ifdef WIN32
Thomas Wouters78890102000-07-22 19:25:51 +000041extern void initmsvcrt(void);
42extern void init_locale(void);
Guido van Rossum29c1ea51997-08-07 00:11:34 +000043#endif
Thomas Wouters78890102000-07-22 19:25:51 +000044extern void init_codecs(void);
Tim Peters58c82f02001-01-09 23:26:39 +000045extern void initxreadlines(void);
Tim Peters747d5b62001-02-02 00:07:07 +000046extern void init_weakref(void);
Tim Peters1566a172001-10-12 22:08:39 +000047extern void init_hotshot(void);
Tim Peters6d6c1a32001-08-02 04:15:00 +000048extern void initxxsubtype(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#ifdef WITH_CYCLE_GC
68 {"gc", initgc},
69#endif
Guido van Rossum23ef82f2000-05-08 14:15:19 +000070#ifndef MS_WIN64
Guido van Rossum87d5e701996-05-28 22:50:17 +000071 {"imageop", initimageop},
Guido van Rossum23ef82f2000-05-08 14:15:19 +000072#endif
Guido van Rossum87d5e701996-05-28 22:50:17 +000073 {"math", initmath},
74 {"md5", initmd5},
75 {"new", initnew},
Guido van Rossum2e146b31997-05-06 16:00:32 +000076 {"nt", initnt}, /* Use the NT os functions, not posix */
Guido van Rossum950a1261996-07-30 17:38:17 +000077 {"operator", initoperator},
Guido van Rossum87d5e701996-05-28 22:50:17 +000078 {"regex", initregex},
Guido van Rossum23ef82f2000-05-08 14:15:19 +000079#ifndef MS_WIN64
Guido van Rossum87d5e701996-05-28 22:50:17 +000080 {"rgbimg", initrgbimg},
Guido van Rossum23ef82f2000-05-08 14:15:19 +000081#endif
Guido van Rossum87d5e701996-05-28 22:50:17 +000082 {"rotor", initrotor},
83 {"signal", initsignal},
Guido van Rossumbe211a51999-04-13 15:41:10 +000084 {"sha", initsha},
Guido van Rossum87d5e701996-05-28 22:50:17 +000085 {"strop", initstrop},
86 {"struct", initstruct},
87 {"time", inittime},
Guido van Rossumbf57ed51996-08-22 00:43:42 +000088#ifdef WITH_THREAD
89 {"thread", initthread},
90#endif
Guido van Rossum2e146b31997-05-06 16:00:32 +000091 {"cStringIO", initcStringIO},
92 {"cPickle", initcPickle},
Guido van Rossum36e18e31997-11-25 06:00:59 +000093 {"pcre", initpcre},
Guido van Rossum29c1ea51997-08-07 00:11:34 +000094#ifdef WIN32
Guido van Rossum23ef82f2000-05-08 14:15:19 +000095 {"msvcrt", initmsvcrt},
96 {"_locale", init_locale},
Guido van Rossum29c1ea51997-08-07 00:11:34 +000097#endif
Guido van Rossum87d5e701996-05-28 22:50:17 +000098
Guido van Rossum23ef82f2000-05-08 14:15:19 +000099 {"_codecs", init_codecs},
Tim Peters58c82f02001-01-09 23:26:39 +0000100 {"xreadlines", initxreadlines},
Tim Peters747d5b62001-02-02 00:07:07 +0000101 {"_weakref", init_weakref},
Tim Peters1566a172001-10-12 22:08:39 +0000102 {"_hotshot", init_hotshot},
Guido van Rossum76bd6892000-03-11 00:13:14 +0000103
Tim Peters6d6c1a32001-08-02 04:15:00 +0000104 {"xxsubtype", initxxsubtype},
105
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};