mirror of
https://github.com/python/cpython.git
synced 2025-08-31 22:18:28 +00:00
GH-93207: Remove HAVE_STDARG_PROTOTYPES configure check for stdarg.h (#93215)
This commit is contained in:
parent
ddc4a782d3
commit
cb04a09d2d
19 changed files with 9 additions and 171 deletions
|
@ -1136,11 +1136,7 @@ PyErr_WarnFormat(PyObject *category, Py_ssize_t stack_level,
|
|||
int res;
|
||||
va_list vargs;
|
||||
|
||||
#ifdef HAVE_STDARG_PROTOTYPES
|
||||
va_start(vargs, format);
|
||||
#else
|
||||
va_start(vargs);
|
||||
#endif
|
||||
res = _PyErr_WarnFormatV(NULL, category, stack_level, format, vargs);
|
||||
va_end(vargs);
|
||||
return res;
|
||||
|
@ -1153,11 +1149,7 @@ _PyErr_WarnFormat(PyObject *source, PyObject *category, Py_ssize_t stack_level,
|
|||
int res;
|
||||
va_list vargs;
|
||||
|
||||
#ifdef HAVE_STDARG_PROTOTYPES
|
||||
va_start(vargs, format);
|
||||
#else
|
||||
va_start(vargs);
|
||||
#endif
|
||||
res = _PyErr_WarnFormatV(source, category, stack_level, format, vargs);
|
||||
va_end(vargs);
|
||||
return res;
|
||||
|
@ -1170,11 +1162,7 @@ PyErr_ResourceWarning(PyObject *source, Py_ssize_t stack_level,
|
|||
int res;
|
||||
va_list vargs;
|
||||
|
||||
#ifdef HAVE_STDARG_PROTOTYPES
|
||||
va_start(vargs, format);
|
||||
#else
|
||||
va_start(vargs);
|
||||
#endif
|
||||
res = _PyErr_WarnFormatV(source, PyExc_ResourceWarning,
|
||||
stack_level, format, vargs);
|
||||
va_end(vargs);
|
||||
|
@ -1274,11 +1262,7 @@ PyErr_WarnExplicitFormat(PyObject *category,
|
|||
goto exit;
|
||||
}
|
||||
|
||||
#ifdef HAVE_STDARG_PROTOTYPES
|
||||
va_start(vargs, format);
|
||||
#else
|
||||
va_start(vargs);
|
||||
#endif
|
||||
message = PyUnicode_FromFormatV(format, vargs);
|
||||
if (message != NULL) {
|
||||
PyObject *res;
|
||||
|
|
|
@ -6094,11 +6094,7 @@ static int
|
|||
compiler_error(struct compiler *c, const char *format, ...)
|
||||
{
|
||||
va_list vargs;
|
||||
#ifdef HAVE_STDARG_PROTOTYPES
|
||||
va_start(vargs, format);
|
||||
#else
|
||||
va_start(vargs);
|
||||
#endif
|
||||
PyObject *msg = PyUnicode_FromFormatV(format, vargs);
|
||||
va_end(vargs);
|
||||
if (msg == NULL) {
|
||||
|
@ -6131,11 +6127,7 @@ static int
|
|||
compiler_warn(struct compiler *c, const char *format, ...)
|
||||
{
|
||||
va_list vargs;
|
||||
#ifdef HAVE_STDARG_PROTOTYPES
|
||||
va_start(vargs, format);
|
||||
#else
|
||||
va_start(vargs);
|
||||
#endif
|
||||
PyObject *msg = PyUnicode_FromFormatV(format, vargs);
|
||||
va_end(vargs);
|
||||
if (msg == NULL) {
|
||||
|
|
|
@ -688,11 +688,7 @@ _PyErr_FormatFromCauseTstate(PyThreadState *tstate, PyObject *exception,
|
|||
const char *format, ...)
|
||||
{
|
||||
va_list vargs;
|
||||
#ifdef HAVE_STDARG_PROTOTYPES
|
||||
va_start(vargs, format);
|
||||
#else
|
||||
va_start(vargs);
|
||||
#endif
|
||||
_PyErr_FormatVFromCause(tstate, exception, format, vargs);
|
||||
va_end(vargs);
|
||||
return NULL;
|
||||
|
@ -703,11 +699,7 @@ _PyErr_FormatFromCause(PyObject *exception, const char *format, ...)
|
|||
{
|
||||
PyThreadState *tstate = _PyThreadState_GET();
|
||||
va_list vargs;
|
||||
#ifdef HAVE_STDARG_PROTOTYPES
|
||||
va_start(vargs, format);
|
||||
#else
|
||||
va_start(vargs);
|
||||
#endif
|
||||
_PyErr_FormatVFromCause(tstate, exception, format, vargs);
|
||||
va_end(vargs);
|
||||
return NULL;
|
||||
|
@ -1096,11 +1088,7 @@ _PyErr_Format(PyThreadState *tstate, PyObject *exception,
|
|||
const char *format, ...)
|
||||
{
|
||||
va_list vargs;
|
||||
#ifdef HAVE_STDARG_PROTOTYPES
|
||||
va_start(vargs, format);
|
||||
#else
|
||||
va_start(vargs);
|
||||
#endif
|
||||
_PyErr_FormatV(tstate, exception, format, vargs);
|
||||
va_end(vargs);
|
||||
return NULL;
|
||||
|
@ -1112,11 +1100,7 @@ PyErr_Format(PyObject *exception, const char *format, ...)
|
|||
{
|
||||
PyThreadState *tstate = _PyThreadState_GET();
|
||||
va_list vargs;
|
||||
#ifdef HAVE_STDARG_PROTOTYPES
|
||||
va_start(vargs, format);
|
||||
#else
|
||||
va_start(vargs);
|
||||
#endif
|
||||
_PyErr_FormatV(tstate, exception, format, vargs);
|
||||
va_end(vargs);
|
||||
return NULL;
|
||||
|
|
|
@ -2792,11 +2792,7 @@ PyArg_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssize_t m
|
|||
stack = _PyTuple_ITEMS(args);
|
||||
nargs = PyTuple_GET_SIZE(args);
|
||||
|
||||
#ifdef HAVE_STDARG_PROTOTYPES
|
||||
va_start(vargs, max);
|
||||
#else
|
||||
va_start(vargs);
|
||||
#endif
|
||||
retval = unpack_stack(stack, nargs, name, min, max, vargs);
|
||||
va_end(vargs);
|
||||
return retval;
|
||||
|
@ -2809,11 +2805,7 @@ _PyArg_UnpackStack(PyObject *const *args, Py_ssize_t nargs, const char *name,
|
|||
int retval;
|
||||
va_list vargs;
|
||||
|
||||
#ifdef HAVE_STDARG_PROTOTYPES
|
||||
va_start(vargs, max);
|
||||
#else
|
||||
va_start(vargs);
|
||||
#endif
|
||||
retval = unpack_stack(args, nargs, name, min, max, vargs);
|
||||
va_end(vargs);
|
||||
return retval;
|
||||
|
|
|
@ -496,11 +496,7 @@ _hamt_dump_format(_PyUnicodeWriter *writer, const char *format, ...)
|
|||
int ret;
|
||||
|
||||
va_list vargs;
|
||||
#ifdef HAVE_STDARG_PROTOTYPES
|
||||
va_start(vargs, format);
|
||||
#else
|
||||
va_start(vargs);
|
||||
#endif
|
||||
msg = PyUnicode_FromFormatV(format, vargs);
|
||||
va_end(vargs);
|
||||
|
||||
|
|
|
@ -2838,11 +2838,7 @@ _Py_FatalErrorFormat(const char *func, const char *format, ...)
|
|||
}
|
||||
|
||||
va_list vargs;
|
||||
#ifdef HAVE_STDARG_PROTOTYPES
|
||||
va_start(vargs, format);
|
||||
#else
|
||||
va_start(vargs);
|
||||
#endif
|
||||
vfprintf(stream, format, vargs);
|
||||
va_end(vargs);
|
||||
|
||||
|
|
|
@ -292,11 +292,7 @@ _PySys_Audit(PyThreadState *tstate, const char *event,
|
|||
const char *argFormat, ...)
|
||||
{
|
||||
va_list vargs;
|
||||
#ifdef HAVE_STDARG_PROTOTYPES
|
||||
va_start(vargs, argFormat);
|
||||
#else
|
||||
va_start(vargs);
|
||||
#endif
|
||||
int res = sys_audit_tstate(tstate, event, argFormat, vargs);
|
||||
va_end(vargs);
|
||||
return res;
|
||||
|
@ -307,11 +303,7 @@ PySys_Audit(const char *event, const char *argFormat, ...)
|
|||
{
|
||||
PyThreadState *tstate = _PyThreadState_GET();
|
||||
va_list vargs;
|
||||
#ifdef HAVE_STDARG_PROTOTYPES
|
||||
va_start(vargs, argFormat);
|
||||
#else
|
||||
va_start(vargs);
|
||||
#endif
|
||||
int res = sys_audit_tstate(tstate, event, argFormat, vargs);
|
||||
va_end(vargs);
|
||||
return res;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue