This commit is contained in:
flywind 2021-09-20 15:50:20 +08:00 • committed by GitHub
commit ee9795f76f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 25 additions and 5 deletions

View file

@ -288,10 +288,10 @@ else:
type
# Atomic* {.importcpp: "_Atomic('0)".} [T] = object
AtomicInt8 {.importc: "_Atomic NI8", size: 1.} = object
AtomicInt16 {.importc: "_Atomic NI16", size: 2.} = object
AtomicInt32 {.importc: "_Atomic NI32", size: 4.} = object
AtomicInt64 {.importc: "_Atomic NI64", size: 8.} = object
AtomicInt8 {.importc: "_Atomic NI8".} = int8
AtomicInt16 {.importc: "_Atomic NI16".} = int16
AtomicInt32 {.importc: "_Atomic NI32".} = int32
AtomicInt64 {.importc: "_Atomic NI64".} = int64
template atomicType*(T: typedesc[Trivial]): untyped =
# Maps the size of a trivial type to it's internal atomic type