From 2f0faf671dcf8eadebdd0e35a567ddb8bd95bcaa Mon Sep 17 00:00:00 2001 From: matz Date: Mon, 29 Jan 2001 05:10:42 +0000 Subject: * string.c (str_independent): should not clear str->orig here. it's too early. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1153 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- parse.y | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) (limited to 'parse.y') diff --git a/parse.y b/parse.y index 5dbb59c388..6603f51a62 100644 --- a/parse.y +++ b/parse.y @@ -6,7 +6,7 @@ $Date$ created at: Fri May 28 18:02:42 JST 1993 - Copyright (C) 1993-2000 Yukihiro Matsumoto + Copyright (C) 1993-2001 Yukihiro Matsumoto **********************************************************************/ @@ -56,8 +56,16 @@ static enum lex_state { EXPR_CLASS, /* immediate after `class', no here document. */ } lex_state; +#if SIZEOF_LONG_LONG > 0 +typedef unsigned long long stack_type; +#elif SIZEOF___INT64 > 0 +typedef unsigned __int64 stack_type; +#else +typedef unsigned long stack_type; +#endif + static int cond_nest = 0; -static unsigned long cond_stack = 0; +static stack_type cond_stack = 0; #define COND_PUSH do {\ cond_nest++;\ cond_stack = (cond_stack<<1)|1;\ @@ -68,17 +76,14 @@ static unsigned long cond_stack = 0; } while (0) #define COND_P() (cond_nest > 0 && (cond_stack&1)) -static int cmdarg_nest = 0; -static unsigned long cmdarg_stack = 0; +static stack_type cmdarg_stack = 0; #define CMDARG_PUSH do {\ - cmdarg_nest++;\ cmdarg_stack = (cmdarg_stack<<1)|1;\ } while(0) #define CMDARG_POP do {\ - cmdarg_nest--;\ cmdarg_stack >>= 1;\ } while (0) -#define CMDARG_P() (cmdarg_nest > 0 && (cmdarg_stack&1)) +#define CMDARG_P() (cmdarg_stack && (cmdarg_stack&1)) static int class_nest = 0; static int in_single = 0; -- cgit v1.2.3