From 704c8710c5f69ffa92280161487268435e387da8 Mon Sep 17 00:00:00 2001 From: Joshua Suskalo Date: Thu, 23 Sep 2021 14:25:24 -0500 Subject: [PATCH] Fix docstring of freset! and fswap! --- src/clj/coffi/ffi.clj | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/clj/coffi/ffi.clj b/src/clj/coffi/ffi.clj index 07cd733..7184530 100644 --- a/src/clj/coffi/ffi.clj +++ b/src/clj/coffi/ffi.clj @@ -966,7 +966,7 @@ (apply swap! meta f args))) (defn freset! - "Sets the value of `static-var`" + "Sets the value of `static-var` to `newval`, running it through [[serialize]]." [^StaticVariable static-var newval] (serialize-into newval (.-type static-var) @@ -975,6 +975,10 @@ newval) (defn fswap! + "Non-atomically runs the function `f` over the value stored in `static-var`. + + The value is deserialized before passing it to `f`, and serialized before + putting the value into `static-var`." [static-var f & args] (freset! static-var (apply f @static-var args)))