From f26f918489e4de9455b50fa735d6d82c329459cb Mon Sep 17 00:00:00 2001 From: Smooth Operator Date: Sat, 11 Sep 2021 00:31:46 -0400 Subject: [PATCH] 2.1.0: expose serialize/deserialize macros --- frosty.nim | 4 ++-- frosty.nimble | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/frosty.nim b/frosty.nim index 10d9b60..c44e8a6 100644 --- a/frosty.nim +++ b/frosty.nim @@ -266,10 +266,10 @@ proc deserialize[T](s: var Serializer; o: var ref T) = readRefImpl(s, o) # put 'em down here so we don't accidentally bind somewhere # -macro serialize(s: var Serializer; o: typed): untyped = +macro serialize*(s: var Serializer; o: typed): untyped = perform(Write, s, o) -macro deserialize(s: var Serializer; o: var typed) = +macro deserialize*(s: var Serializer; o: var typed) = perform(Read, s, o) proc freeze*[S, T](output: S; input: T) = diff --git a/frosty.nimble b/frosty.nimble index 1c71a21..e2c7e50 100644 --- a/frosty.nimble +++ b/frosty.nimble @@ -1,4 +1,4 @@ -version = "2.0.1" +version = "2.1.0" author = "disruptek" description = "serialize native Nim types to strings, streams, or sockets" license = "MIT"