From 867677b23962a4fbd27b0dedfe5e5f5926da9457 Mon Sep 17 00:00:00 2001 From: jangko Date: Fri, 23 Jun 2023 08:42:55 +0700 Subject: [PATCH] fix type declaration for nim devel --- tests/config.nims | 1 + ttmath/ttmath.nim | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 tests/config.nims diff --git a/tests/config.nims b/tests/config.nims new file mode 100644 index 0000000..5bef1b6 --- /dev/null +++ b/tests/config.nims @@ -0,0 +1 @@ +switch("warning", "BareExcept:off") diff --git a/ttmath/ttmath.nim b/ttmath/ttmath.nim index 546d8a3..b9afbe0 100644 --- a/ttmath/ttmath.nim +++ b/ttmath/ttmath.nim @@ -11,10 +11,10 @@ when defined(windows): const TTMATH_HEADER = ttmathPath & DirSep & "headers" & DirSep & "ttmath.h" type - UInt* {.importcpp: "ttmath::UInt<'0 / 8 / sizeof(ttmath::uint)>", header: TTMATH_HEADER.} [NumBits: static[int]] = object + UInt*[NumBits: static[int]] {.importcpp: "ttmath::UInt<'0 / 8 / sizeof(ttmath::uint)>", header: TTMATH_HEADER.} = object table*: array[NumBits div 8 div sizeof(uint), uint] # TODO: This should likely be private, but it's used in nimbus... - Int* {.importcpp: "ttmath::Int<'0 / 8 / sizeof(ttmath::uint)>", header: TTMATH_HEADER.} [NumBits: static[int]] = object + Int*[NumBits: static[int]] {.importcpp: "ttmath::Int<'0 / 8 / sizeof(ttmath::uint)>", header: TTMATH_HEADER.} = object Int256* = Int[256] Int512* = Int[512]