aboutsummaryrefslogtreecommitdiff
path: root/stdlib/rng.c
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2025-03-05 18:20:54 -0500
committerBruce Hill <bruce@bruce-hill.com>2025-03-05 18:20:54 -0500
commit147e0f0269440fce15d6b88a8a90627f3a3b2df2 (patch)
treebc33522ba71b5a2996fae22e102cce5046cf1333 /stdlib/rng.c
parent2c4324670ff569ede360d13875c5e4b5720a626d (diff)
Overhaul of constructors, making it more consistent and correct. Also
changed T(), T, T_t, T_s type names to T(), T$$info, T$$type, T$$struct for unambiguity
Diffstat (limited to 'stdlib/rng.c')
-rw-r--r--stdlib/rng.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/stdlib/rng.c b/stdlib/rng.c
index 8e98aa8e..07b2f36c 100644
--- a/stdlib/rng.c
+++ b/stdlib/rng.c
@@ -251,7 +251,7 @@ public Byte_t RNG$byte(RNG_t rng)
public Array_t RNG$bytes(RNG_t rng, Int_t count)
{
- int64_t n = Int_to_Int64(count, false);
+ int64_t n = Int64$from_int(count, false);
Byte_t *r = GC_MALLOC_ATOMIC(sizeof(Byte_t[n]));
random_bytes(rng, r, sizeof(Byte_t[n]));
return (Array_t){.data=r, .length=n, .stride=1, .atomic=1};