mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
add missing cfns
This commit is contained in:
parent
5794594e19
commit
268a6dc6d9
@ -144,8 +144,21 @@ fn C.FindClose()
|
||||
fn C.MAKELANGID() int
|
||||
fn C.FormatMessage() voidptr
|
||||
fn C.CloseHandle()
|
||||
fn C.WaitForSingleObject()
|
||||
fn C.GetExitCodeProcess()
|
||||
fn C.RegOpenKeyEx() voidptr
|
||||
fn C.GetTickCount() i64
|
||||
fn C.Sleep()
|
||||
|
||||
fn C.Sleep()
|
||||
fn C.WSAStartup(u16, &voidptr) int
|
||||
fn C.WSAGetLastError() int
|
||||
fn C.closesocket(int) int
|
||||
fn C.vschannel_init(&C.TlsContext)
|
||||
fn C.request(&C.TlsContext,int, &u16, byteptr, &byteptr)
|
||||
fn C.vschannel_cleanup(&C.TlsContext)
|
||||
fn C.URLDownloadToFile(int, &u16,&u16, int, int)
|
||||
fn C.GetLastError() u32
|
||||
fn C.CreateDirectory(byteptr, int) bool
|
||||
fn C.BCryptGenRandom(int,voidptr,int,int) int
|
||||
fn C.CreateMutex(int,bool,byteptr) voidptr
|
||||
fn C.WaitForSingleObject(voidptr,int) int
|
||||
fn C.ReleaseMutex(voidptr) bool
|
@ -67,7 +67,7 @@ fn C.ftell(fp voidptr) int
|
||||
fn C.getenv(byteptr) byteptr
|
||||
fn C.sigaction(int, voidptr, int)
|
||||
|
||||
fn C.GetLastError() u32
|
||||
|
||||
|
||||
// read_bytes reads an amount of bytes from the beginning of the file
|
||||
pub fn (f File) read_bytes(size int) []byte {
|
||||
|
@ -130,7 +130,7 @@ pub fn dir_exists(path string) bool {
|
||||
return false
|
||||
}
|
||||
|
||||
fn C.CreateDirectory(byteptr, int) bool
|
||||
|
||||
|
||||
// mkdir creates a new directory with the specified path.
|
||||
pub fn mkdir(path string) ?bool {
|
||||
|
@ -77,7 +77,7 @@ pub fn (m mut Mutex) lock() {
|
||||
|
||||
pub fn (m mut Mutex) unlock() {
|
||||
if m.state == .waiting {
|
||||
if C.ReleaseMutex(m.mx) != 0 {
|
||||
if ReleaseMutex(m.mx) {
|
||||
m.state = .broken
|
||||
return
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user