diff options
| author | gingerBill <bill@gingerbill.org> | 2024-08-04 15:24:26 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2024-08-04 15:24:26 +0100 |
| commit | c078b2dd1be617e6687a3a5ffc919a45bbabb5bf (patch) | |
| tree | 0ee1feef26570f195a8d0d00d0266edc028dbfec /core/os/errors.odin | |
| parent | bf948ab8aed9099cf17beb91bf75b07698661a51 (diff) | |
Add `@(require_results)`
Diffstat (limited to 'core/os/errors.odin')
| -rw-r--r-- | core/os/errors.odin | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/core/os/errors.odin b/core/os/errors.odin index d95c7be51..691397f4b 100644 --- a/core/os/errors.odin +++ b/core/os/errors.odin @@ -139,6 +139,12 @@ _error_string :: proc "contextless" (e: Platform_Error) -> string where intrinsi return "" } + when ODIN_OS == .Darwin { + if s := string(_darwin_string_error(i32(e))); s != "" { + return s + } + } + when ODIN_OS != .Linux { @(require_results) binary_search :: proc "contextless" (array: $A/[]$T, key: T) -> (index: int, found: bool) #no_bounds_check { |