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

parser: do not allow calling private functions

This commit is contained in:
Alexander Medvednikov
2020-05-18 22:54:08 +02:00
parent 2a62f1a312
commit 03525843a0
9 changed files with 49 additions and 40 deletions

View File

@@ -29,7 +29,7 @@ struct C.timespec {
// the first arg is defined in include/bits/types.h as `__S32_TYPE`, which is `int`
fn C.clock_gettime(int, &C.timespec)
fn sys_mono_now() u64 {
pub fn sys_mono_now() u64 {
$if macos {
return sys_mono_now_darwin()
} $else {

View File

@@ -41,7 +41,7 @@ fn init_win_time_start() u64 {
return s
}
fn sys_mono_now() u64 {
pub fn sys_mono_now() u64 {
tm := u64(0)
C.QueryPerformanceCounter(&tm) // XP or later never fail
return (tm - start_time) * 1_000_000_000 / freq_time