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

Add printf attribute to functions call va_list format functions

This commit is contained in:
Nobuyoshi Nakada 2021-09-12 14:05:52 +09:00
parent c5570a7c11
commit e802587433
No known key found for this signature in database
GPG key ID: 7CD2805BFA3770C6

View file

@ -471,6 +471,7 @@ static VALUE string_spec_rb_sprintf4(VALUE self, VALUE str) {
return rb_sprintf("Result: %+" PRIsVALUE ".", str);
}
PRINTF_ARGS(static VALUE string_spec_rb_vsprintf_worker(char* fmt, ...), 1, 2);
static VALUE string_spec_rb_vsprintf_worker(char* fmt, ...) {
va_list varargs;
VALUE str;
@ -533,6 +534,7 @@ static VALUE string_spec_rb_utf8_str_new_cstr(VALUE self) {
return rb_utf8_str_new_cstr("nokogiri");
}
PRINTF_ARGS(static VALUE call_rb_str_vcatf(VALUE mesg, const char *fmt, ...), 2, 3);
static VALUE call_rb_str_vcatf(VALUE mesg, const char *fmt, ...){
va_list ap;
va_start(ap, fmt);