1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

js: fix rand build, properly use key values on map, add rand.string (#12020)

This commit is contained in:
playX
2021-10-01 21:23:49 +03:00
committed by GitHub
parent 60ecbec8ea
commit 82f187e5e0
13 changed files with 186 additions and 39 deletions

View File

@@ -0,0 +1,3 @@
module wyrand
pub fn (mut r WyRandRNG) free() {}

View File

@@ -250,9 +250,3 @@ pub fn (mut rng WyRandRNG) f64_in_range(min f64, max f64) f64 {
}
return min + rng.f64n(max - min)
}
// free should be called when the generator is no longer needed
[unsafe]
pub fn (mut rng WyRandRNG) free() {
unsafe { free(rng) }
}

View File

@@ -0,0 +1,7 @@
module wyrand
// free should be called when the generator is no longer needed
[unsafe]
pub fn (mut rng WyRandRNG) free() {
unsafe { free(rng) }
}