blob: 2044688009bd21b180492f8c22a891e7aae8552e [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);
Guido van Rossum87d5e701996-05-28 22:50:17 +000047
Tim Peters58c82f02001-01-09 23:26:39 +000048/* XXX tim: what's the purpose of ADDMODULE MARKER? */
Guido van Rossum87d5e701996-05-28 22:50:17 +000049/* -- ADDMODULE MARKER 1 -- */
50
Thomas Wouters78890102000-07-22 19:25:51 +000051extern void PyMarshal_Init(void);
52extern void initimp(void);
Guido van Rossum87d5e701996-05-28 22:50:17 +000053
Guido van Rossum2b713b21997-04-29 20:46:45 +000054struct _inittab _PyImport_Inittab[] = {
Guido van Rossum87d5e701996-05-28 22:50:17 +000055
56 {"array", initarray},
Guido van Rossum8f81a221999-02-05 22:34:57 +000057#ifdef MS_WINDOWS
Guido van Rossum23ef82f2000-05-08 14:15:19 +000058#ifndef MS_WIN64
Guido van Rossum87d5e701996-05-28 22:50:17 +000059 {"audioop", initaudioop},
60#endif
Guido van Rossum23ef82f2000-05-08 14:15:19 +000061#endif
Guido van Rossum87d5e701996-05-28 22:50:17 +000062 {"binascii", initbinascii},
Guido van Rossum1bc716f1996-06-28 19:12:06 +000063 {"cmath", initcmath},
Guido van Rossum950a1261996-07-30 17:38:17 +000064 {"errno", initerrno},
Jeremy Hyltonc5007aa2000-06-30 05:02:53 +000065#ifdef WITH_CYCLE_GC
66 {"gc", initgc},
67#endif
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},
73 {"new", initnew},
Guido van Rossum2e146b31997-05-06 16:00:32 +000074 {"nt", initnt}, /* Use the NT os functions, not posix */
Guido van Rossum950a1261996-07-30 17:38:17 +000075 {"operator", initoperator},
Guido van Rossum87d5e701996-05-28 22:50:17 +000076 {"regex", initregex},
Guido van Rossum23ef82f2000-05-08 14:15:19 +000077#ifndef MS_WIN64
Guido van Rossum87d5e701996-05-28 22:50:17 +000078 {"rgbimg", initrgbimg},
Guido van Rossum23ef82f2000-05-08 14:15:19 +000079#endif
Guido van Rossum87d5e701996-05-28 22:50:17 +000080 {"rotor", initrotor},
81 {"signal", initsignal},
Guido van Rossumbe211a51999-04-13 15:41:10 +000082 {"sha", initsha},
Guido van Rossum87d5e701996-05-28 22:50:17 +000083 {"strop", initstrop},
84 {"struct", initstruct},
85 {"time", inittime},
Guido van Rossumbf57ed51996-08-22 00:43:42 +000086#ifdef WITH_THREAD
87 {"thread", initthread},
88#endif
Guido van Rossum2e146b31997-05-06 16:00:32 +000089 {"cStringIO", initcStringIO},
90 {"cPickle", initcPickle},
Guido van Rossum36e18e31997-11-25 06:00:59 +000091 {"pcre", initpcre},
Guido van Rossum29c1ea51997-08-07 00:11:34 +000092#ifdef WIN32
Guido van Rossum23ef82f2000-05-08 14:15:19 +000093 {"msvcrt", initmsvcrt},
94 {"_locale", init_locale},
Guido van Rossum29c1ea51997-08-07 00:11:34 +000095#endif
Guido van Rossum87d5e701996-05-28 22:50:17 +000096
Guido van Rossum23ef82f2000-05-08 14:15:19 +000097 {"_codecs", init_codecs},
Tim Peters58c82f02001-01-09 23:26:39 +000098 {"xreadlines", initxreadlines},
Tim Peters747d5b62001-02-02 00:07:07 +000099 {"_weakref", init_weakref},
Guido van Rossum76bd6892000-03-11 00:13:14 +0000100
Tim Peters58c82f02001-01-09 23:26:39 +0000101/* XXX tim: what's the purpose of ADDMODULE MARKER? */
Guido van Rossum87d5e701996-05-28 22:50:17 +0000102/* -- 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 Rossumf981c8f2000-07-12 12:11:36 +0000114 {"exceptions", NULL},
Guido van Rossum87d5e701996-05-28 22:50:17 +0000115
116 /* Sentinel */
117 {0, 0}
118};