File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2632,12 +2632,6 @@ _PyErr_TrySetFromCause(const char *format, ...)
26322632 PyObject * new_exc , * new_val , * new_tb ;
26332633 va_list vargs ;
26342634
2635- #ifdef HAVE_STDARG_PROTOTYPES
2636- va_start (vargs , format );
2637- #else
2638- va_start (vargs );
2639- #endif
2640-
26412635 PyErr_Fetch (& exc , & val , & tb );
26422636 caught_type = (PyTypeObject * ) exc ;
26432637 /* Ensure type info indicates no extra state is stored at the C level */
@@ -2690,7 +2684,14 @@ _PyErr_TrySetFromCause(const char *format, ...)
26902684 * types as well, but that's quite a bit trickier due to the extra
26912685 * state potentially stored on OSError instances.
26922686 */
2687+
2688+ #ifdef HAVE_STDARG_PROTOTYPES
2689+ va_start (vargs , format );
2690+ #else
2691+ va_start (vargs );
2692+ #endif
26932693 msg_prefix = PyUnicode_FromFormatV (format , vargs );
2694+ va_end (vargs );
26942695 if (msg_prefix == NULL )
26952696 return NULL ;
26962697
You can’t perform that action at this time.
0 commit comments