[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnunet-scheme] 84/324: utils: correct definition of unsigned integers
From: |
gnunet |
Subject: |
[gnunet-scheme] 84/324: utils: correct definition of unsigned integers |
Date: |
Tue, 21 Sep 2021 13:22:04 +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 a4422db6e74d2eaeff1054547ce6bf1274aa310c
Author: Maxime Devos <maximedevos@telenet.be>
AuthorDate: Sun Feb 21 10:29:24 2021 +0100
utils: correct definition of unsigned integers
* gnu/gnunet/utils/netstruct.scm
(define-unsigned-N-bytes): pass the index to slice-ref and
slice-set!, and use slice-ref and slice-set! instead of
slice-u8-ref and slice-u8-set!
(u32/big, u32/little, u64/big, u64/little): use correct slice-ref
procedure.
---
gnu/gnunet/utils/netstruct.scm | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/gnu/gnunet/utils/netstruct.scm b/gnu/gnunet/utils/netstruct.scm
index 913e064..35f317d 100644
--- a/gnu/gnunet/utils/netstruct.scm
+++ b/gnu/gnunet/utils/netstruct.scm
@@ -1,5 +1,5 @@
;; This file is part of scheme-GNUnet, a partial Scheme port of GNUnet.
-;; Copyright (C) 2020 Maxime Devos <maxime.devos@student.kuleuven.be>
+;; Copyright (C) 2020, 2021 Maxime Devos <maxime.devos@student.kuleuven.be>
;;
;; scheme-GNUnet is free software: you can redistribute it and/or modify it
;; under the terms of the GNU Affero General Public License as published
@@ -127,20 +127,20 @@
(define-syntax name-big
(unsigned-N-bytes
length
- (cute slice-u8-ref <> <> (endianness big))
- (cute slice-u8-set! <> <> (endianness big) <>)))
+ (cute slice-ref <> 0 (endianness big))
+ (cute slice-set! <> 0 (endianness big) <>)))
(define-syntax name-little
(unsigned-N-bytes
length
- (cute slice-u8-ref <> <> (endianness little))
- (cute slice-u8-set! <> <> (endianness little) <>))))
+ (cute slice-ref <> 0 (endianness little))
+ (cute slice-set! <> 0 (endianness little) <>))))
...))))
(define-syntax u8 (unsigned-N-bytes 1 slice-u8-ref slice-u8-set!))
(define-unsigned-N-bytes
((2 slice-u16-ref slice-u16-set!) (u16/big u16/little))
- ((4 slice-u32-ref slice-u64-set!) (u32/big u32/little))
- ((8 slice-u32-ref slice-u64-set!) (u64/big u64/little)))
+ ((4 slice-u32-ref slice-u32-set!) (u32/big u32/little))
+ ((8 slice-u64-ref slice-u64-set!) (u64/big u64/little)))
;; FIXME ideally field names would be symbols,
;; not strings, but I can't get this to work
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [gnunet-scheme] 67/324: scripts: Don't flatten the FS tree and use SXML instead of JSON, (continued)
- [gnunet-scheme] 67/324: scripts: Don't flatten the FS tree and use SXML instead of JSON, gnunet, 2021/09/21
- [gnunet-scheme] 66/324: Document how to use GNUnet FS without networking., gnunet, 2021/09/21
- [gnunet-scheme] 70/324: doc: Progress update in README.org, gnunet, 2021/09/21
- [gnunet-scheme] 72/324: mq: fix make-envelope/dll constructor., gnunet, 2021/09/21
- [gnunet-scheme] 65/324: download-store: prepare supporting the nar output format, gnunet, 2021/09/21
- [gnunet-scheme] 64/324: scripts: download-store: use SRFI-39 parameters for configuration, gnunet, 2021/09/21
- [gnunet-scheme] 75/324: build: correct propagated-inputs fields, gnunet, 2021/09/21
- [gnunet-scheme] 79/324: vc: add most build artifacts to .gitignore, gnunet, 2021/09/21
- [gnunet-scheme] 80/324: Define various common network structures, gnunet, 2021/09/21
- [gnunet-scheme] 86/324: doc: Update the roadmap on Guix + GNUnet., gnunet, 2021/09/21
- [gnunet-scheme] 84/324: utils: correct definition of unsigned integers,
gnunet <=
- [gnunet-scheme] 76/324: scripts: download-store: make dependency on guix optional, gnunet, 2021/09/21
- [gnunet-scheme] 83/324: Document the current state of message queues., gnunet, 2021/09/21
- [gnunet-scheme] 85/324: mq: Do not include callbacks in envelopes., gnunet, 2021/09/21
- [gnunet-scheme] 91/324: Define slice-copy! and slice-zero!., gnunet, 2021/09/21
- [gnunet-scheme] 90/324: icmp: Define some packet types and error codes., gnunet, 2021/09/21
- [gnunet-scheme] 100/324: config: parser: Define return types for expansion parser., gnunet, 2021/09/21
- [gnunet-scheme] 108/324: tets: message-handler: Correct imports., gnunet, 2021/09/21
- [gnunet-scheme] 110/324: config: Define a quaject for quering and modifying a configuration., gnunet, 2021/09/21
- [gnunet-scheme] 71/324: doc: Document maintainer quirk, gnunet, 2021/09/21
- [gnunet-scheme] 77/324: util: add missing import, gnunet, 2021/09/21