From 88bf70cb5f907c50dc1dc2d23ab1be027c0c2ff1 Mon Sep 17 00:00:00 2001 From: Jaremy Creechley Date: Wed, 13 Sep 2023 12:40:07 -0700 Subject: [PATCH] switch to tuple shared ptr --- datastore/threads/sharedptr.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/datastore/threads/sharedptr.nim b/datastore/threads/sharedptr.nim index 9ff6788..60ef070 100644 --- a/datastore/threads/sharedptr.nim +++ b/datastore/threads/sharedptr.nim @@ -77,7 +77,7 @@ template newSharedPtr*[T](val: T): SharedPtr[T] = proc newSharedPtr*[T](t: typedesc[T]): SharedPtr[T] = ## Returns a shared pointer. It is not initialized, result.container = cast[typeof(result.container)](allocShared0(sizeof(result.container[]))) - result.cnt[] = 1 + result.container.cnt = 1 echo "SharedPtr: alloc: ", result.container[].repr, " tp: ", $(typeof(T)) proc isNil*[T](p: SharedPtr[T]): bool {.inline.} =