summaryrefslogtreecommitdiff
path: root/ext/syck/token.c
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-03-25 06:46:57 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-03-25 06:46:57 +0000
commit6b1cf264a80f2efe6a4b42553b8bf2e16f51690a (patch)
treede2cec1bac93bf9b8a5807f7da3a21c04756f19c /ext/syck/token.c
parente3c3733a30091958cb00bc1a2e4f0882fe6d59d6 (diff)
* ext/sdbm/_sdbm.c (sdbm_open): use size_t.
* ext/syck/bytecode.c: ditto. * ext/sdbm/_sdbm.c (delpair): use ptrdiff_t. * ext/sdbm/init.c: use RSTRING_LENINT. * ext/dl/handle.c: suppress warning: shorten-64-to-32. * ext/strscan/strscan.c: ditto. * ext/syck/emitter.c: ditto. * ext/syck/implicit.c: ditto. * ext/syck/syck.c: ditto. * ext/syck/token.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31176 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/syck/token.c')
-rw-r--r--ext/syck/token.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/ext/syck/token.c b/ext/syck/token.c
index 1521c5489de..bea79c158a7 100644
--- a/ext/syck/token.c
+++ b/ext/syck/token.c
@@ -207,7 +207,7 @@
} \
else if ( *YYLINEPTR == ' ' ) \
{ \
- ict = YYCURSOR - YYLINEPTR; \
+ ict = (int)(YYCURSOR - YYLINEPTR); \
}
/*
@@ -377,7 +377,7 @@ yy12: ++YYCURSOR;
goto yy16;
yy13:
#line 370 "token.re"
-{ doc_level = YYCURSOR - YYLINEPTR;
+{ doc_level = (int)(YYCURSOR - YYLINEPTR);
goto Header;
}
#line 384 "<stdout>"
@@ -1037,16 +1037,16 @@ yy81: ++YYCURSOR;
goto yy82;
yy82:
#line 441 "token.re"
-{ ENSURE_YAML_IOPEN(lvl, YYTOKEN - YYLINEPTR, 1);
+{ ENSURE_YAML_IOPEN(lvl, (int)(YYTOKEN - YYLINEPTR), 1);
FORCE_NEXT_TOKEN(YAML_IOPEN);
if ( *YYCURSOR == '#' || is_newline( YYCURSOR ) || is_newline( YYCURSOR - 1 ) )
{
YYCURSOR--;
- ADD_LEVEL((YYTOKEN + 1) - YYLINEPTR, syck_lvl_seq);
+ ADD_LEVEL((int)((YYTOKEN + 1) - YYLINEPTR), syck_lvl_seq);
}
else /* spaces followed by content uses the space as indentation */
{
- ADD_LEVEL(YYCURSOR - YYLINEPTR, syck_lvl_seq);
+ ADD_LEVEL((int)(YYCURSOR - YYLINEPTR), syck_lvl_seq);
}
return YYTOKEN[0];
}
@@ -2363,7 +2363,7 @@ ScalarBlock:
}
else if ( isdigit( *yyt ) )
{
- forceIndent = strtol( yyt, NULL, 10 );
+ forceIndent = rb_long2int(strtol( yyt, NULL, 10 ));
}
}