ruby-changes:51248
From: nobu <ko1@a...>
Date: Thu, 17 May 2018 21:36:39 +0900 (JST)
Subject: [ruby-changes:51248] nobu:r63454 (trunk): rb_parser_printf declaration
nobu 2018-05-17 21:36:33 +0900 (Thu, 17 May 2018) New Revision: 63454 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=63454 Log: rb_parser_printf declaration * node.h (rb_parser_printf): delcare as PRINTF_ARGS. * parse.y (parser_token_value_print): cast to adjust to %c. Modified files: trunk/node.h trunk/parse.y Index: node.h =================================================================== --- node.h (revision 63453) +++ node.h (revision 63454) @@ -540,7 +540,7 @@ void *rb_parser_malloc(struct parser_par https://github.com/ruby/ruby/blob/trunk/node.h#L540 void *rb_parser_realloc(struct parser_params *, void *, size_t); void *rb_parser_calloc(struct parser_params *, size_t, size_t); void rb_parser_free(struct parser_params *, void *); -void rb_parser_printf(struct parser_params *parser, const char *fmt, ...); +PRINTF_ARGS(void rb_parser_printf(struct parser_params *parser, const char *fmt, ...), 2, 3); RUBY_SYMBOL_EXPORT_END Index: parse.y =================================================================== --- parse.y (revision 63453) +++ parse.y (revision 63454) @@ -9110,7 +9110,7 @@ parser_token_value_print(struct parser_p https://github.com/ruby/ruby/blob/trunk/parse.y#L9110 break; case tBACK_REF: #ifndef RIPPER - rb_parser_printf(p, "$%c", valp->node->nd_nth); + rb_parser_printf(p, "$%c", (int)valp->node->nd_nth); #else rb_parser_printf(p, "%"PRIsVALUE, valp->val); #endif -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/