klisp

an open source interpreter for the Kernel Programming Language.
git clone http://git.hanabi.in/repos/klisp.git
Log | Files | Refs | README

commit ce0f5b63ec8157281107b48191decbfedbd02bf1
parent df38c8145e75944906236421f8ccc01a63c44f7c
Author: Oto Havle <havleoto@gmail.com>
Date:   Sun, 22 Apr 2012 16:09:59 +0200

bugfix: GC roots in kbigint_copy (already fixed in utf branch)

Diffstat:
Msrc/kinteger.c | 2++
1 file changed, 2 insertions(+), 0 deletions(-)

diff --git a/src/kinteger.c b/src/kinteger.c @@ -42,8 +42,10 @@ TValue kbigint_new(klisp_State *K, bool sign, uint32_t digit) TValue kbigint_copy(klisp_State *K, TValue src) { TValue copy = kbigint_make_simple(K); + krooted_tvs_push(K, copy); /* arguments are in reverse order with respect to mp_int_copy */ UNUSED(mp_int_init_copy(K, tv2bigint(copy), tv2bigint(src))); + krooted_tvs_pop(K); return copy; }