[Python-checkins] commit of r41436 - python/trunk/Objects

neal.norwitz@python.org neal.norwitz at python.org
Sun Nov 13 19:55:39 CET 2005


Author: neal.norwitz
Date: Sun Nov 13 19:55:39 2005
New Revision: 41436

Modified:
   python/trunk/Objects/obmalloc.c
Log:
Do a better job of not inlining Py_ADDRESS_IN_RANGE() for newer gcc's.
Perhaps Py_NO_INLINE should be moved to pyport.h or some other header?


Modified: python/trunk/Objects/obmalloc.c
==============================================================================
--- python/trunk/Objects/obmalloc.c	(original)
+++ python/trunk/Objects/obmalloc.c	Sun Nov 13 19:55:39 2005
@@ -557,8 +557,15 @@
 
 #undef Py_ADDRESS_IN_RANGE
 
-/* Don't make static, to ensure this isn't inlined. */
-int Py_ADDRESS_IN_RANGE(void *P, poolp pool);
+#if defined(__GNUC__) && (__GNUC__ == 3) && (__GNUC_MINOR__ >= 1)
+#define Py_NO_INLINE __attribute__((__noinline__))
+#else
+#define Py_NO_INLINE
+#endif
+
+/* Don't make static, to try to ensure this isn't inlined. */
+int Py_ADDRESS_IN_RANGE(void *P, poolp pool) Py_NO_INLINE;
+#undef Py_NO_INLINE
 #endif
 
 /*==========================================================================*/


More information about the Python-checkins mailing list