~ chicken-core (chicken-5) 8e664d245cf4ff3bb6492578248263f2fdb9a1e2
commit 8e664d245cf4ff3bb6492578248263f2fdb9a1e2
Author: Peter Bex <peter@more-magic.net>
AuthorDate: Sun Aug 7 20:25:46 2016 +0200
Commit: Peter Bex <peter@more-magic.net>
CommitDate: Sun Aug 7 20:25:46 2016 +0200
Use abstract C_SIZEOF_BIGNUM_WRAPPER instead of concrete C_SIZEOF_STRUCTURE(2)
If we decide to tweak the bignum wrapper, this won't break.
diff --git a/runtime.c b/runtime.c
index 1dc4e3c7..1e31eb97 100644
--- a/runtime.c
+++ b/runtime.c
@@ -10295,7 +10295,7 @@ void C_ccall allocate_vector_2(C_word c, C_word *av)
static C_word allocate_tmp_bignum(C_word size, C_word negp, C_word initp)
{
C_word *mem = C_malloc(C_wordstobytes(C_SIZEOF_BIGNUM(C_unfix(size)))),
- bigvec = (C_word)(mem + C_SIZEOF_STRUCTURE(2));
+ bigvec = (C_word)(mem + C_SIZEOF_BIGNUM_WRAPPER);
if (mem == NULL) abort(); /* TODO: panic */
C_block_header_init(bigvec, C_STRING_TYPE | C_wordstobytes(C_unfix(size)+1));
Trap