diff options
| author | Jeroen van Rijn <Kelimion@users.noreply.github.com> | 2025-10-28 02:07:03 +0100 |
|---|---|---|
| committer | Jeroen van Rijn <Kelimion@users.noreply.github.com> | 2026-02-08 12:42:28 +0100 |
| commit | 9c1a9c80f8cd16b7ad57ca672eccf8f020cecbb5 (patch) | |
| tree | 84fce217412cf2981c67df56252d6ff21fa9b40d /core/math | |
| parent | 170e314f839f013fe58e0c91a61a34c1dbcfecd2 (diff) | |
core:os -> core:os/os for core:math/big
Diffstat (limited to 'core/math')
| -rw-r--r-- | core/math/big/radix.odin | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/core/math/big/radix.odin b/core/math/big/radix.odin index 9c87440fc..c0ea8cb79 100644 --- a/core/math/big/radix.odin +++ b/core/math/big/radix.odin @@ -15,9 +15,9 @@ package math_big - Also look at extracting and splatting several digits at once. */ -import "base:intrinsics" -import "core:mem" -import "core:os" +import "base:intrinsics" +import "core:mem" +import os "core:os/os2" /* This version of `itoa` allocates on behalf of the caller. The caller must free the string. @@ -407,11 +407,10 @@ internal_int_read_from_ascii_file :: proc(a: ^Int, filename: string, radix := i8 For now, we'll read the entire file. Eventually we'll replace this with a copy that duplicates the logic of `atoi` so we don't need to read the entire file. */ - - res, ok := os.read_entire_file(filename, allocator) + res, res_err := os.read_entire_file(filename, allocator) defer delete(res, allocator) - if !ok { + if res_err != nil { return .Cannot_Read_File } @@ -441,8 +440,8 @@ internal_int_write_to_ascii_file :: proc(a: ^Int, filename: string, radix := i8( len = l, } - ok := os.write_entire_file(filename, data, truncate=true) - return nil if ok else .Cannot_Write_File + write_err := os.write_entire_file(filename, data, truncate=true) + return nil if write_err == nil else .Cannot_Write_File } /* |