diff options
| author | Andrew Kelley <superjoe30@gmail.com> | 2017-09-24 04:18:13 -0400 |
|---|---|---|
| committer | Andrew Kelley <superjoe30@gmail.com> | 2017-09-24 04:18:13 -0400 |
| commit | 8f0dfcbcfb8e4525006de4aa8f3f7a596e7208d5 (patch) | |
| tree | 79532b92c9309e669fc7c96420e1efe9b7dd1f44 | |
| parent | 59410a2f138e2a24a81e795b18e18f3dbfc2009d (diff) | |
| download | zig-8f0dfcbcfb8e4525006de4aa8f3f7a596e7208d5.tar.gz zig-8f0dfcbcfb8e4525006de4aa8f3f7a596e7208d5.zip | |
Revert "windows API functions are not stdcalls"
This reverts commit 59410a2f138e2a24a81e795b18e18f3dbfc2009d.
yes they are
| -rw-r--r-- | std/os/windows/index.zig | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/std/os/windows/index.zig b/std/os/windows/index.zig index dc15fceade..2fc264f31b 100644 --- a/std/os/windows/index.zig +++ b/std/os/windows/index.zig @@ -1,46 +1,46 @@ pub const ERROR = @import("error.zig"); -pub extern "kernel32" fn CryptAcquireContext(phProv: &HCRYPTPROV, pszContainer: LPCTSTR, +pub extern "kernel32" stdcallcc fn CryptAcquireContext(phProv: &HCRYPTPROV, pszContainer: LPCTSTR, pszProvider: LPCTSTR, dwProvType: DWORD, dwFlags: DWORD) -> bool; -pub extern "kernel32" fn CryptReleaseContext(hProv: HCRYPTPROV, dwFlags: DWORD) -> bool; +pub extern "kernel32" stdcallcc fn CryptReleaseContext(hProv: HCRYPTPROV, dwFlags: DWORD) -> bool; -pub extern "kernel32" fn CryptGenRandom(hProv: HCRYPTPROV, dwLen: DWORD, pbBuffer: &BYTE) -> bool; +pub extern "kernel32" stdcallcc fn CryptGenRandom(hProv: HCRYPTPROV, dwLen: DWORD, pbBuffer: &BYTE) -> bool; -pub extern "kernel32" fn ExitProcess(exit_code: UINT) -> noreturn; +pub extern "kernel32" stdcallcc fn ExitProcess(exit_code: UINT) -> noreturn; -pub extern "kernel32" fn GetCommandLine() -> LPTSTR; +pub extern "kernel32" stdcallcc fn GetCommandLine() -> LPTSTR; -pub extern "kernel32" fn GetConsoleMode(in_hConsoleHandle: HANDLE, out_lpMode: &DWORD) -> bool; +pub extern "kernel32" stdcallcc fn GetConsoleMode(in_hConsoleHandle: HANDLE, out_lpMode: &DWORD) -> bool; /// Retrieves the calling thread's last-error code value. The last-error code is maintained on a per-thread basis. /// Multiple threads do not overwrite each other's last-error code. -pub extern "kernel32" fn GetLastError() -> DWORD; +pub extern "kernel32" stdcallcc fn GetLastError() -> DWORD; /// Retrieves file information for the specified file. -pub extern "kernel32" fn GetFileInformationByHandleEx(in_hFile: HANDLE, +pub extern "kernel32" stdcallcc fn GetFileInformationByHandleEx(in_hFile: HANDLE, in_FileInformationClass: FILE_INFO_BY_HANDLE_CLASS, out_lpFileInformation: &c_void, in_dwBufferSize: DWORD) -> bool; /// Retrieves a handle to the specified standard device (standard input, standard output, or standard error). -pub extern "kernel32" fn GetStdHandle(in_nStdHandle: DWORD) -> ?HANDLE; +pub extern "kernel32" stdcallcc fn GetStdHandle(in_nStdHandle: DWORD) -> ?HANDLE; /// Reads data from the specified file or input/output (I/O) device. Reads occur at the position specified by the file pointer if supported by the device. /// This function is designed for both synchronous and asynchronous operations. For a similar function designed solely for asynchronous operation, see ReadFileEx. -pub extern "kernel32" fn ReadFile(in_hFile: HANDLE, out_lpBuffer: LPVOID, +pub extern "kernel32" stdcallcc fn ReadFile(in_hFile: HANDLE, out_lpBuffer: LPVOID, in_nNumberOfBytesToRead: DWORD, out_lpNumberOfBytesRead: &DWORD, in_out_lpOverlapped: ?&OVERLAPPED) -> BOOL; /// Writes data to the specified file or input/output (I/O) device. /// This function is designed for both synchronous and asynchronous operation. For a similar function designed solely for asynchronous operation, see WriteFileEx. -pub extern "kernel32" fn WriteFile(in_hFile: HANDLE, in_lpBuffer: &const c_void, +pub extern "kernel32" stdcallcc fn WriteFile(in_hFile: HANDLE, in_lpBuffer: &const c_void, in_nNumberOfBytesToWrite: DWORD, out_lpNumberOfBytesWritten: ?&DWORD, in_out_lpOverlapped: ?&OVERLAPPED) -> BOOL; -pub extern "kernel32" fn Sleep(dwMilliseconds: DWORD); +pub extern "kernel32" stdcallcc fn Sleep(dwMilliseconds: DWORD); -pub extern "user32" fn MessageBoxA(hWnd: ?HANDLE, lpText: ?LPCTSTR, lpCaption: ?LPCTSTR, uType: UINT) -> c_int; +pub extern "user32" stdcallcc fn MessageBoxA(hWnd: ?HANDLE, lpText: ?LPCTSTR, lpCaption: ?LPCTSTR, uType: UINT) -> c_int; pub const PROV_RSA_FULL = 1; |
