mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
force C function definitions
This commit is contained in:
@@ -8,6 +8,8 @@ module rand
|
||||
|
||||
#flag darwin -framework Security
|
||||
|
||||
fn C.SecRandomCopyBytes() int
|
||||
|
||||
pub fn read(bytes_needed int) ?[]byte {
|
||||
mut buffer := malloc(bytes_needed)
|
||||
status := C.SecRandomCopyBytes(0, bytes_needed, buffer)
|
||||
|
Reference in New Issue
Block a user