summaryrefslogtreecommitdiff
path: root/ext/syck/emitter.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/emitter.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/emitter.c')
-rw-r--r--ext/syck/emitter.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/syck/emitter.c b/ext/syck/emitter.c
index 985bfb2500..af0d7891f8 100644
--- a/ext/syck/emitter.c
+++ b/ext/syck/emitter.c
@@ -450,7 +450,7 @@ void syck_emit_tag( SyckEmitter *e, const char *tag, const char *ignore )
/* global types */
} else if ( strncmp( tag, "tag:", 4 ) == 0 ) {
- int taglen = strlen( tag );
+ int taglen = (int)strlen( tag );
syck_emitter_write( e, "!", 1 );
if ( strncmp( tag + 4, YAML_DOMAIN, strlen( YAML_DOMAIN ) ) == 0 ) {
int skip = 4 + strlen( YAML_DOMAIN ) + 1;
@@ -662,7 +662,7 @@ void syck_emit_scalar( SyckEmitter *e, const char *tag, enum scalar_style force_
match_implicit = syck_match_implicit( str, len );
/* quote strings which default to implicits */
- implicit = syck_taguri( YAML_DOMAIN, match_implicit, strlen( match_implicit ) );
+ implicit = syck_taguri( YAML_DOMAIN, match_implicit, (int)strlen( match_implicit ) );
if ( syck_tagcmp( tag, implicit ) != 0 && syck_tagcmp( tag, "tag:yaml.org,2002:str" ) == 0 ) {
force_style = scalar_2quote;
} else {
@@ -1231,7 +1231,7 @@ syck_emitter_mark_node( SyckEmitter *e, st_data_t n )
/*
* Second time hitting this object, let's give it an anchor
*/
- idx = e->anchors->num_entries + 1;
+ idx = (int)(e->anchors->num_entries + 1);
anchor_name = S_ALLOC_N( char, strlen( anc ) + 10 );
S_MEMZERO( anchor_name, char, strlen( anc ) + 10 );
sprintf( anchor_name, anc, idx );