]> granicus.if.org Git - python/commitdiff
Get Py_DEPRECATED to work with gcc 4.x too
authorNeal Norwitz <nnorwitz@gmail.com>
Mon, 20 Mar 2006 06:33:01 +0000 (06:33 +0000)
committerNeal Norwitz <nnorwitz@gmail.com>
Mon, 20 Mar 2006 06:33:01 +0000 (06:33 +0000)
Include/pyport.h

index 046516852bc8dd9f0ed049e4187ddd6a846a7ddf..ae19d6fc1d5f639eeb9f13405124f3bcd7a7ec2f 100644 (file)
@@ -406,7 +406,8 @@ extern "C" {
  *    typedef int T1 Py_DEPRECATED(2.4);
  *    extern int x() Py_DEPRECATED(2.5);
  */
-#if defined(__GNUC__) && (__GNUC__ == 3) && (__GNUC_MINOR__ >= 1)
+#if defined(__GNUC__) && ((__GNUC__ >= 4) || \
+                         (__GNUC__ == 3) && (__GNUC_MINOR__ >= 1))
 #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
 #else
 #define Py_DEPRECATED(VERSION_UNUSED)