From f2980e3e2050f21273bfc8412e83adef5f75b1f0 Mon Sep 17 00:00:00 2001 From: nobu Date: Mon, 2 Jun 2014 20:23:47 +0000 Subject: encoding.h: constify rb_encoding * include/ruby/encoding.h: constify `rb_encoding` itself, not only arguments. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46322 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- parse.y | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'parse.y') diff --git a/parse.y b/parse.y index 7ecf367ba3..580088eeab 100644 --- a/parse.y +++ b/parse.y @@ -304,7 +304,7 @@ struct parser_params { #ifdef RIPPER #define intern_cstr_without_pindown(n,l,en) rb_intern3(n,l,en) #else -static ID intern_cstr_without_pindown(const char *, long, const rb_encoding *); +static ID intern_cstr_without_pindown(const char *, long, rb_encoding *); #endif #define STR_NEW(p,n) rb_enc_str_new((p),(n),current_enc) @@ -675,7 +675,7 @@ static void ripper_compile_error(struct parser_params*, const char *fmt, ...); #else # define rb_compile_error rb_compile_error_with_enc # define compile_error parser->nerr++,rb_compile_error_with_enc -# define PARSER_ARG ruby_sourcefile, ruby_sourceline, current_enc, +# define PARSER_ARG ruby_sourcefile, ruby_sourceline, (void *)current_enc, #endif /* Older versions of Yacc set YYMAXDEPTH to a very low value by default (150, @@ -10258,7 +10258,7 @@ id_type(ID id) #ifndef RIPPER static int -is_special_global_name(const char *m, const char *e, const rb_encoding *enc) +is_special_global_name(const char *m, const char *e, rb_encoding *enc) { int mb = 0; @@ -10290,7 +10290,7 @@ rb_symname_p(const char *name) } int -rb_enc_symname_p(const char *name, const rb_encoding *enc) +rb_enc_symname_p(const char *name, rb_encoding *enc) { return rb_enc_symname2_p(name, strlen(name), enc); } @@ -10299,7 +10299,7 @@ rb_enc_symname_p(const char *name, const rb_encoding *enc) #define IDSET_ATTRSET_FOR_INTERN (~(~0U<<(1<