[#38]: Distinguish between BigInt/BigInteger on thawing (mlacorte)
This commit is contained in:
parent
17c8161816
commit
e2847f348f
2 changed files with 9 additions and 3 deletions
|
|
@ -1,3 +1,7 @@
|
|||
## Pending
|
||||
* Now distinguish between `BigInteger` and `BigInt` on thawing (previously both thawed to `BigInt`s). (mlacorte).
|
||||
|
||||
|
||||
## v2.6.0-alpha2 / 2014-Jan-23
|
||||
|
||||
**WARNING**: This is an **EXPERIMENTAL early testing release** and **unsuitable for use in production**. Welcoming feedback on any issues, etc.!
|
||||
|
|
|
|||
|
|
@ -68,6 +68,7 @@
|
|||
(def ^:const id-integer (int 42))
|
||||
(def ^:const id-long (int 43))
|
||||
(def ^:const id-bigint (int 44))
|
||||
(def ^:const id-biginteger (int 45))
|
||||
|
||||
(def ^:const id-float (int 60))
|
||||
(def ^:const id-double (int 61))
|
||||
|
|
@ -247,7 +248,7 @@
|
|||
;;
|
||||
|
||||
(freezer BigInt id-bigint (write-biginteger out (.toBigInteger x)))
|
||||
(freezer BigInteger id-bigint (write-biginteger out x))
|
||||
(freezer BigInteger id-biginteger (write-biginteger out x))
|
||||
|
||||
(freezer Float id-float (.writeFloat out x))
|
||||
(freezer Double id-double (.writeDouble out x))
|
||||
|
|
@ -424,6 +425,7 @@
|
|||
;; id-compact-long (read-compact-long in)
|
||||
|
||||
id-bigint (bigint (read-biginteger in))
|
||||
id-biginteger (read-biginteger in)
|
||||
|
||||
id-float (.readFloat in)
|
||||
id-double (.readDouble in)
|
||||
|
|
|
|||
Loading…
Reference in a new issue