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:
@@ -1026,3 +1026,8 @@ pub fn tmpdir() string {
|
||||
}
|
||||
return path
|
||||
}
|
||||
|
||||
|
||||
pub fn chmod(path string, mode int) {
|
||||
C.chmod(path.str, mode)
|
||||
}
|
||||
|
||||
@@ -18,11 +18,11 @@ pub fn init_os_args(argc int, argv &byteptr) []string {
|
||||
|
||||
// get_error_msg return error code representation in string.
|
||||
pub fn get_error_msg(code int) string {
|
||||
_ptr_text := C.strerror(code) // voidptr?
|
||||
if _ptr_text == 0 {
|
||||
ptr_text := C.strerror(code) // voidptr?
|
||||
if ptr_text == 0 {
|
||||
return ''
|
||||
}
|
||||
return tos(_ptr_text, vstrlen(_ptr_text))
|
||||
return tos3(ptr_text)
|
||||
}
|
||||
|
||||
pub fn ls(path string) ?[]string {
|
||||
|
||||
Reference in New Issue
Block a user