[Python-checkins] cpython: remove support GCC PyArg_ParseTuple format patch, last seen in 2006
benjamin.peterson
python-checkins at python.org
Mon May 13 06:08:41 CEST 2013
http://hg.python.org/cpython/rev/6eab274d3e34
changeset: 83758:6eab274d3e34
user: Benjamin Peterson <benjamin at python.org>
date: Sun May 12 23:08:28 2013 -0500
summary:
remove support GCC PyArg_ParseTuple format patch, last seen in 2006
files:
Include/modsupport.h | 2 +-
Include/pyport.h | 9 -------
configure | 38 --------------------------------
configure.ac | 18 ---------------
pyconfig.h.in | 3 --
5 files changed, 1 insertions(+), 69 deletions(-)
diff --git a/Include/modsupport.h b/Include/modsupport.h
--- a/Include/modsupport.h
+++ b/Include/modsupport.h
@@ -26,7 +26,7 @@
/* 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 *);
diff --git a/Include/pyport.h b/Include/pyport.h
--- a/Include/pyport.h
+++ b/Include/pyport.h
@@ -832,15 +832,6 @@
#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.
*/
#if defined(__GNUC__) && __GNUC__ >= 3
diff --git a/configure b/configure
--- a/configure
+++ b/configure
@@ -6523,44 +6523,6 @@
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).
diff --git a/configure.ac b/configure.ac
--- a/configure.ac
+++ b/configure.ac
@@ -1328,24 +1328,6 @@
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).
diff --git a/pyconfig.h.in b/pyconfig.h.in
--- a/pyconfig.h.in
+++ b/pyconfig.h.in
@@ -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
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list