klisp

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

commit 6c7356bf04eee04c5532eb08dad1e57940ba5f8b
parent 9a6ffd53a5388564e4bc5d5e7b72ff8d17067104
Author: Andres Navarro <canavarro82@gmail.com>
Date:   Mon, 23 Apr 2012 19:51:47 -0300

bugfix: GC roots in kbigint_copy (found out by Oto Havle).

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; }