summaryrefslogtreecommitdiff
path: root/parse.y
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-05-27 14:00:40 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-05-27 14:00:40 +0000
commit51bf0388aa1b9cf86af556104917a6a544152cf8 (patch)
tree4eb34344b032ce975e0ed93db262f16e32b1cd04 /parse.y
parent6fc35dffb41b37c25450b796407112a955fe70c9 (diff)
* parse.y (struct parser_params): lex_gets_ptr should be long.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23593 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'parse.y')
-rw-r--r--parse.y21
1 files changed, 8 insertions, 13 deletions
diff --git a/parse.y b/parse.y
index c72e58b19a..636f51f5e9 100644
--- a/parse.y
+++ b/parse.y
@@ -221,7 +221,7 @@ struct parser_params {
int parser_heredoc_end;
int parser_command_start;
NODE *parser_deferred_nodes;
- int parser_lex_gets_ptr;
+ long parser_lex_gets_ptr;
VALUE (*parser_lex_gets)(struct parser_params*,VALUE);
struct local_vars *parser_lvtbl;
int parser_ruby__end__seen;
@@ -5347,7 +5347,7 @@ parser_tokadd_utf8(struct parser_params *parser, rb_encoding **encp,
}
lex_p += numlen;
if (regexp_literal) {
- tokcopy(numlen);
+ tokcopy((int)numlen);
}
else if (codepoint >= 0x80) {
*encp = UTF8_ENC();
@@ -5504,6 +5504,7 @@ parser_tokadd_escape(struct parser_params *parser, rb_encoding **encp)
{
int c;
int flags = 0;
+ size_t numlen;
first:
switch (c = nextc()) {
@@ -5514,25 +5515,19 @@ parser_tokadd_escape(struct parser_params *parser, rb_encoding **encp)
case '4': case '5': case '6': case '7':
if (flags & (ESCAPE_CONTROL|ESCAPE_META)) goto eof;
{
- size_t numlen;
- int oct;
-
- oct = scan_oct(--lex_p, 3, &numlen);
+ scan_oct(--lex_p, 3, &numlen);
if (numlen == 0) goto eof;
lex_p += numlen;
- tokcopy(numlen + 1);
+ tokcopy((int)numlen + 1);
}
return 0;
case 'x': /* hex constant */
if (flags & (ESCAPE_CONTROL|ESCAPE_META)) goto eof;
{
- size_t numlen;
- int hex;
-
- hex = tok_hex(&numlen);
+ tok_hex(&numlen);
if (numlen == 0) goto eof;
- tokcopy(numlen + 2);
+ tokcopy((int)numlen + 2);
}
return 0;
@@ -5647,7 +5642,7 @@ parser_tokadd_string(struct parser_params *parser,
static const char mixed_msg[] = "%s mixed within %s source";
#define mixed_error(enc1, enc2) if (!errbuf) { \
- int len = sizeof(mixed_msg) - 4; \
+ size_t len = sizeof(mixed_msg) - 4; \
len += strlen(rb_enc_name(enc1)); \
len += strlen(rb_enc_name(enc2)); \
errbuf = ALLOCA_N(char, len); \