Skip to content

Commit 4616854

Browse files
remove check for HAVE_STDARG_PROTOTYPES
1 parent 7108bdf commit 4616854

13 files changed

Lines changed: 0 additions & 96 deletions

File tree

Modules/_asynciomodule.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2643,11 +2643,7 @@ task_set_error_soon(TaskObj *task, PyObject *et, const char *format, ...)
26432643
PyObject* msg;
26442644

26452645
va_list vargs;
2646-
#ifdef HAVE_STDARG_PROTOTYPES
26472646
va_start(vargs, format);
2648-
#else
2649-
va_start(vargs);
2650-
#endif
26512647
msg = PyUnicode_FromFormatV(format, vargs);
26522648
va_end(vargs);
26532649

Modules/_hashopenssl.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -255,11 +255,7 @@ _setException(PyObject *exc, const char* altmsg, ...)
255255
const char *lib, *func, *reason;
256256
va_list vargs;
257257

258-
#ifdef HAVE_STDARG_PROTOTYPES
259258
va_start(vargs, altmsg);
260-
#else
261-
va_start(vargs);
262-
#endif
263259
if (!errcode) {
264260
if (altmsg == NULL) {
265261
PyErr_SetString(exc, "no reason supplied");

Objects/bytesobject.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -377,11 +377,7 @@ PyBytes_FromFormat(const char *format, ...)
377377
PyObject* ret;
378378
va_list vargs;
379379

380-
#ifdef HAVE_STDARG_PROTOTYPES
381380
va_start(vargs, format);
382-
#else
383-
va_start(vargs);
384-
#endif
385381
ret = PyBytes_FromFormatV(format, vargs);
386382
va_end(vargs);
387383
return ret;

Objects/exceptions.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3816,11 +3816,7 @@ _PyErr_TrySetFromCause(const char *format, ...)
38163816
Py_DECREF(tb);
38173817
}
38183818

3819-
#ifdef HAVE_STDARG_PROTOTYPES
38203819
va_start(vargs, format);
3821-
#else
3822-
va_start(vargs);
3823-
#endif
38243820
msg_prefix = PyUnicode_FromFormatV(format, vargs);
38253821
va_end(vargs);
38263822
if (msg_prefix == NULL) {

Objects/unicodeobject.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2694,11 +2694,7 @@ PyUnicode_FromFormat(const char *format, ...)
26942694
PyObject* ret;
26952695
va_list vargs;
26962696

2697-
#ifdef HAVE_STDARG_PROTOTYPES
26982697
va_start(vargs, format);
2699-
#else
2700-
va_start(vargs);
2701-
#endif
27022698
ret = PyUnicode_FromFormatV(format, vargs);
27032699
va_end(vargs);
27042700
return ret;

Parser/tokenizer.c

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1102,11 +1102,7 @@ static int
11021102
syntaxerror(struct tok_state *tok, const char *format, ...)
11031103
{
11041104
va_list vargs;
1105-
#ifdef HAVE_STDARG_PROTOTYPES
11061105
va_start(vargs, format);
1107-
#else
1108-
va_start(vargs);
1109-
#endif
11101106
int ret = _syntaxerror_range(tok, format, -1, -1, vargs);
11111107
va_end(vargs);
11121108
return ret;
@@ -1118,11 +1114,7 @@ syntaxerror_known_range(struct tok_state *tok,
11181114
const char *format, ...)
11191115
{
11201116
va_list vargs;
1121-
#ifdef HAVE_STDARG_PROTOTYPES
11221117
va_start(vargs, format);
1123-
#else
1124-
va_start(vargs);
1125-
#endif
11261118
int ret = _syntaxerror_range(tok, format, col_offset, end_col_offset, vargs);
11271119
va_end(vargs);
11281120
return ret;
@@ -1143,11 +1135,7 @@ parser_warn(struct tok_state *tok, PyObject *category, const char *format, ...)
11431135
{
11441136
PyObject *errmsg;
11451137
va_list vargs;
1146-
#ifdef HAVE_STDARG_PROTOTYPES
11471138
va_start(vargs, format);
1148-
#else
1149-
va_start(vargs);
1150-
#endif
11511139
errmsg = PyUnicode_FromFormatV(format, vargs);
11521140
va_end(vargs);
11531141
if (!errmsg) {

Python/_warnings.c

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1136,11 +1136,7 @@ PyErr_WarnFormat(PyObject *category, Py_ssize_t stack_level,
11361136
int res;
11371137
va_list vargs;
11381138

1139-
#ifdef HAVE_STDARG_PROTOTYPES
11401139
va_start(vargs, format);
1141-
#else
1142-
va_start(vargs);
1143-
#endif
11441140
res = _PyErr_WarnFormatV(NULL, category, stack_level, format, vargs);
11451141
va_end(vargs);
11461142
return res;
@@ -1153,11 +1149,7 @@ _PyErr_WarnFormat(PyObject *source, PyObject *category, Py_ssize_t stack_level,
11531149
int res;
11541150
va_list vargs;
11551151

1156-
#ifdef HAVE_STDARG_PROTOTYPES
11571152
va_start(vargs, format);
1158-
#else
1159-
va_start(vargs);
1160-
#endif
11611153
res = _PyErr_WarnFormatV(source, category, stack_level, format, vargs);
11621154
va_end(vargs);
11631155
return res;
@@ -1170,11 +1162,7 @@ PyErr_ResourceWarning(PyObject *source, Py_ssize_t stack_level,
11701162
int res;
11711163
va_list vargs;
11721164

1173-
#ifdef HAVE_STDARG_PROTOTYPES
11741165
va_start(vargs, format);
1175-
#else
1176-
va_start(vargs);
1177-
#endif
11781166
res = _PyErr_WarnFormatV(source, PyExc_ResourceWarning,
11791167
stack_level, format, vargs);
11801168
va_end(vargs);
@@ -1274,11 +1262,7 @@ PyErr_WarnExplicitFormat(PyObject *category,
12741262
goto exit;
12751263
}
12761264

1277-
#ifdef HAVE_STDARG_PROTOTYPES
12781265
va_start(vargs, format);
1279-
#else
1280-
va_start(vargs);
1281-
#endif
12821266
message = PyUnicode_FromFormatV(format, vargs);
12831267
if (message != NULL) {
12841268
PyObject *res;

Python/compile.c

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6094,11 +6094,7 @@ static int
60946094
compiler_error(struct compiler *c, const char *format, ...)
60956095
{
60966096
va_list vargs;
6097-
#ifdef HAVE_STDARG_PROTOTYPES
60986097
va_start(vargs, format);
6099-
#else
6100-
va_start(vargs);
6101-
#endif
61026098
PyObject *msg = PyUnicode_FromFormatV(format, vargs);
61036099
va_end(vargs);
61046100
if (msg == NULL) {
@@ -6131,11 +6127,7 @@ static int
61316127
compiler_warn(struct compiler *c, const char *format, ...)
61326128
{
61336129
va_list vargs;
6134-
#ifdef HAVE_STDARG_PROTOTYPES
61356130
va_start(vargs, format);
6136-
#else
6137-
va_start(vargs);
6138-
#endif
61396131
PyObject *msg = PyUnicode_FromFormatV(format, vargs);
61406132
va_end(vargs);
61416133
if (msg == NULL) {

Python/errors.c

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -688,11 +688,7 @@ _PyErr_FormatFromCauseTstate(PyThreadState *tstate, PyObject *exception,
688688
const char *format, ...)
689689
{
690690
va_list vargs;
691-
#ifdef HAVE_STDARG_PROTOTYPES
692691
va_start(vargs, format);
693-
#else
694-
va_start(vargs);
695-
#endif
696692
_PyErr_FormatVFromCause(tstate, exception, format, vargs);
697693
va_end(vargs);
698694
return NULL;
@@ -703,11 +699,7 @@ _PyErr_FormatFromCause(PyObject *exception, const char *format, ...)
703699
{
704700
PyThreadState *tstate = _PyThreadState_GET();
705701
va_list vargs;
706-
#ifdef HAVE_STDARG_PROTOTYPES
707702
va_start(vargs, format);
708-
#else
709-
va_start(vargs);
710-
#endif
711703
_PyErr_FormatVFromCause(tstate, exception, format, vargs);
712704
va_end(vargs);
713705
return NULL;
@@ -1096,11 +1088,7 @@ _PyErr_Format(PyThreadState *tstate, PyObject *exception,
10961088
const char *format, ...)
10971089
{
10981090
va_list vargs;
1099-
#ifdef HAVE_STDARG_PROTOTYPES
11001091
va_start(vargs, format);
1101-
#else
1102-
va_start(vargs);
1103-
#endif
11041092
_PyErr_FormatV(tstate, exception, format, vargs);
11051093
va_end(vargs);
11061094
return NULL;
@@ -1112,11 +1100,7 @@ PyErr_Format(PyObject *exception, const char *format, ...)
11121100
{
11131101
PyThreadState *tstate = _PyThreadState_GET();
11141102
va_list vargs;
1115-
#ifdef HAVE_STDARG_PROTOTYPES
11161103
va_start(vargs, format);
1117-
#else
1118-
va_start(vargs);
1119-
#endif
11201104
_PyErr_FormatV(tstate, exception, format, vargs);
11211105
va_end(vargs);
11221106
return NULL;

Python/getargs.c

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2792,11 +2792,7 @@ PyArg_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssize_t m
27922792
stack = _PyTuple_ITEMS(args);
27932793
nargs = PyTuple_GET_SIZE(args);
27942794

2795-
#ifdef HAVE_STDARG_PROTOTYPES
27962795
va_start(vargs, max);
2797-
#else
2798-
va_start(vargs);
2799-
#endif
28002796
retval = unpack_stack(stack, nargs, name, min, max, vargs);
28012797
va_end(vargs);
28022798
return retval;
@@ -2809,11 +2805,7 @@ _PyArg_UnpackStack(PyObject *const *args, Py_ssize_t nargs, const char *name,
28092805
int retval;
28102806
va_list vargs;
28112807

2812-
#ifdef HAVE_STDARG_PROTOTYPES
28132808
va_start(vargs, max);
2814-
#else
2815-
va_start(vargs);
2816-
#endif
28172809
retval = unpack_stack(args, nargs, name, min, max, vargs);
28182810
va_end(vargs);
28192811
return retval;

0 commit comments

Comments
 (0)