mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-03 05:08:14 +00:00
Add multi pointers to core
This commit is contained in:
@@ -45,6 +45,24 @@ slice_handle_error :: proc "contextless" (file: string, line, column: i32, lo, h
|
||||
bounds_trap();
|
||||
}
|
||||
|
||||
multi_pointer_slice_handle_error :: proc "contextless" (file: string, line, column: i32, lo, hi: int) -> ! {
|
||||
print_caller_location(Source_Code_Location{file, line, column, ""});
|
||||
print_string(" Invalid slice indices: ");
|
||||
print_i64(i64(lo));
|
||||
print_string(":");
|
||||
print_i64(i64(hi));
|
||||
print_byte('\n');
|
||||
bounds_trap();
|
||||
}
|
||||
|
||||
|
||||
multi_pointer_slice_expr_error :: proc "contextless" (file: string, line, column: i32, lo, hi: int) {
|
||||
if lo <= hi {
|
||||
return;
|
||||
}
|
||||
multi_pointer_slice_handle_error(file, line, column, lo, hi);
|
||||
}
|
||||
|
||||
slice_expr_error_hi :: proc "contextless" (file: string, line, column: i32, hi: int, len: int) {
|
||||
if 0 <= hi && hi <= len {
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user