Split `with_warning_string_from` for the last named parameter
authorNobuyoshi Nakada <[email protected]>
Fri, 30 Sep 2022 08:26:46 +0000 (30 17:26 +0900)
committerNobuyoshi Nakada <[email protected]>
Fri, 30 Sep 2022 08:29:23 +0000 (30 17:29 +0900)
error.c

diff --git a/error.c b/error.c
index cfa086a..f448902 100644 (file)
--- a/error.c
+++ b/error.c
@@ -406,8 +406,10 @@ warning_string(rb_encoding *enc, const char *fmt, va_list args)
 }
 
 #define with_warning_string(mesg, enc, fmt) \
+    with_warning_string_from(mesg, enc, fmt, fmt)
+#define with_warning_string_from(mesg, enc, fmt, last_arg) \
     VALUE mesg; \
-    va_list args; va_start(args, fmt); \
+    va_list args; va_start(args, last_arg); \
     mesg = warning_string(enc, fmt, args); \
     va_end(args);