diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-03-11 22:17:20 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-03-11 22:17:20 +0000 |
commit | d6191738bce48d9a7cee17f7033a2d1a8568ca73 (patch) | |
tree | 9589426825c2ec70523b842501cbae14a3b0c303 /ext | |
parent | 1dcf1174ea2a803e6905a04760121fe1426035b3 (diff) | |
download | ruby-d6191738bce48d9a7cee17f7033a2d1a8568ca73.tar.gz |
* ext/racc/cparse/cparse.c: suppressed warnings for shortening on
platforms where pointer is bigger than int.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26882 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-rw-r--r-- | ext/racc/cparse/cparse.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/ext/racc/cparse/cparse.c b/ext/racc/cparse/cparse.c index d085158f11..77d2d86fa0 100644 --- a/ext/racc/cparse/cparse.c +++ b/ext/racc/cparse/cparse.c @@ -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 @@ racc_cparse(VALUE parser, VALUE arg, VALUE sysdebug) 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 @@ racc_yyparse(VALUE parser, VALUE lexer, VALUE lexmid, VALUE arg, VALUE sysdebug) 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 @@ initialize_params(VALUE vparams, VALUE parser, VALUE arg, VALUE lexer, VALUE lex 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 @@ initialize_params(VALUE vparams, VALUE parser, VALUE arg, VALUE lexer, VALUE lex 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) { |