hare

The Hare programming language
git clone https://git.torresjrjr.com/hare.git
Log | Files | Refs | README | LICENSE

commit 7820b93c0fcf6cc0784bec297e55f0302b0a6b52
parent 1e56d76b95530aaaf5b048c53297ab39bbd1d662
Author: Drew DeVault <sir@cmpwn.com>
Date:   Sat, 27 Mar 2021 14:38:18 -0400

uuid: use uuid type for id binding

Diffstat:
Muuid/uuid.ha | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/uuid/uuid.ha b/uuid/uuid.ha @@ -30,7 +30,7 @@ def NODE: size = 10; // Generates a new version 4 UUID. export fn generate() uuid = { - let id: [16]u8 = [0...]; + let id: uuid = [0...]; random::buffer(id[..]); let buf = id[CLOCK_SEQ_HI_AND_RESERVED..CLOCK_SEQ_HI_AND_RESERVED + 2]; let clock = (endian::begetu16(buf) & 0x3FFF) | 0x8000;