ruby-changes:15007
From: nobu <ko1@a...>
Date: Fri, 12 Mar 2010 07:17:37 +0900 (JST)
Subject: [ruby-changes:15007] Ruby:r26882 (trunk): * ext/racc/cparse/cparse.c: suppressed warnings for shortening on
nobu 2010-03-12 07:17:20 +0900 (Fri, 12 Mar 2010) New Revision: 26882 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=26882 Log: * ext/racc/cparse/cparse.c: suppressed warnings for shortening on platforms where pointer is bigger than int. Modified files: trunk/ChangeLog trunk/ext/racc/cparse/cparse.c Index: ChangeLog =================================================================== --- ChangeLog (revision 26881) +++ ChangeLog (revision 26882) @@ -1,3 +1,8 @@ +Fri Mar 12 07:17:15 2010 Nobuyoshi Nakada <nobu@r...> + + * ext/racc/cparse/cparse.c: suppressed warnings for shortening on + platforms where pointer is bigger than int. + Fri Mar 12 07:15:08 2010 Nobuyoshi Nakada <nobu@r...> * ruby.c (ruby_init_loadpath_safe, ruby_init_gems): set and remove Index: ext/racc/cparse/cparse.c =================================================================== --- ext/racc/cparse/cparse.c (revision 26881) +++ ext/racc/cparse/cparse.c (revision 26882) @@ -13,6 +13,13 @@ #include "ruby/ruby.h" +#ifndef FALSE +#define FALSE 0 +#endif +#ifndef TRUE +#define TRUE 1 +#endif + /* ----------------------------------------------------------------------- Important Constants ----------------------------------------------------------------------- */ @@ -221,7 +228,7 @@ D_puts("starting cparse"); v->sys_debug = RTEST(sysdebug); vparams = initialize_params(vparams, parser, arg, Qnil, Qnil); - v->lex_is_iterator = Qfalse; + v->lex_is_iterator = FALSE; parse_main(v, Qnil, Qnil, 0); return v->retval; @@ -238,7 +245,7 @@ v->sys_debug = RTEST(sysdebug); D_puts("start C yyparse"); vparams = initialize_params(vparams, parser, arg, lexer, lexmid); - v->lex_is_iterator = Qtrue; + v->lex_is_iterator = TRUE; D_puts("params initialized"); parse_main(v, Qnil, Qnil, 0); call_lexer(v); @@ -344,7 +351,7 @@ v->use_result_var = RTEST(RARRAY_PTR(arg)[13]); } else { - v->use_result_var = Qtrue; + v->use_result_var = TRUE; } v->tstack = v->debug ? NEW_STACK() : Qnil; @@ -360,7 +367,7 @@ v->retval = Qnil; v->fin = 0; - v->lex_is_iterator = Qfalse; + v->lex_is_iterator = FALSE; rb_iv_set(parser, "@vstack", v->vstack); if (v->debug) { -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/