diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2023-03-08 17:39:33 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2023-03-08 20:07:46 +0900 |
commit | bead4bce3b4544cb61b3c05c11204a377e20cdfa (patch) | |
tree | 1aaaa8de123a4528581d76669aafe618632beaa4 /tool | |
parent | 116320402109c9b6de66bc71ed02ef4d12c38dc0 (diff) |
Constify local static variables in yyparse
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/7477
Diffstat (limited to 'tool')
-rwxr-xr-x | tool/ytab.sed | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tool/ytab.sed b/tool/ytab.sed index 95a9b3e1eb..70951b780d 100755 --- a/tool/ytab.sed +++ b/tool/ytab.sed @@ -75,6 +75,8 @@ s/\( YYFPRINTF *(\)yyo,/\1p,/ s/\( YYFPRINTF *(\)stderr,/\1p,/ s/\( YYDPRINTF *((\)stderr,/\1p,/ s/^\([ ]*\)\(yyerror[ ]*([ ]*parser,\)/\1parser_\2/ +s/\(static\)\( YYSTYPE yyval_default\)/\1 const\2/ +s/\(static\)\( YYLTYPE yyloc_default\)/\1 const\2/ s!^ *extern char \*getenv();!/* & */! s/^\(#.*\)".*\.tab\.c"/\1"parse.c"/ /^\(#.*\)".*\.y"/s:\\\\:/:g |