[前][次][番号順一覧][スレッド一覧]

ruby-changes:73805

From: Nobuyoshi <ko1@a...>
Date: Fri, 30 Sep 2022 17:37:37 +0900 (JST)
Subject: [ruby-changes:73805] e294e6f417 (master): Split `with_warning_string_from` for the last named parameter

https://git.ruby-lang.org/ruby.git/commit/?id=e294e6f417

From e294e6f417acc27d85c6e6a0e67ebf7a07c83485 Mon Sep 17 00:00:00 2001
From: Nobuyoshi Nakada <nobu@r...>
Date: Fri, 30 Sep 2022 17:26:46 +0900
Subject: Split `with_warning_string_from` for the last named parameter

---
 error.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/error.c b/error.c
index cfa086a1eb..f448902309 100644
--- a/error.c
+++ b/error.c
@@ -406,8 +406,10 @@ warning_string(rb_encoding *enc, const char *fmt, va_list args) https://github.com/ruby/ruby/blob/trunk/error.c#L406
 }
 
 #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);
 
-- 
cgit v1.2.1


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]