[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnunet-scheme] 127/324: netstruct: Recurse in ‘part’; allow fields with
From: |
gnunet |
Subject: |
[gnunet-scheme] 127/324: netstruct: Recurse in ‘part’; allow fields within fields. |
Date: |
Tue, 21 Sep 2021 13:22:47 +0200 |
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 8d36116cb7275314cf27c0c2a886e00807d51dea
Author: Maxime Devos <maximedevos@telenet.be>
AuthorDate: Sat May 29 23:02:33 2021 +0200
netstruct: Recurse in ‘part’; allow fields within fields.
Tests will be added later.
* gnu/gnunet/netstruct/procedural.scm
(part): Recurse if there are more fields.
---
gnu/gnunet/netstruct/procedural.scm | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/gnu/gnunet/netstruct/procedural.scm
b/gnu/gnunet/netstruct/procedural.scm
index ae6290a..4842ca3 100644
--- a/gnu/gnunet/netstruct/procedural.scm
+++ b/gnu/gnunet/netstruct/procedural.scm
@@ -186,7 +186,8 @@ The size in bytes is specified by @var{size}, a positive
and exact integer."
(define (part ns fields)
"What is the network structure of the field @var{fields} in the
-network structure @var{ns}?"
+network structure @var{ns}? @var{fields} is a list structure
+like @code{(some-field an-array-index other-field)}."
(assert (netstruct? ns))
(if (null? fields)
ns
@@ -194,7 +195,7 @@ network structure @var{ns}?"
(fields* (cdr fields))
(~part (~part (netstruct-vtable ns))))
(unless ~part (no-fields 'part))
- (~part ns field))))
+ (part (~part ns field) fields*))))
(define (%select-length-cond expected-length found-length)
(condition (make-bad-slice-length expected-length found-length)
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [gnunet-scheme] 120/324: netstruct syntactic: Fix error when field is constant., (continued)
- [gnunet-scheme] 120/324: netstruct syntactic: Fix error when field is constant., gnunet, 2021/09/21
- [gnunet-scheme] 121/324: netstruct: Correct argument order to slice-uN-set!., gnunet, 2021/09/21
- [gnunet-scheme] 113/324: hat-let: Avoid having to import '_' from (rnrs base)., gnunet, 2021/09/21
- [gnunet-scheme] 112/324: config: parser: Fix typo in documentation., gnunet, 2021/09/21
- [gnunet-scheme] 93/324: doc: Some tips on testing., gnunet, 2021/09/21
- [gnunet-scheme] 104/324: config: Implement variable expansion., gnunet, 2021/09/21
- [gnunet-scheme] 129/324: netstruct: New promised tests., gnunet, 2021/09/21
- [gnunet-scheme] 99/324: config: Parse configuration lines into one of several types., gnunet, 2021/09/21
- [gnunet-scheme] 115/324: hat-let: Drop incorrect copyright notices., gnunet, 2021/09/21
- [gnunet-scheme] 125/324: netstruct: Only select the relevant part for writing., gnunet, 2021/09/21
- [gnunet-scheme] 127/324: netstruct: Recurse in ‘part’; allow fields within fields.,
gnunet <=
- [gnunet-scheme] 109/324: doc: Update ROADMAP.org., gnunet, 2021/09/21
- [gnunet-scheme] 134/324: mq: Clarify how a message handlers are chosen., gnunet, 2021/09/21
- [gnunet-scheme] 135/324: mq: Fix typo in docstring of inject-message!., gnunet, 2021/09/21
- [gnunet-scheme] 136/324: mq: Verify message size during message injection., gnunet, 2021/09/21
- [gnunet-scheme] 92/324: guix: Add guile-quickcheck dependency., gnunet, 2021/09/21
- [gnunet-scheme] 138/324: mq: Fix &who for &overly-full-queue-warning., gnunet, 2021/09/21
- [gnunet-scheme] 142/324: mq: Implement envelope cancellation callback., gnunet, 2021/09/21
- [gnunet-scheme] 111/324: config: parser: Remove fixed TODO., gnunet, 2021/09/21
- [gnunet-scheme] 114/324: config: parser: More TODOs about the configuration format., gnunet, 2021/09/21
- [gnunet-scheme] 119/324: netstruct: Correct size of u8., gnunet, 2021/09/21