mirror of
https://github.com/Ed94/Odin.git
synced 2026-07-25 08:57:55 +00:00
rename nul to null, allocation clarifications
This commit is contained in:
@@ -211,7 +211,7 @@ _getwd :: proc(allocator: runtime.Allocator) -> (string, Error) {
|
||||
#no_bounds_check res := unix.sys_getcwd(&buf[0], uint(len(buf)))
|
||||
|
||||
if res >= 0 {
|
||||
return strings.string_from_nul_terminated_ptr(&buf[0], len(buf)), nil
|
||||
return strings.string_from_zero_terminated_ptr(&buf[0], len(buf)), nil
|
||||
}
|
||||
if res != -ERANGE {
|
||||
return "", _get_platform_error(res)
|
||||
|
||||
@@ -913,7 +913,7 @@ get_current_directory :: proc() -> string {
|
||||
#no_bounds_check res := unix.sys_getcwd(&buf[0], uint(len(buf)))
|
||||
|
||||
if res >= 0 {
|
||||
return strings.string_from_nul_terminated_ptr(&buf[0], len(buf))
|
||||
return strings.string_from_zero_terminated_ptr(&buf[0], len(buf))
|
||||
}
|
||||
if _get_errno(res) != ERANGE {
|
||||
delete(buf)
|
||||
|
||||
Reference in New Issue
Block a user