From 4d60684b079a2b389b1fa9ab3bea97463da9f618 Mon Sep 17 00:00:00 2001 From: Christopher Arndt Date: Tue, 28 May 2024 15:48:39 +0200 Subject: [PATCH] Turn atomSequenceClear into a template Signed-off-by: Christopher Arndt --- src/nymph/atom/util.nim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/nymph/atom/util.nim b/src/nymph/atom/util.nim index bd6743c..b360e8a 100644 --- a/src/nymph/atom/util.nim +++ b/src/nymph/atom/util.nim @@ -99,7 +99,7 @@ template atomSequenceIsEmpty*(seq: ptr AtomSequence): bool = ## ## This simply resets the size field, the other fields are left untouched. ## -proc atomSequenceClear*(seq: ptr AtomSequence) {.inline.} = +template atomSequenceClear*(seq: ptr AtomSequence) = seq.atom.size = sizeof(AtomSequenceBody).uint32 ## @@ -111,7 +111,7 @@ proc atomSequenceClear*(seq: ptr AtomSequence) {.inline.} = ## @param event Event to write. ## ## @return A pointer to the newly written event in `seq`, -## or NULL on failure (insufficient space). +## or nil on failure (insufficient space). ## proc atomSequenceAppendEvent*(seq: ptr AtomSequence; capacity: uint32; event: ptr AtomEvent): ptr AtomEvent {.inline.} =