From 59d1a90f99ac571b35f48c7629d23c9bf50297ae Mon Sep 17 00:00:00 2001 From: Jean Privat Date: Wed, 30 May 2012 07:26:31 -0400 Subject: [PATCH] compile: do not use true and false C constants. It simplifies generated code and will allow latter to drop the bool type in nit_common.h Defining "bool", "true", and "false" can cause collision with some C libraries (and is not compatible with C++ for those that care). Signed-off-by: Jean Privat --- src/compiling/compiling_icode.nit | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiling/compiling_icode.nit b/src/compiling/compiling_icode.nit index 1c084db520..26c8f43e24 100644 --- a/src/compiling/compiling_icode.nit +++ b/src/compiling/compiling_icode.nit @@ -926,7 +926,7 @@ redef class IBoolValue v.add_location(location) var w = new_result(v) w.add("TAG_Bool(") - if value then w.add("true") else w.add("false") + if value then w.add("1") else w.add("0") w.add(")") end end