Browse Source

Make `os.get_last_error` contextless

gingerBill 2 years ago
parent
commit
ffe953b43d
4 changed files with 4 additions and 4 deletions
  1. 1 1
      core/os/os_darwin.odin
  2. 1 1
      core/os/os_freebsd.odin
  3. 1 1
      core/os/os_linux.odin
  4. 1 1
      core/os/os_openbsd.odin

+ 1 - 1
core/os/os_darwin.odin

@@ -333,7 +333,7 @@ foreign dl {
 	@(link_name="dlerror") _unix_dlerror :: proc() -> cstring ---
 }
 
-get_last_error :: proc() -> int {
+get_last_error :: proc "contextless" () -> int {
 	return __error()^
 }
 

+ 1 - 1
core/os/os_freebsd.odin

@@ -303,7 +303,7 @@ is_path_separator :: proc(r: rune) -> bool {
 	return r == '/'
 }
 
-get_last_error :: proc() -> int {
+get_last_error :: proc "contextless" () -> int {
 	return __errno_location()^
 }
 

+ 1 - 1
core/os/os_linux.odin

@@ -441,7 +441,7 @@ _get_errno :: proc(res: int) -> Errno {
 }
 
 // get errno from libc
-get_last_error :: proc() -> int {
+get_last_error :: proc "contextless" () -> int {
 	return __errno_location()^
 }
 

+ 1 - 1
core/os/os_openbsd.odin

@@ -294,7 +294,7 @@ is_path_separator :: proc(r: rune) -> bool {
 	return r == '/'
 }
 
-get_last_error :: proc() -> int {
+get_last_error :: proc "contextless" () -> int {
 	return __errno()^
 }