summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cgen.c2
-rw-r--r--eval.c2
-rw-r--r--types.h2
3 files changed, 4 insertions, 2 deletions
diff --git a/cgen.c b/cgen.c
index 27cf651..31d9467 100644
--- a/cgen.c
+++ b/cgen.c
@@ -721,7 +721,7 @@ static bool cgen_set_tuple(CGenerator *g, Expression *exprs, Identifier *idents,
else if (exprs)
e = &exprs[i];
else {
- snprintf(buf, sizeof buf, "(%s%lu_)", prefix, i);
+ snprintf(buf, sizeof buf, "(%s%lu_)", prefix, (unsigned long)i);
s = buf;
}
if (!cgen_set(g, e, s, &to->tuple[i], NULL)) return false;
diff --git a/eval.c b/eval.c
index 850984e..d5603f5 100644
--- a/eval.c
+++ b/eval.c
@@ -12,7 +12,7 @@ static bool eval_expr(Evaluator *ev, Expression *e, Value *v);
static Value get_builtin_val(BuiltinVal val);
static void evalr_create(Evaluator *ev, Typer *tr, Allocator *allocr) {
- ev->returning = NULL;
+ ev->returning = false;
ev->typer = tr;
ev->enabled = true;
ev->allocr = allocr;
diff --git a/types.h b/types.h
index 04b6dea..f8a0716 100644
--- a/types.h
+++ b/types.h
@@ -60,6 +60,8 @@ typedef uint64_t U64;
#elif defined __cplusplus
#else
typedef U8 bool;
+#define false ((bool)0)
+#define true ((bool)1)
#endif