summaryrefslogtreecommitdiff
path: root/ext/racc/cparse
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-03-11 22:17:20 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-03-11 22:17:20 +0000
commitd6191738bce48d9a7cee17f7033a2d1a8568ca73 (patch)
tree9589426825c2ec70523b842501cbae14a3b0c303 /ext/racc/cparse
parent1dcf1174ea2a803e6905a04760121fe1426035b3 (diff)
* 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/racc/cparse')
-rw-r--r--ext/racc/cparse/cparse.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/ext/racc/cparse/cparse.c b/ext/racc/cparse/cparse.c
index d085158..77d2d86 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) {