From 519a7f75107657176b2713faec17a548bae6dabc Mon Sep 17 00:00:00 2001 From: Stefano Sanfilippo Date: Sun, 8 Mar 2015 12:29:13 +0100 Subject: [PATCH] Use Type::CHAR instead of Type::BOOL for stdlib functions. This is because C has no int1 type. --- RuntimePrototypes.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/RuntimePrototypes.hpp b/RuntimePrototypes.hpp index 6da0ad7..af09c33 100644 --- a/RuntimePrototypes.hpp +++ b/RuntimePrototypes.hpp @@ -64,12 +64,12 @@ static const std::string ENTRYPOINT_NAME = "__Monicelli_main"; static const std::map> STANDARD_MODULES = { {"iostream", { - PUT(Type::BOOL, __Monicelli_putBool), + PUT(Type::CHAR, __Monicelli_putBool), PUT(Type::CHAR, __Monicelli_putChar), PUT(Type::FLOAT, __Monicelli_putFloat), PUT(Type::DOUBLE, __Monicelli_putDouble), PUT(Type::INT, __Monicelli_putInt), - GET(Type::BOOL, __Monicelli_getBool), + GET(Type::CHAR, __Monicelli_getBool), GET(Type::CHAR, __Monicelli_getChar), GET(Type::FLOAT, __Monicelli_getFloat), GET(Type::DOUBLE, __Monicelli_getDouble), @@ -78,7 +78,7 @@ static const std::map> STANDA {"cassert", { new FunctionPrototype { new Id("__Monicelli_assert"), Type::VOID, new PointerList { - new FunArg {new Id("condition"), Type::BOOL, false} + new FunArg {new Id("condition"), Type::CHAR, false} }, }}}, {"cstdlib", { new FunctionPrototype {