1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Split with_warning_string_from for the last named parameter

This commit is contained in:
Nobuyoshi Nakada 2022-09-30 17:26:46 +09:00
parent 962f9932af
commit e294e6f417
No known key found for this signature in database
GPG key ID: 7CD2805BFA3770C6

View file

@ -406,8 +406,10 @@ warning_string(rb_encoding *enc, const char *fmt, va_list args)
} }
#define with_warning_string(mesg, enc, fmt) \ #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; \ VALUE mesg; \
va_list args; va_start(args, fmt); \ va_list args; va_start(args, last_arg); \
mesg = warning_string(enc, fmt, args); \ mesg = warning_string(enc, fmt, args); \
va_end(args); va_end(args);