Skip to content

Commit

Permalink
compile: do not use true and false C constants.
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
privat committed May 30, 2012
1 parent 0cf5f0e commit 59d1a90
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/compiling/compiling_icode.nit
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 59d1a90

Please sign in to comment.