[Python-checkins] r42338 - python/branches/ssize_t/Include/modsupport.h

martin.v.loewis python-checkins at python.org
Sun Feb 12 20:34:25 CET 2006


Author: martin.v.loewis
Date: Sun Feb 12 20:34:24 2006
New Revision: 42338

Modified:
   python/branches/ssize_t/Include/modsupport.h
Log:
Combine TraceRefs renaming with _64 renaming.


Modified: python/branches/ssize_t/Include/modsupport.h
==============================================================================
--- python/branches/ssize_t/Include/modsupport.h	(original)
+++ python/branches/ssize_t/Include/modsupport.h	Sun Feb 12 20:34:24 2006
@@ -90,19 +90,24 @@
    without actually needing a recompile.  */
 #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
-
 #if SIZEOF_SIZE_T != SIZEOF_INT
 /* On a 64-bit system, rename the Py_InitModule4 so that 2.4
    modules cannot get loaded into a 2.5 interpreter */
 #define Py_InitModule4 Py_InitModule4_64
 #endif
 
+#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. */
+ #if SIZEOF_SIZE_T != SIZEOF_INT
+ #undef Py_InitModule4
+ #define Py_InitModule4 Py_InitModule4TraceRefs_64
+ #else
+ #define Py_InitModule4 Py_InitModule4TraceRefs
+ #endif
+#endif
+
 PyAPI_FUNC(PyObject *) Py_InitModule4(const char *name, PyMethodDef *methods,
                                       const char *doc, PyObject *self,
                                       int apiver);


More information about the Python-checkins mailing list