Managing bigint memory

This commit is contained in:
Krzosa Karol
2022-06-06 16:49:41 +02:00
parent 06d6ec7525
commit dc56bd54f3
6 changed files with 165 additions and 62 deletions

View File

@@ -319,7 +319,7 @@ function Ast_Atom *
ast_int(Token *pos, BigInt val){
AST_NEW(Atom, VALUE, pos, AST_EXPR | AST_ATOM);
result->type = untyped_int;
bigint_init_bigint(&result->big_int_val, &val);
result->big_int_val = bigint_copy(pctx->perm, &val);
return result;
}