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

remove "import const" everywhere

This commit is contained in:
Alexander Medvednikov
2019-08-23 00:00:31 +03:00
parent dcfc9eb1a1
commit f61b14584a
11 changed files with 172 additions and 308 deletions

View File

@ -8,10 +8,6 @@ import math
#include <sys/syscall.h>
import const(
SYS_getrandom
)
// const (
// SYS_getrandom = 278 // AArch65
// SYS_getrandom = 384 // ARM
@ -47,5 +43,5 @@ fn _getrandom(bytes_needed int, buffer voidptr) int {
if bytes_needed > ReadBatchSize {
panic('_getrandom() dont request more thane $ReadBatchSize bytes at once.')
}
return C.syscall(SYS_getrandom, buffer, bytes_needed, 0)
return C.syscall(C.SYS_getrandom, buffer, bytes_needed, 0)
}