summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorNeal Norwitz <nnorwitz@gmail.com>2005-11-13 18:55:39 (GMT)
committerNeal Norwitz <nnorwitz@gmail.com>2005-11-13 18:55:39 (GMT)
commite5e5aa4ea693d18bfc8a5bb352a75e9154da6af9 (patch)
tree5bb871bd3185b087bfa79f420897cf83d4431de9 /Objects
parentb6fc9df8fc34271a881ab954b843872834f5f112 (diff)
downloadcpython-e5e5aa4ea693d18bfc8a5bb352a75e9154da6af9.zip
cpython-e5e5aa4ea693d18bfc8a5bb352a75e9154da6af9.tar.gz
cpython-e5e5aa4ea693d18bfc8a5bb352a75e9154da6af9.tar.bz2
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?
Diffstat (limited to 'Objects')
-rw-r--r--Objects/obmalloc.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/Objects/obmalloc.c b/Objects/obmalloc.c
index a6fdf40..266b4c6 100644
--- a/Objects/obmalloc.c
+++ b/Objects/obmalloc.c
@@ -557,8 +557,15 @@ error:
#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
/*==========================================================================*/