diff options
| author | gingerBill <bill@gingerbill.org> | 2023-09-19 15:12:50 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2023-09-19 15:12:50 +0100 |
| commit | ecde06e3a31179bd8f86383fd65cfbce31ab6d9a (patch) | |
| tree | c95dffc47f4dac2752943ddecba15496b706b979 /core | |
| parent | 3505c1d790ee0f05ed14e6b96121f16e6ffb75f4 (diff) | |
| parent | 150a72f75e551f0d46c8ecd87937faa174e9b4e4 (diff) | |
Merge branch 'master' of https://github.com/odin-lang/Odinwindows-llvm-12.0.1
Diffstat (limited to 'core')
| -rw-r--r-- | core/encoding/json/marshal.odin | 12 | ||||
| -rw-r--r-- | core/sys/windows/kernel32.odin | 15 |
2 files changed, 21 insertions, 6 deletions
diff --git a/core/encoding/json/marshal.odin b/core/encoding/json/marshal.odin index 77a5bf8df..43f464bdb 100644 --- a/core/encoding/json/marshal.odin +++ b/core/encoding/json/marshal.odin @@ -404,7 +404,7 @@ opt_write_key :: proc(w: io.Writer, opt: ^Marshal_Options, name: string) -> (err switch opt.spec { case .JSON, .JSON5: io.write_quoted_string(w, name) or_return - io.write_string(w, ": ") or_return + io.write_string(w, ": " if opt.pretty else ":") or_return case .MJSON: if opt.mjson_keys_use_quotes { @@ -412,11 +412,11 @@ opt_write_key :: proc(w: io.Writer, opt: ^Marshal_Options, name: string) -> (err } else { io.write_string(w, name) or_return } - + if opt.mjson_keys_use_equal_sign { - io.write_string(w, " = ") or_return + io.write_string(w, " = " if opt.pretty else "=") or_return } else { - io.write_string(w, ": ") or_return + io.write_string(w, ": " if opt.pretty else ":") or_return } } @@ -446,7 +446,7 @@ opt_write_iteration :: proc(w: io.Writer, opt: ^Marshal_Options, iteration: int) switch opt.spec { case .JSON, .JSON5: if iteration > 0 { - io.write_string(w, ", ") or_return + io.write_byte(w, ',') or_return if opt.pretty { io.write_byte(w, '\n') or_return @@ -462,7 +462,7 @@ opt_write_iteration :: proc(w: io.Writer, opt: ^Marshal_Options, iteration: int) io.write_byte(w, '\n') or_return } else { // comma separation necessary for non pretty output! - io.write_string(w, ", ") or_return + io.write_byte(w, ',') or_return } } diff --git a/core/sys/windows/kernel32.odin b/core/sys/windows/kernel32.odin index 2b63595a4..0c612a974 100644 --- a/core/sys/windows/kernel32.odin +++ b/core/sys/windows/kernel32.odin @@ -132,6 +132,21 @@ foreign kernel32 { SetThreadPriority :: proc(thread: HANDLE, priority: c_int) -> BOOL --- GetExitCodeThread :: proc(thread: HANDLE, exit_code: ^DWORD) -> BOOL --- TerminateThread :: proc(thread: HANDLE, exit_code: DWORD) -> BOOL --- + SuspendThread :: proc(hThread: HANDLE) -> DWORD --- + + GetProcessAffinityMask :: proc( + hProcess: HANDLE, + lpProcessAffinityMask: PDWORD_PTR, + lpSystemAffinityMask: PDWORD_PTR, + ) -> BOOL --- + SetProcessAffinityMask :: proc( + hProcess: HANDLE, + dwProcessAffinityMask: DWORD_PTR, + ) -> BOOL --- + SetThreadAffinityMask :: proc( + hThread: HANDLE, + dwThreadAffinityMask: DWORD_PTR, + ) -> DWORD_PTR --- CreateSemaphoreW :: proc(attributes: LPSECURITY_ATTRIBUTES, initial_count, maximum_count: LONG, name: LPCWSTR) -> HANDLE --- ReleaseSemaphore :: proc(semaphore: HANDLE, release_count: LONG, previous_count: ^LONG) -> BOOL --- |