summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1996-08-22 22:55:47 (GMT)
committerGuido van Rossum <guido@python.org>1996-08-22 22:55:47 (GMT)
commit2ea0b0649874ff1654fc67db14b9a13582d9307a (patch)
tree71e656e4dee3dcf32b8e31af8927b69f126d9fcb
parent67d4ab0946c54d59dbf9d43a71bb7c730dbac945 (diff)
downloadcpython-2ea0b0649874ff1654fc67db14b9a13582d9307a.zip
cpython-2ea0b0649874ff1654fc67db14b9a13582d9307a.tar.gz
cpython-2ea0b0649874ff1654fc67db14b9a13582d9307a.tar.bz2
Add PYTHON_API_STRING, which is PYTHON_API_VERSION as a string literal.
Under Windows, add MS_DLL_ID and MS_DLL_VERSION_ID for Mark H. Independent change: if Py_TRACE_REFS is defined, rename Py_InitModule4 so so linking with incompatible modules will create a link time error. [Backing out of previous changes (also for modsupport.c) to test the latter at runtime.]
-rw-r--r--Include/modsupport.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/Include/modsupport.h b/Include/modsupport.h
index c6ea541..4d26523 100644
--- a/Include/modsupport.h
+++ b/Include/modsupport.h
@@ -53,6 +53,7 @@ extern int PyArg_VaParse Py_PROTO((PyObject *, char *, va_list));
extern PyObject *Py_VaBuildValue Py_PROTO((char *, va_list));
#define PYTHON_API_VERSION 1005
+#define PYTHON_API_STRING "1005"
/* The API version is maintained (independently from the Python version)
so we can detect mismatches between the interpreter and dynamically
loaded modules. These are diagnosticised by an error message but
@@ -60,6 +61,9 @@ extern PyObject *Py_VaBuildValue Py_PROTO((char *, va_list));
after loading the module). The error message is intended to
explain the core dump a few seconds later.
+ The symbol PYTHON_API_STRING defines the same value as a string
+ literal. *** PLEASE MAKE SURE THE DEFINITIONS MATCH. ***
+
Please add a line or two to the top of this log for each API
version change:
@@ -74,6 +78,24 @@ extern PyObject *Py_VaBuildValue Py_PROTO((char *, va_list));
9-Jan-1995 GvR Initial version (incompatible with older API)
*/
+#ifdef MS_WINDOWS
+/* Special defines for Windows versions. MS_DLL_ID is the key
+ used in the registry.
+ The full MS_DLL_VERSION_ID is imbedded in the core DLL, and
+ is so installers can determine incremental changes.
+*/
+#define MS_DLL_ID "1.4.0"
+#define MS_DLL_VERSION_ID MS_DLL_ID "." PYTHON_API_STRING
+
+#endif /* MS_WINDOWS */
+
+#ifdef Py_TRACE_REFS
+/* When we are tracing reference counts, rename Py_InitModule4 so
+ modules compiled with incompatible settings will generate a
+ link-time error. */
+#define Py_InitModule4 Py_InitModule4TraceRefs
+#endif
+
extern PyObject *Py_InitModule4 Py_PROTO((char *, PyMethodDef *,
char *, PyObject *, int));
#define Py_InitModule(name, methods) \