]> gitweb.factorcode.org Git - factor.git/commitdiff
VM: change the BIGNUM_TO_POINTER macro so that it automatically sees through tagged...
authorBjörn Lindqvist <bjourne@gmail.com>
Mon, 16 Jun 2014 21:57:38 +0000 (23:57 +0200)
committerJohn Benediktsson <mrjbq7@gmail.com>
Tue, 18 Nov 2014 01:27:34 +0000 (17:27 -0800)
vm/bignumint.hpp

index e81809b4a71e0676626b72084db0b36bd0ff3944..9c5640d5a5fcc5c2e12ae43adb0575bf38ff85c5 100644 (file)
@@ -56,7 +56,7 @@ typedef int64_t bignum_twodigit_type;
 #endif
 
 /* BIGNUM_TO_POINTER casts a bignum object to a digit array pointer. */
-#define BIGNUM_TO_POINTER(bignum) ((bignum_digit_type*)(bignum + 1))
+#define BIGNUM_TO_POINTER(bignum) ((bignum_digit_type*)(bignum->data()))
 
 /* BIGNUM_EXCEPTION is invoked to handle assertion violations. */
 #define BIGNUM_EXCEPTION abort