[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnunet-scheme] 07/07: dht/client: Use #:constructor-keyword-arguments i
From: |
gnunet |
Subject: |
[gnunet-scheme] 07/07: dht/client: Use #:constructor-keyword-arguments instead of wrapping. |
Date: |
Sat, 04 Mar 2023 02:27:02 +0100 |
This is an automated email from the git hooks/post-receive script.
maxime-devos pushed a commit to branch master
in repository gnunet-scheme.
commit c0951e2048da99976494205b1d0c8f65e44e71e3
Author: Maxime Devos <maximedevos@telenet.be>
AuthorDate: Sat Mar 4 02:25:14 2023 +0100
dht/client: Use #:constructor-keyword-arguments instead of wrapping.
Finally, the promised commit. Equivalent behaviour, but less
boilerplate, as it is called.
* gnu/gnunet/dht/client.scm
(<insertion>)[%make-insertion,%make-insertion/share]:
Remove constructor in favour of a direct make-insertion /
make-insertion/share by using #:constructor-keyword-arguments.
---
gnu/gnunet/dht/client.scm | 25 +++++++++++--------------
1 file changed, 11 insertions(+), 14 deletions(-)
diff --git a/gnu/gnunet/dht/client.scm b/gnu/gnunet/dht/client.scm
index 3874c32..789dc97 100644
--- a/gnu/gnunet/dht/client.scm
+++ b/gnu/gnunet/dht/client.scm
@@ -271,8 +271,17 @@ the constructor."
#:copy (copy-insertion
"Make a copy of the insertion, such that modifications to the
slices in the old insertion do not impact the new insertion.")
- #:constructor/copy %make-insertion
- #:constructor %make-insertion/share
+ #:constructor/copy make-insertion
+ #:constructor (make-insertion/share
+ "Make an insertion object for inserting the datum
@var{datum},
+desiring a replication level @var{desired-replication-level} (see ??).
+
+Insertions are cisw (?) ojects and as such the procedures
+@code{insertion->datum}, @code{insertion-desired-replication-level},
+@code{insertion?}, @code{make-insertion}, @code{make-insertion/share}
+and @code{insertion=?} have the usual semantics.")
+ ;; TODO defaults
+ #:constructor-keyword-arguments (datum #:key (desired-replication-level
3))
#:equality insertion=?
#:field (datum #:copy copy-datum
#:equality datum=?
@@ -284,18 +293,6 @@ slices in the old insertion do not impact the new
insertion.")
#:getter insertion-desired-replication-level
#:preprocess bound-replication-level))
- (define* (make-insertion datum #:key (desired-replication-level 3)) ; TODO
defaults
- "Make an insertion object for inserting the datum @var{datum},
-desiring a replication level @var{desired-replication-level} (see ??).
-
-Insertions are cisw (?) ojects and as such the procedures
-@code{insertion->datum}, @code{insertion-desired-replication-level},
-@code{insertion?}, @code{make-insertion}, @code{make-insertion/share}
-and @code{insertion=?} have the usual semantics."
- (%make-insertion datum desired-replication-level))
- (define* (make-insertion/share datum #:key (desired-replication-level 3))
- (%make-insertion/share datum desired-replication-level))
-
(define-record-type (<query> make-query query?)
(fields (immutable type query-type)
(immutable key query-key)
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [gnunet-scheme] branch master updated (785d738 -> c0951e2), gnunet, 2023/03/03
- [gnunet-scheme] 04/07: records: Correct calling convention for constructor., gnunet, 2023/03/03
- [gnunet-scheme] 03/07: records: Use default values correctly., gnunet, 2023/03/03
- [gnunet-scheme] 02/07: records: Check for keywords correctly., gnunet, 2023/03/03
- [gnunet-scheme] 01/07: records: Fix let-binding syntax in lambda*/define*., gnunet, 2023/03/03
- [gnunet-scheme] 07/07: dht/client: Use #:constructor-keyword-arguments instead of wrapping.,
gnunet <=
- [gnunet-scheme] 05/07: dht/client: Fix typo in <insertion> field name., gnunet, 2023/03/03
- [gnunet-scheme] 06/07: records: Correct constructor->constructor*., gnunet, 2023/03/03