diff options
author | Leo Tenenbaum <pommicket@gmail.com> | 2020-02-25 20:02:28 -0500 |
---|---|---|
committer | Leo Tenenbaum <pommicket@gmail.com> | 2020-02-25 20:02:28 -0500 |
commit | b1c2b4bcabfd3ff01921e2601d41a33b40ec1f3b (patch) | |
tree | de2c1054c369fb71e4f7e0dbc7141607e63a91ef | |
parent | a30ad2609d09002c3de7494029016c963d26bd48 (diff) |
cleaned up a few things so that msvc build still works
-rw-r--r-- | cgen.c | 2 | ||||
-rw-r--r-- | eval.c | 2 | ||||
-rw-r--r-- | types.h | 2 |
3 files changed, 4 insertions, 2 deletions
@@ -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; @@ -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; @@ -60,6 +60,8 @@ typedef uint64_t U64; #elif defined __cplusplus #else typedef U8 bool; +#define false ((bool)0) +#define true ((bool)1) #endif |