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

all: remove byteptr and charptr; replace them with &byte and &char

This commit is contained in:
Alexander Medvednikov
2021-04-04 17:43:32 +03:00
parent 8dd4a63913
commit 57e6138a61
32 changed files with 250 additions and 226 deletions

View File

@ -32,7 +32,7 @@ pub:
// it supports windows for regular files but it doesn't matter if you use owner, group or others when checking permissions on windows
pub fn inode(path string) FileMode {
mut attr := C.stat{}
unsafe { C.stat(charptr(path.str), &attr) }
unsafe { C.stat(&char(path.str), &attr) }
mut typ := FileType.regular
if attr.st_mode & u32(C.S_IFMT) == u32(C.S_IFDIR) {
typ = .directory