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

Consitified rb_scan_args_set

This commit is contained in:
Nobuyoshi Nakada 2020-02-14 15:31:56 +09:00
parent 36b7e95744
commit 0742585e7e
No known key found for this signature in database
GPG key ID: 4BC7D6DF58D8DF60

View file

@ -2498,13 +2498,13 @@ ALWAYS_INLINE(static int
rb_scan_args_set(int kw_flag, int argc, const VALUE *argv,
int n_lead, int n_opt, int n_trail,
int f_var, int f_hash, int f_block,
VALUE *vars[], char *fmt, int varc));
VALUE *vars[], const char *fmt, int varc));
inline int
rb_scan_args_set(int kw_flag, int argc, const VALUE *argv,
int n_lead, int n_opt, int n_trail,
int f_var, int f_hash, int f_block,
VALUE *vars[], RB_UNUSED_VAR(char *fmt), RB_UNUSED_VAR(int varc))
VALUE *vars[], RB_UNUSED_VAR(const char *fmt), RB_UNUSED_VAR(int varc))
# if defined(__has_attribute) && __has_attribute(diagnose_if)
__attribute__((diagnose_if(rb_scan_args_count(fmt)<0,"bad scan arg format","error")))
__attribute__((diagnose_if(rb_scan_args_count(fmt)!=varc,"variable argument length doesn't match","error")))