gnunet-svn
[Top][All Lists]
Advanced

[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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]