quickfix: make tsizeof3 also work on 32-bit
This commit is contained in:
parent
0b56b3595a
commit
ec66fd07cb
1 changed files with 2 additions and 2 deletions
|
|
@ -1,6 +1,6 @@
|
||||||
discard """
|
discard """
|
||||||
output: '''
|
output: '''
|
||||||
[0, 0, 0, 0, 0, 0, 48, 57]
|
@[48, 57]
|
||||||
'''
|
'''
|
||||||
"""
|
"""
|
||||||
# bug #7238
|
# bug #7238
|
||||||
|
|
@ -16,4 +16,4 @@ proc toByteArrayBE*[T: SomeInteger](num: T): ByteArrayBE[sizeof(T)]=
|
||||||
result[i] = byte(num shr ((N-1-i) * 8))
|
result[i] = byte(num shr ((N-1-i) * 8))
|
||||||
|
|
||||||
let a = 12345.toByteArrayBE
|
let a = 12345.toByteArrayBE
|
||||||
echo a
|
echo a[^2 .. ^1] # to make it work on both 32-bit and 64-bit
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue