summaryrefslogtreecommitdiff
path: root/parse.y
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-01-29 05:10:42 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-01-29 05:10:42 +0000
commit2f0faf671dcf8eadebdd0e35a567ddb8bd95bcaa (patch)
tree8546241dd9e946b44ace45e8eef03cf479090ed1 /parse.y
parent161e3313d20eb285c8cfc3288e92a6d2e533cf44 (diff)
* 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
Diffstat (limited to 'parse.y')
-rw-r--r--parse.y19
1 files changed, 12 insertions, 7 deletions
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;