Auto stash before merge of "master" and "origin/master"

This commit is contained in:
Brendan Punsky
2018-02-22 20:11:17 -05:00
parent 921f261377
commit 60a54f404b
3 changed files with 1082 additions and 1074 deletions
+4
View File
@@ -42,6 +42,10 @@ ptr_to_bytes :: proc "contextless" (ptr: ^$T, len := 1) -> []byte {
return transmute([]byte)raw.Slice{ptr, len*size_of(T)}; return transmute([]byte)raw.Slice{ptr, len*size_of(T)};
} }
any_to_bytes :: proc "contextless" (val: any) -> []byte {
return transmute([]byte)raw.Slice{val.data, val.type_info.size};
}
kilobytes :: inline proc "contextless" (x: int) -> int do return (x) * 1024; kilobytes :: inline proc "contextless" (x: int) -> int do return (x) * 1024;
megabytes :: inline proc "contextless" (x: int) -> int do return kilobytes(x) * 1024; megabytes :: inline proc "contextless" (x: int) -> int do return kilobytes(x) * 1024;
+4
View File
@@ -626,6 +626,10 @@ foreign kernel32 {
@(link_name="HeapFree") heap_free :: proc(h: Handle, flags: u32, memory: rawptr) -> Bool ---; @(link_name="HeapFree") heap_free :: proc(h: Handle, flags: u32, memory: rawptr) -> Bool ---;
@(link_name="GetProcessHeap") get_process_heap :: proc() -> Handle ---; @(link_name="GetProcessHeap") get_process_heap :: proc() -> Handle ---;
@(link_name="LocalAlloc") local_alloc :: proc(flags: u32, bytes: int) -> rawptr ---;
@(link_name="LocalReAlloc") local_realloc :: proc(mem: rawptr, bytes: int, flags: uint) -> rawptr ---;
@(link_name="LocalFree") local_free :: proc(mem: rawptr) -> rawptr ---;
@(link_name="FindFirstChangeNotificationA") find_first_change_notification_a :: proc(path: ^byte, watch_subtree: Bool, filter: u32) -> Handle ---; @(link_name="FindFirstChangeNotificationA") find_first_change_notification_a :: proc(path: ^byte, watch_subtree: Bool, filter: u32) -> Handle ---;
@(link_name="FindNextChangeNotification") find_next_change_notification :: proc(h: Handle) -> Bool ---; @(link_name="FindNextChangeNotification") find_next_change_notification :: proc(h: Handle) -> Bool ---;
@(link_name="FindCloseChangeNotification") find_close_change_notification :: proc(h: Handle) -> Bool ---; @(link_name="FindCloseChangeNotification") find_close_change_notification :: proc(h: Handle) -> Bool ---;
View File