Make the te_expr struct valid C++ code.

This commit is contained in:
Lewis Van Winkle
2016-08-22 19:06:40 -05:00
parent 860b8ff199
commit 4c1015ab7f
2 changed files with 2 additions and 2 deletions

View File

@@ -66,7 +66,7 @@ typedef struct state {
static te_expr *new_expr(const int type, const te_expr *parameters[]) {
const int arity = ARITY(type);
const int psize = sizeof(void*) * arity;
const int size = sizeof(te_expr) + psize + (IS_CLOSURE(type) ? sizeof(void*) : 0);
const int size = (sizeof(te_expr) - sizeof(void*)) + psize + (IS_CLOSURE(type) ? sizeof(void*) : 0);
te_expr *ret = malloc(size);
memset(ret, 0, size);
if (arity && parameters) {