mirror of
https://github.com/status-im/nim-stew.git
synced 2025-01-09 19:56:09 +00:00
ssz no longer uses stew/bitseqs
This commit is contained in:
parent
b9e847a143
commit
86ac01122c
@ -1,3 +1,5 @@
|
|||||||
|
{.push raises: [Defect].}
|
||||||
|
|
||||||
import
|
import
|
||||||
bitops2, ptrops
|
bitops2, ptrops
|
||||||
|
|
||||||
@ -7,6 +9,9 @@ type
|
|||||||
BitSeq* = distinct Bytes
|
BitSeq* = distinct Bytes
|
||||||
## TODO
|
## TODO
|
||||||
##
|
##
|
||||||
|
## Update: the SSZ module has its own bitseq now - this bitseq can be
|
||||||
|
## reimplemented to use any in-memory representation it deems convenient
|
||||||
|
##
|
||||||
## The current design of BitSeq tries to follow precisely
|
## The current design of BitSeq tries to follow precisely
|
||||||
## the bitwise representation of the SSZ bitlists.
|
## the bitwise representation of the SSZ bitlists.
|
||||||
## This is a relatively compact representation, but as
|
## This is a relatively compact representation, but as
|
||||||
|
@ -17,6 +17,8 @@
|
|||||||
# Note that `ByteAddress` in stdlib is implemented as a signed integer and
|
# Note that `ByteAddress` in stdlib is implemented as a signed integer and
|
||||||
# might lead to overflow on arithmetic - avoid
|
# might lead to overflow on arithmetic - avoid
|
||||||
|
|
||||||
|
{.push raises: [].}
|
||||||
|
|
||||||
template offset*(p: pointer, bytes: int): pointer =
|
template offset*(p: pointer, bytes: int): pointer =
|
||||||
## Offset a memory address by a number of bytes. Behavior is undefined on
|
## Offset a memory address by a number of bytes. Behavior is undefined on
|
||||||
## overflow.
|
## overflow.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user