]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
remove support GCC PyArg_ParseTuple format patch, last seen in 2006
authorBenjamin Peterson <benjamin@python.org>
Mon, 13 May 2013 04:08:28 +0000 (23:08 -0500)
committerBenjamin Peterson <benjamin@python.org>
Mon, 13 May 2013 04:08:28 +0000 (23:08 -0500)
Include/modsupport.h
Include/pyport.h
configure
configure.ac
pyconfig.h.in

index ecf1dccc813c0d129b8f730c966a9474127fb269..ab725f612aca2c343a21961195ac3f6c6d23d781 100644 (file)
@@ -26,7 +26,7 @@ PyAPI_FUNC(PyObject *) _Py_VaBuildValue_SizeT(const char *, va_list);
 /* Due to a glitch in 3.2, the _SizeT versions weren't exported from the DLL. */
 #if !defined(PY_SSIZE_T_CLEAN) || !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03030000
 PyAPI_FUNC(int) PyArg_Parse(PyObject *, const char *, ...);
-PyAPI_FUNC(int) PyArg_ParseTuple(PyObject *, const char *, ...) Py_FORMAT_PARSETUPLE(PyArg_ParseTuple, 2, 3);
+PyAPI_FUNC(int) PyArg_ParseTuple(PyObject *, const char *, ...);
 PyAPI_FUNC(int) PyArg_ParseTupleAndKeywords(PyObject *, PyObject *,
                                                   const char *, char **, ...);
 PyAPI_FUNC(int) PyArg_ValidateKeywordArguments(PyObject *);
index 17d9f6d4c892fe0f54a2a629b50c9f1017a7b9a7..96e8f1a5f86d82c35ae58df046b2735fe6ef1eb4 100644 (file)
@@ -831,15 +831,6 @@ extern pid_t forkpty(int *, char *, struct termios *, struct winsize *);
 #define Py_GCC_ATTRIBUTE(x) __attribute__(x)
 #endif
 
-/*
- * Add PyArg_ParseTuple format where available.
- */
-#ifdef HAVE_ATTRIBUTE_FORMAT_PARSETUPLE
-#define Py_FORMAT_PARSETUPLE(func,p1,p2) __attribute__((format(func,p1,p2)))
-#else
-#define Py_FORMAT_PARSETUPLE(func,p1,p2)
-#endif
-
 /*
  * Specify alignment on compilers that support it.
  */
index a414fe0fc0bcdb69c202032fde5af579fff3738a..725250bb3aaf620ea21b097f964fd94d6a138d59 100755 (executable)
--- a/configure
+++ b/configure
@@ -6523,44 +6523,6 @@ then
        BASECFLAGS="$BASECFLAGS $ac_arch_flags"
 fi
 
-# Check whether GCC supports PyArg_ParseTuple format
-if test "$GCC" = "yes"
-then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
-$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
-  save_CFLAGS=$CFLAGS
-  CFLAGS="$CFLAGS -Werror -Wformat"
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-    void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
-
-$as_echo "#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1" >>confdefs.h
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-else
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-  CFLAGS=$save_CFLAGS
-fi
-
 # On some compilers, pthreads are available without further options
 # (e.g. MacOS X). On some of these systems, the compiler will not
 # complain if unaccepted options are passed (e.g. gcc on Mac OS X).
index a70a752891c80dbc6cccb5259e1bcdd3f8d3746b..03f90729bde8d96f306aca1579e0f25fce1b21e9 100644 (file)
@@ -1328,24 +1328,6 @@ then
        BASECFLAGS="$BASECFLAGS $ac_arch_flags"
 fi
 
-# Check whether GCC supports PyArg_ParseTuple format
-if test "$GCC" = "yes"
-then
-  AC_MSG_CHECKING(whether gcc supports ParseTuple __format__)
-  save_CFLAGS=$CFLAGS
-  CFLAGS="$CFLAGS -Werror -Wformat"
-  AC_COMPILE_IFELSE([
-    AC_LANG_PROGRAM([[void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));]], [[]])
-  ],[
-    AC_DEFINE(HAVE_ATTRIBUTE_FORMAT_PARSETUPLE, 1,
-      [Define if GCC supports __attribute__((format(PyArg_ParseTuple, 2, 3)))])
-    AC_MSG_RESULT(yes)
-  ],[
-    AC_MSG_RESULT(no)
-  ])
-  CFLAGS=$save_CFLAGS
-fi
-
 # On some compilers, pthreads are available without further options
 # (e.g. MacOS X). On some of these systems, the compiler will not
 # complain if unaccepted options are passed (e.g. gcc on Mac OS X).
index 4f252dc100c60791ea4524b4cc25021c50487d67..2d4536d4483d557bf65047007215ef9a9b284b49 100644 (file)
@@ -61,9 +61,6 @@
 /* Define to 1 if you have the `atanh' function. */
 #undef HAVE_ATANH
 
-/* Define if GCC supports __attribute__((format(PyArg_ParseTuple, 2, 3))) */
-#undef HAVE_ATTRIBUTE_FORMAT_PARSETUPLE
-
 /* Define to 1 if you have the `bind_textdomain_codeset' function. */
 #undef HAVE_BIND_TEXTDOMAIN_CODESET