annotate PC/config.c @ 4566:6403c94de50d legacy-trunk

Added safeguard against failure in __del__.
author Guido van Rossum <guido@python.org>
date Wed, 27 Nov 1996 19:39:58 +0000
parents 65d2d8e67da3
children 319e3eaecdf4
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3624
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
1 /* -*- C -*- ***********************************************
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
2 Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam,
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
3 The Netherlands.
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
4
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
5 All Rights Reserved
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
6
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
7 Permission to use, copy, modify, and distribute this software and its
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
8 documentation for any purpose and without fee is hereby granted,
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
9 provided that the above copyright notice appear in all copies and that
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
10 both that copyright notice and this permission notice appear in
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
11 supporting documentation, and that the names of Stichting Mathematisch
4503
65d2d8e67da3 New permission notice, includes CNRI.
Guido van Rossum <guido@python.org>
parents: 4107
diff changeset
12 Centrum or CWI or Corporation for National Research Initiatives or
65d2d8e67da3 New permission notice, includes CNRI.
Guido van Rossum <guido@python.org>
parents: 4107
diff changeset
13 CNRI not be used in advertising or publicity pertaining to
65d2d8e67da3 New permission notice, includes CNRI.
Guido van Rossum <guido@python.org>
parents: 4107
diff changeset
14 distribution of the software without specific, written prior
65d2d8e67da3 New permission notice, includes CNRI.
Guido van Rossum <guido@python.org>
parents: 4107
diff changeset
15 permission.
65d2d8e67da3 New permission notice, includes CNRI.
Guido van Rossum <guido@python.org>
parents: 4107
diff changeset
16
65d2d8e67da3 New permission notice, includes CNRI.
Guido van Rossum <guido@python.org>
parents: 4107
diff changeset
17 While CWI is the initial source for this software, a modified version
65d2d8e67da3 New permission notice, includes CNRI.
Guido van Rossum <guido@python.org>
parents: 4107
diff changeset
18 is made available by the Corporation for National Research Initiatives
65d2d8e67da3 New permission notice, includes CNRI.
Guido van Rossum <guido@python.org>
parents: 4107
diff changeset
19 (CNRI) at the Internet address ftp://ftp.python.org.
3624
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
20
4503
65d2d8e67da3 New permission notice, includes CNRI.
Guido van Rossum <guido@python.org>
parents: 4107
diff changeset
21 STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH
65d2d8e67da3 New permission notice, includes CNRI.
Guido van Rossum <guido@python.org>
parents: 4107
diff changeset
22 REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF
65d2d8e67da3 New permission notice, includes CNRI.
Guido van Rossum <guido@python.org>
parents: 4107
diff changeset
23 MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH
65d2d8e67da3 New permission notice, includes CNRI.
Guido van Rossum <guido@python.org>
parents: 4107
diff changeset
24 CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
65d2d8e67da3 New permission notice, includes CNRI.
Guido van Rossum <guido@python.org>
parents: 4107
diff changeset
25 DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
65d2d8e67da3 New permission notice, includes CNRI.
Guido van Rossum <guido@python.org>
parents: 4107
diff changeset
26 PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
65d2d8e67da3 New permission notice, includes CNRI.
Guido van Rossum <guido@python.org>
parents: 4107
diff changeset
27 TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
65d2d8e67da3 New permission notice, includes CNRI.
Guido van Rossum <guido@python.org>
parents: 4107
diff changeset
28 PERFORMANCE OF THIS SOFTWARE.
3624
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
29
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
30 ******************************************************************/
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
31
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
32 /* Module configuration */
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
33
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
34 /* This file contains the table of built-in modules.
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
35 See init_builtin() in import.c. */
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
36
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
37 #include "Python.h"
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
38
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
39 extern void initarray();
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
40 extern void initaudioop();
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
41 extern void initbinascii();
3736
6c9c2ac15e4b Added PC files from Jim Ahlstrom.
Guido van Rossum <guido@python.org>
parents: 3729
diff changeset
42 extern void initcmath();
3846
fcd82a01507d New versions of almost all files.
Guido van Rossum <guido@python.org>
parents: 3736
diff changeset
43 extern void initerrno();
3624
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
44 extern void initimageop();
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
45 extern void initmath();
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
46 extern void initmd5();
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
47 extern void initnew();
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
48 extern void initnt();
3846
fcd82a01507d New versions of almost all files.
Guido van Rossum <guido@python.org>
parents: 3736
diff changeset
49 extern void initoperator();
3624
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
50 extern void initregex();
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
51 extern void initrgbimg();
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
52 extern void initrotor();
3736
6c9c2ac15e4b Added PC files from Jim Ahlstrom.
Guido van Rossum <guido@python.org>
parents: 3729
diff changeset
53 extern void initsignal();
3729
068556380cb0 new versions from Jim A
Guido van Rossum <guido@python.org>
parents: 3624
diff changeset
54 extern void initselect();
068556380cb0 new versions from Jim A
Guido van Rossum <guido@python.org>
parents: 3624
diff changeset
55 extern void init_socket();
3624
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
56 extern void initsoundex();
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
57 extern void initstrop();
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
58 extern void initstruct();
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
59 extern void inittime();
4107
3ac030cc33f0 Added thread module (it was already in the project!)
Guido van Rossum <guido@python.org>
parents: 4105
diff changeset
60 extern void initthread();
3624
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
61
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
62 /* -- ADDMODULE MARKER 1 -- */
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
63
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
64 extern void PyMarshal_Init();
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
65 extern void initimp();
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
66
3736
6c9c2ac15e4b Added PC files from Jim Ahlstrom.
Guido van Rossum <guido@python.org>
parents: 3729
diff changeset
67 struct _inittab inittab[] = {
3624
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
68
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
69 {"array", initarray},
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
70 #ifdef M_I386
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
71 {"audioop", initaudioop},
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
72 #endif
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
73 {"binascii", initbinascii},
3736
6c9c2ac15e4b Added PC files from Jim Ahlstrom.
Guido van Rossum <guido@python.org>
parents: 3729
diff changeset
74 {"cmath", initcmath},
3846
fcd82a01507d New versions of almost all files.
Guido van Rossum <guido@python.org>
parents: 3736
diff changeset
75 {"errno", initerrno},
3624
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
76 {"imageop", initimageop},
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
77 {"math", initmath},
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
78 {"md5", initmd5},
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
79 {"new", initnew},
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
80 {"nt", initnt}, /* Use the NT os functions, not posix */
3846
fcd82a01507d New versions of almost all files.
Guido van Rossum <guido@python.org>
parents: 3736
diff changeset
81 {"operator", initoperator},
3624
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
82 {"regex", initregex},
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
83 {"rgbimg", initrgbimg},
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
84 {"rotor", initrotor},
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
85 {"signal", initsignal},
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
86 #ifdef USE_SOCKET
3729
068556380cb0 new versions from Jim A
Guido van Rossum <guido@python.org>
parents: 3624
diff changeset
87 {"_socket", init_socket},
3736
6c9c2ac15e4b Added PC files from Jim Ahlstrom.
Guido van Rossum <guido@python.org>
parents: 3729
diff changeset
88 {"select", initselect},
3624
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
89 #endif
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
90 {"soundex", initsoundex},
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
91 {"strop", initstrop},
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
92 {"struct", initstruct},
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
93 {"time", inittime},
4107
3ac030cc33f0 Added thread module (it was already in the project!)
Guido van Rossum <guido@python.org>
parents: 4105
diff changeset
94 #ifdef WITH_THREAD
3ac030cc33f0 Added thread module (it was already in the project!)
Guido van Rossum <guido@python.org>
parents: 4105
diff changeset
95 {"thread", initthread},
3ac030cc33f0 Added thread module (it was already in the project!)
Guido van Rossum <guido@python.org>
parents: 4105
diff changeset
96 #endif
3624
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
97
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
98 /* -- ADDMODULE MARKER 2 -- */
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
99
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
100 /* This module "lives in" with marshal.c */
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
101 {"marshal", PyMarshal_Init},
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
102
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
103 /* This lives it with import.c */
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
104 {"imp", initimp},
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
105
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
106 /* These entries are here for sys.builtin_module_names */
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
107 {"__main__", NULL},
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
108 {"__builtin__", NULL},
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
109 {"sys", NULL},
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
110
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
111 /* Sentinel */
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
112 {0, 0}
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
113 };