1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* ext/syck/handler.c: add proper casts.

* ext/syck/syck.c: ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3787 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
eban 2003-05-13 11:41:19 +00:00
parent e4ada45df1
commit 43b1770ed6
3 changed files with 10 additions and 6 deletions

View file

@ -5,6 +5,10 @@ Tue May 13 20:31:58 2003 WATANABE Hirofumi <eban@ruby-lang.org>
* configure.in: add '-D_USE_CRTIMP' to XCFLAGS on MinGW. * configure.in: add '-D_USE_CRTIMP' to XCFLAGS on MinGW.
* ext/syck/handler.c: add proper casts.
* ext/syck/syck.c: ditto.
Tue May 13 17:58:08 2003 NAKAMURA Usaku <usa@ruby-lang.org> Tue May 13 17:58:08 2003 NAKAMURA Usaku <usa@ruby-lang.org>
* configure.in, bcc32/Makefile.sub, win32/Makefile.sub: define * configure.in, bcc32/Makefile.sub, win32/Makefile.sub: define

View file

@ -30,7 +30,7 @@ SyckNode *
syck_hdlr_add_anchor( SyckParser *p, char *a, SyckNode *n ) syck_hdlr_add_anchor( SyckParser *p, char *a, SyckNode *n )
{ {
n->anchor = a; n->anchor = a;
st_insert( p->anchors, a, n ); st_insert( p->anchors, (st_data_t)a, (st_data_t)n );
return n; return n;
} }
@ -39,7 +39,7 @@ syck_hdlr_add_alias( SyckParser *p, char *a )
{ {
SyckNode *n; SyckNode *n;
if ( st_lookup( p->anchors, a, &n ) ) if ( st_lookup( p->anchors, (st_data_t)a, &n ) )
{ {
return n; return n;
} }

View file

@ -166,7 +166,7 @@ syck_add_sym( SyckParser *p, char *data )
p->syms = st_init_numtable(); p->syms = st_init_numtable();
} }
id = p->syms->num_entries; id = p->syms->num_entries;
st_insert( p->syms, id, data ); st_insert( p->syms, id, (st_data_t)data );
return id; return id;
} }
@ -174,10 +174,10 @@ int
syck_lookup_sym( SyckParser *p, SYMID id, char **data ) syck_lookup_sym( SyckParser *p, SYMID id, char **data )
{ {
if ( p->syms == NULL ) return 0; if ( p->syms == NULL ) return 0;
return st_lookup( p->syms, id, data ); return st_lookup( p->syms, id, (st_data_t *)data );
} }
enum st_retval int
syck_st_free_nodes( char *key, SyckNode *n, char *arg ) syck_st_free_nodes( char *key, SyckNode *n, char *arg )
{ {
syck_free_node( n ); syck_free_node( n );
@ -201,7 +201,7 @@ syck_free_parser( SyckParser *p )
// //
// Free the anchor table // Free the anchor table
// //
st_foreach( p->anchors, syck_st_free_nodes, NULL ); st_foreach( p->anchors, syck_st_free_nodes, 0 );
st_free_table( p->anchors ); st_free_table( p->anchors );
// //