From 7ce536423a4b742e1be3000c9dc1e0dc0a48304b Mon Sep 17 00:00:00 2001 From: jangko Date: Tue, 13 Jun 2023 08:14:52 +0700 Subject: [PATCH] disable dot borrow temporary --- stint/private/datatypes.nim | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/stint/private/datatypes.nim b/stint/private/datatypes.nim index 47bbf23..569245c 100644 --- a/stint/private/datatypes.nim +++ b/stint/private/datatypes.nim @@ -37,19 +37,16 @@ type limbs*: array[bits.wordsRequired, Word] # Limbs-Endianess is little-endian -when (NimMajor, NimMinor) < (1,9): - type - StInt*[bits: static[int]] = object - ## Stack-based integer - ## Signed - limbs*: array[bits.wordsRequired, Word] -else: - type - StInt*[bits: static[int]] {.borrow: `.`.} = distinct StUint[bits] - ## Stack-based integer - ## Signed + StInt*[bits: static[int]] = object + ## Stack-based integer + ## Signed + limbs*: array[bits.wordsRequired, Word] + + # {.borrow: `.`.} only works with nim-devel + # StInt*[bits: static[int]] {.borrow: `.`.} = distinct StUint[bits] + ## Stack-based integer + ## Signed -type Carry* = uint8 # distinct range[0'u8 .. 1] Borrow* = uint8 # distinct range[0'u8 .. 1]