mirror of
https://github.com/Ed94/Odin.git
synced 2026-06-17 11:22:22 -07:00
Minor fixes
This commit is contained in:
@@ -149,7 +149,7 @@ scratch_allocator_proc :: proc(allocator_data: rawptr, mode: Allocator_Mode,
|
||||
scratch_allocator_init(s, DEFAULT_BACKING_SIZE);
|
||||
}
|
||||
|
||||
size := size;
|
||||
size := size;
|
||||
|
||||
switch mode {
|
||||
case .Alloc:
|
||||
@@ -673,7 +673,6 @@ dynamic_pool_alloc :: proc(using pool: ^Dynamic_Pool, bytes: int) -> rawptr {
|
||||
current_block = new_block;
|
||||
}
|
||||
|
||||
|
||||
n := bytes;
|
||||
extra := alignment - (n % alignment);
|
||||
n += extra;
|
||||
|
||||
@@ -503,7 +503,7 @@ absolute_path_from_relative :: proc(rel: string) -> (path: string, err: Errno) {
|
||||
}
|
||||
|
||||
rel_cstr := strings.clone_to_cstring(rel, context.temp_allocator);
|
||||
|
||||
|
||||
path_ptr := _unix_realpath(rel_cstr, nil);
|
||||
if path_ptr == nil {
|
||||
return "", Errno(get_last_error());
|
||||
@@ -566,7 +566,7 @@ set_current_directory :: proc(path: string) -> (err: Errno) {
|
||||
return ERROR_NONE;
|
||||
}
|
||||
|
||||
exit :: proc(code: int) -> ! {
|
||||
exit :: proc "contextless" (code: int) -> ! {
|
||||
_unix_exit(code);
|
||||
}
|
||||
|
||||
|
||||
@@ -421,7 +421,7 @@ set_current_directory :: proc(path: string) -> (err: Errno) {
|
||||
return ERROR_NONE;
|
||||
}
|
||||
|
||||
exit :: proc(code: int) -> ! {
|
||||
exit :: proc "contextless" (code: int) -> ! {
|
||||
_unix_exit(c.int(code));
|
||||
}
|
||||
|
||||
|
||||
@@ -590,7 +590,7 @@ set_current_directory :: proc(path: string) -> (err: Errno) {
|
||||
return ERROR_NONE;
|
||||
}
|
||||
|
||||
exit :: proc(code: int) -> ! {
|
||||
exit :: proc "contextless" (code: int) -> ! {
|
||||
_unix_exit(c.int(code));
|
||||
}
|
||||
|
||||
|
||||
@@ -127,7 +127,7 @@ get_page_size :: proc() -> int {
|
||||
|
||||
|
||||
|
||||
exit :: proc(code: int) -> ! {
|
||||
exit :: proc "contextless" (code: int) -> ! {
|
||||
win32.ExitProcess(win32.DWORD(code));
|
||||
}
|
||||
|
||||
|
||||
@@ -496,4 +496,5 @@ default_assertion_failure_proc :: proc(prefix, message: string, loc: Source_Code
|
||||
}
|
||||
print_byte('\n');
|
||||
debug_trap();
|
||||
// trap();
|
||||
}
|
||||
|
||||
@@ -687,6 +687,7 @@ EXCEPTION_EXECUTE_HANDLER: LONG : 1;
|
||||
EXCEPTION_MAXIMUM_PARAMETERS :: 15;
|
||||
|
||||
EXCEPTION_DATATYPE_MISALIGNMENT :: 0x80000002;
|
||||
EXCEPTION_BREAKPOINT :: 0x80000003;
|
||||
EXCEPTION_ACCESS_VIOLATION :: 0xC0000005;
|
||||
EXCEPTION_ILLEGAL_INSTRUCTION :: 0xC000001D;
|
||||
EXCEPTION_ARRAY_BOUNDS_EXCEEDED :: 0xC000008C;
|
||||
|
||||
Reference in New Issue
Block a user