annotate Include/modsupport.h @ 27998:e27f58a50737 legacy-trunk

SF bug #690377: Dud footnote reference in distutils docs
author Raymond Hettinger <python@rcn.com>
date Fri, 21 Feb 2003 02:47:09 +0000
parents bc660f73795c
children cc1f74d19fcb
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
145
853b736a6a9e Added copyright notice.
Guido van Rossum <guido@python.org>
parents: 86
diff changeset
1
13435
7e3cd9480f66 ANSI-fication of the sources -- remove Py_PROTO!
Fred Drake <fdrake@acm.org>
parents: 13256
diff changeset
2 #ifndef Py_MODSUPPORT_H
7e3cd9480f66 ANSI-fication of the sources -- remove Py_PROTO!
Fred Drake <fdrake@acm.org>
parents: 13256
diff changeset
3 #define Py_MODSUPPORT_H
7e3cd9480f66 ANSI-fication of the sources -- remove Py_PROTO!
Fred Drake <fdrake@acm.org>
parents: 13256
diff changeset
4 #ifdef __cplusplus
7e3cd9480f66 ANSI-fication of the sources -- remove Py_PROTO!
Fred Drake <fdrake@acm.org>
parents: 13256
diff changeset
5 extern "C" {
7e3cd9480f66 ANSI-fication of the sources -- remove Py_PROTO!
Fred Drake <fdrake@acm.org>
parents: 13256
diff changeset
6 #endif
7e3cd9480f66 ANSI-fication of the sources -- remove Py_PROTO!
Fred Drake <fdrake@acm.org>
parents: 13256
diff changeset
7
6
fc6fcd7df4f7 Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
8 /* Module support interface */
fc6fcd7df4f7 Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
9
1746
1940892d2fe3 Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1329
diff changeset
10 #include <stdarg.h>
1940892d2fe3 Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1329
diff changeset
11
24752
c1eb668525e1 Excise DL_EXPORT from Include.
Mark Hammond <mhammond@skippinet.com.au>
parents: 20632
diff changeset
12 PyAPI_FUNC(int) PyArg_Parse(PyObject *, char *, ...);
c1eb668525e1 Excise DL_EXPORT from Include.
Mark Hammond <mhammond@skippinet.com.au>
parents: 20632
diff changeset
13 PyAPI_FUNC(int) PyArg_ParseTuple(PyObject *, char *, ...);
c1eb668525e1 Excise DL_EXPORT from Include.
Mark Hammond <mhammond@skippinet.com.au>
parents: 20632
diff changeset
14 PyAPI_FUNC(int) PyArg_ParseTupleAndKeywords(PyObject *, PyObject *,
13435
7e3cd9480f66 ANSI-fication of the sources -- remove Py_PROTO!
Fred Drake <fdrake@acm.org>
parents: 13256
diff changeset
15 char *, char **, ...);
24752
c1eb668525e1 Excise DL_EXPORT from Include.
Mark Hammond <mhammond@skippinet.com.au>
parents: 20632
diff changeset
16 PyAPI_FUNC(int) PyArg_UnpackTuple(PyObject *, char *, int, int, ...);
c1eb668525e1 Excise DL_EXPORT from Include.
Mark Hammond <mhammond@skippinet.com.au>
parents: 20632
diff changeset
17 PyAPI_FUNC(PyObject *) Py_BuildValue(char *, ...);
1746
1940892d2fe3 Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1329
diff changeset
18
24752
c1eb668525e1 Excise DL_EXPORT from Include.
Mark Hammond <mhammond@skippinet.com.au>
parents: 20632
diff changeset
19 PyAPI_FUNC(int) PyArg_VaParse(PyObject *, char *, va_list);
c1eb668525e1 Excise DL_EXPORT from Include.
Mark Hammond <mhammond@skippinet.com.au>
parents: 20632
diff changeset
20 PyAPI_FUNC(PyObject *) Py_VaBuildValue(char *, va_list);
1252
c4cd0d9d8281 * Changed many files to use mkvalue() instead of newtupleobject().
Guido van Rossum <guido@python.org>
parents: 819
diff changeset
21
24752
c1eb668525e1 Excise DL_EXPORT from Include.
Mark Hammond <mhammond@skippinet.com.au>
parents: 20632
diff changeset
22 PyAPI_FUNC(int) PyModule_AddObject(PyObject *, char *, PyObject *);
c1eb668525e1 Excise DL_EXPORT from Include.
Mark Hammond <mhammond@skippinet.com.au>
parents: 20632
diff changeset
23 PyAPI_FUNC(int) PyModule_AddIntConstant(PyObject *, char *, long);
c1eb668525e1 Excise DL_EXPORT from Include.
Mark Hammond <mhammond@skippinet.com.au>
parents: 20632
diff changeset
24 PyAPI_FUNC(int) PyModule_AddStringConstant(PyObject *, char *, char *);
14781
081671cef7c1 Andrew Kuchling <akuchlin@mems-exchange.org>:
Fred Drake <fdrake@acm.org>
parents: 14375
diff changeset
25
24901
bc660f73795c SF patch 576101, by Oren Tirosh: alternative implementation of
Guido van Rossum <guido@python.org>
parents: 24752
diff changeset
26 #define PYTHON_API_VERSION 1012
bc660f73795c SF patch 576101, by Oren Tirosh: alternative implementation of
Guido van Rossum <guido@python.org>
parents: 24752
diff changeset
27 #define PYTHON_API_STRING "1012"
2095
0d7e4aa595f7 api version checking
Guido van Rossum <guido@python.org>
parents: 2078
diff changeset
28 /* The API version is maintained (independently from the Python version)
0d7e4aa595f7 api version checking
Guido van Rossum <guido@python.org>
parents: 2078
diff changeset
29 so we can detect mismatches between the interpreter and dynamically
13620
5b727ab37092 Spelling fixes supplied by Rob W. W. Hooft. All these are fixes in either
Thomas Wouters <thomas@python.org>
parents: 13435
diff changeset
30 loaded modules. These are diagnosed by an error message but
3831
96851f51ad6b Two bumps for the price of one (PYTHON_API_VERSION)
Guido van Rossum <guido@python.org>
parents: 3318
diff changeset
31 the module is still loaded (because the mismatch can only be tested
96851f51ad6b Two bumps for the price of one (PYTHON_API_VERSION)
Guido van Rossum <guido@python.org>
parents: 3318
diff changeset
32 after loading the module). The error message is intended to
96851f51ad6b Two bumps for the price of one (PYTHON_API_VERSION)
Guido van Rossum <guido@python.org>
parents: 3318
diff changeset
33 explain the core dump a few seconds later.
2095
0d7e4aa595f7 api version checking
Guido van Rossum <guido@python.org>
parents: 2078
diff changeset
34
4110
07a35fd2e0a1 Add PYTHON_API_STRING, which is PYTHON_API_VERSION as a string literal.
Guido van Rossum <guido@python.org>
parents: 3831
diff changeset
35 The symbol PYTHON_API_STRING defines the same value as a string
07a35fd2e0a1 Add PYTHON_API_STRING, which is PYTHON_API_VERSION as a string literal.
Guido van Rossum <guido@python.org>
parents: 3831
diff changeset
36 literal. *** PLEASE MAKE SURE THE DEFINITIONS MATCH. ***
07a35fd2e0a1 Add PYTHON_API_STRING, which is PYTHON_API_VERSION as a string literal.
Guido van Rossum <guido@python.org>
parents: 3831
diff changeset
37
2095
0d7e4aa595f7 api version checking
Guido van Rossum <guido@python.org>
parents: 2078
diff changeset
38 Please add a line or two to the top of this log for each API
0d7e4aa595f7 api version checking
Guido van Rossum <guido@python.org>
parents: 2078
diff changeset
39 version change:
0d7e4aa595f7 api version checking
Guido van Rossum <guido@python.org>
parents: 2078
diff changeset
40
24901
bc660f73795c SF patch 576101, by Oren Tirosh: alternative implementation of
Guido van Rossum <guido@python.org>
parents: 24752
diff changeset
41 19-Aug-2002 GvR 1012 Changes to string object struct for
bc660f73795c SF patch 576101, by Oren Tirosh: alternative implementation of
Guido van Rossum <guido@python.org>
parents: 24752
diff changeset
42 interning changes, saving 3 bytes.
bc660f73795c SF patch 576101, by Oren Tirosh: alternative implementation of
Guido van Rossum <guido@python.org>
parents: 24752
diff changeset
43
18933
09df3254b49d Merge of descr-branch back into trunk.
Tim Peters <tim.peters@gmail.com>
parents: 16269
diff changeset
44 17-Jul-2001 GvR 1011 Descr-branch, just to be on the safe side
09df3254b49d Merge of descr-branch back into trunk.
Tim Peters <tim.peters@gmail.com>
parents: 16269
diff changeset
45
16269
77958266c7d7 The addition of new parameters to functions in the Python/C API requires
Fred Drake <fdrake@acm.org>
parents: 14781
diff changeset
46 25-Jan-2001 FLD 1010 Parameters added to PyCode_New() and
77958266c7d7 The addition of new parameters to functions in the Python/C API requires
Fred Drake <fdrake@acm.org>
parents: 14781
diff changeset
47 PyFrame_New(); Python 2.1a2
77958266c7d7 The addition of new parameters to functions in the Python/C API requires
Fred Drake <fdrake@acm.org>
parents: 14781
diff changeset
48
12088
3789b643fe89 Version updated to 1.6; API version to 1009.
Guido van Rossum <guido@python.org>
parents: 9744
diff changeset
49 14-Mar-2000 GvR 1009 Unicode API added
3789b643fe89 Version updated to 1.6; API version to 1009.
Guido van Rossum <guido@python.org>
parents: 9744
diff changeset
50
9744
85ab28644201 New version identification scheme.
Guido van Rossum <guido@python.org>
parents: 9586
diff changeset
51 3-Jan-1999 GvR 1007 Decided to change back! (Don't reuse 1008!)
85ab28644201 New version identification scheme.
Guido van Rossum <guido@python.org>
parents: 9586
diff changeset
52
85ab28644201 New version identification scheme.
Guido van Rossum <guido@python.org>
parents: 9586
diff changeset
53 3-Dec-1998 GvR 1008 Python 1.5.2b1
9578
299284ee669d New API version (enough has changed!).
Guido van Rossum <guido@python.org>
parents: 8563
diff changeset
54
299284ee669d New API version (enough has changed!).
Guido van Rossum <guido@python.org>
parents: 8563
diff changeset
55 18-Jan-1997 GvR 1007 string interning and other speedups
5004
4c8e4e9311e4 Bump API version due to the various speedup hacks.
Guido van Rossum <guido@python.org>
parents: 4503
diff changeset
56
4403
3b3f7c3f6da2 Ellipses -> Ellipsis rename (the dictionary really says that it should
Guido van Rossum <guido@python.org>
parents: 4110
diff changeset
57 11-Oct-1996 GvR renamed Py_Ellipses to Py_Ellipsis :-(
3b3f7c3f6da2 Ellipses -> Ellipsis rename (the dictionary really says that it should
Guido van Rossum <guido@python.org>
parents: 4110
diff changeset
58
3831
96851f51ad6b Two bumps for the price of one (PYTHON_API_VERSION)
Guido van Rossum <guido@python.org>
parents: 3318
diff changeset
59 30-Jul-1996 GvR Slice and ellipses syntax added
96851f51ad6b Two bumps for the price of one (PYTHON_API_VERSION)
Guido van Rossum <guido@python.org>
parents: 3318
diff changeset
60
96851f51ad6b Two bumps for the price of one (PYTHON_API_VERSION)
Guido van Rossum <guido@python.org>
parents: 3318
diff changeset
61 23-Jul-1996 GvR For 1.4 -- better safe than sorry this time :-)
96851f51ad6b Two bumps for the price of one (PYTHON_API_VERSION)
Guido van Rossum <guido@python.org>
parents: 3318
diff changeset
62
3318
8b8d60fbe3bf bump api version
Guido van Rossum <guido@python.org>
parents: 2129
diff changeset
63 7-Nov-1995 GvR Keyword arguments (should've been done at 1.3 :-( )
8b8d60fbe3bf bump api version
Guido van Rossum <guido@python.org>
parents: 2129
diff changeset
64
2129
05360cd616ae The great renaming, phase two: all header files have been updated to
Guido van Rossum <guido@python.org>
parents: 2095
diff changeset
65 10-Jan-1995 GvR Renamed globals to new naming scheme
05360cd616ae The great renaming, phase two: all header files have been updated to
Guido van Rossum <guido@python.org>
parents: 2095
diff changeset
66
2095
0d7e4aa595f7 api version checking
Guido van Rossum <guido@python.org>
parents: 2078
diff changeset
67 9-Jan-1995 GvR Initial version (incompatible with older API)
0d7e4aa595f7 api version checking
Guido van Rossum <guido@python.org>
parents: 2078
diff changeset
68 */
0d7e4aa595f7 api version checking
Guido van Rossum <guido@python.org>
parents: 2078
diff changeset
69
4110
07a35fd2e0a1 Add PYTHON_API_STRING, which is PYTHON_API_VERSION as a string literal.
Guido van Rossum <guido@python.org>
parents: 3831
diff changeset
70 #ifdef MS_WINDOWS
6350
9a121b3fbebb Removed special Windows defines, at Mark Hammond's request.
Guido van Rossum <guido@python.org>
parents: 5978
diff changeset
71 /* Special defines for Windows versions used to live here. Things
9a121b3fbebb Removed special Windows defines, at Mark Hammond's request.
Guido van Rossum <guido@python.org>
parents: 5978
diff changeset
72 have changed, and the "Version" is now in a global string variable.
9a121b3fbebb Removed special Windows defines, at Mark Hammond's request.
Guido van Rossum <guido@python.org>
parents: 5978
diff changeset
73 Reason for this is that this for easier branding of a "custom DLL"
9a121b3fbebb Removed special Windows defines, at Mark Hammond's request.
Guido van Rossum <guido@python.org>
parents: 5978
diff changeset
74 without actually needing a recompile. */
4110
07a35fd2e0a1 Add PYTHON_API_STRING, which is PYTHON_API_VERSION as a string literal.
Guido van Rossum <guido@python.org>
parents: 3831
diff changeset
75 #endif /* MS_WINDOWS */
07a35fd2e0a1 Add PYTHON_API_STRING, which is PYTHON_API_VERSION as a string literal.
Guido van Rossum <guido@python.org>
parents: 3831
diff changeset
76
07a35fd2e0a1 Add PYTHON_API_STRING, which is PYTHON_API_VERSION as a string literal.
Guido van Rossum <guido@python.org>
parents: 3831
diff changeset
77 #ifdef Py_TRACE_REFS
07a35fd2e0a1 Add PYTHON_API_STRING, which is PYTHON_API_VERSION as a string literal.
Guido van Rossum <guido@python.org>
parents: 3831
diff changeset
78 /* When we are tracing reference counts, rename Py_InitModule4 so
07a35fd2e0a1 Add PYTHON_API_STRING, which is PYTHON_API_VERSION as a string literal.
Guido van Rossum <guido@python.org>
parents: 3831
diff changeset
79 modules compiled with incompatible settings will generate a
07a35fd2e0a1 Add PYTHON_API_STRING, which is PYTHON_API_VERSION as a string literal.
Guido van Rossum <guido@python.org>
parents: 3831
diff changeset
80 link-time error. */
07a35fd2e0a1 Add PYTHON_API_STRING, which is PYTHON_API_VERSION as a string literal.
Guido van Rossum <guido@python.org>
parents: 3831
diff changeset
81 #define Py_InitModule4 Py_InitModule4TraceRefs
07a35fd2e0a1 Add PYTHON_API_STRING, which is PYTHON_API_VERSION as a string literal.
Guido van Rossum <guido@python.org>
parents: 3831
diff changeset
82 #endif
07a35fd2e0a1 Add PYTHON_API_STRING, which is PYTHON_API_VERSION as a string literal.
Guido van Rossum <guido@python.org>
parents: 3831
diff changeset
83
24752
c1eb668525e1 Excise DL_EXPORT from Include.
Mark Hammond <mhammond@skippinet.com.au>
parents: 20632
diff changeset
84 PyAPI_FUNC(PyObject *) Py_InitModule4(char *name, PyMethodDef *methods,
13435
7e3cd9480f66 ANSI-fication of the sources -- remove Py_PROTO!
Fred Drake <fdrake@acm.org>
parents: 13256
diff changeset
85 char *doc, PyObject *self,
7e3cd9480f66 ANSI-fication of the sources -- remove Py_PROTO!
Fred Drake <fdrake@acm.org>
parents: 13256
diff changeset
86 int apiver);
7e3cd9480f66 ANSI-fication of the sources -- remove Py_PROTO!
Fred Drake <fdrake@acm.org>
parents: 13256
diff changeset
87
2129
05360cd616ae The great renaming, phase two: all header files have been updated to
Guido van Rossum <guido@python.org>
parents: 2095
diff changeset
88 #define Py_InitModule(name, methods) \
05360cd616ae The great renaming, phase two: all header files have been updated to
Guido van Rossum <guido@python.org>
parents: 2095
diff changeset
89 Py_InitModule4(name, methods, (char *)NULL, (PyObject *)NULL, \
05360cd616ae The great renaming, phase two: all header files have been updated to
Guido van Rossum <guido@python.org>
parents: 2095
diff changeset
90 PYTHON_API_VERSION)
1329
519c25039c6a * Added support for X11 modules.
Guido van Rossum <guido@python.org>
parents: 1313
diff changeset
91
8563
419ee95df2d8 Define new macro Py_InitModule3(name, methods, doc) which calls
Guido van Rossum <guido@python.org>
parents: 6601
diff changeset
92 #define Py_InitModule3(name, methods, doc) \
419ee95df2d8 Define new macro Py_InitModule3(name, methods, doc) which calls
Guido van Rossum <guido@python.org>
parents: 6601
diff changeset
93 Py_InitModule4(name, methods, doc, (PyObject *)NULL, \
419ee95df2d8 Define new macro Py_InitModule3(name, methods, doc) which calls
Guido van Rossum <guido@python.org>
parents: 6601
diff changeset
94 PYTHON_API_VERSION)
419ee95df2d8 Define new macro Py_InitModule3(name, methods, doc) which calls
Guido van Rossum <guido@python.org>
parents: 6601
diff changeset
95
24752
c1eb668525e1 Excise DL_EXPORT from Include.
Mark Hammond <mhammond@skippinet.com.au>
parents: 20632
diff changeset
96 PyAPI_DATA(char *) _Py_PackageContext;
6601
1e428f51ed4e Add declaration for _Py_PackageContext -- needed to fix importing
Guido van Rossum <guido@python.org>
parents: 6350
diff changeset
97
1329
519c25039c6a * Added support for X11 modules.
Guido van Rossum <guido@python.org>
parents: 1313
diff changeset
98 #ifdef __cplusplus
519c25039c6a * Added support for X11 modules.
Guido van Rossum <guido@python.org>
parents: 1313
diff changeset
99 }
519c25039c6a * Added support for X11 modules.
Guido van Rossum <guido@python.org>
parents: 1313
diff changeset
100 #endif
519c25039c6a * Added support for X11 modules.
Guido van Rossum <guido@python.org>
parents: 1313
diff changeset
101 #endif /* !Py_MODSUPPORT_H */