mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 15:48:51 +00:00
Add require_results to getters in os2 path API
This commit is contained in:
@@ -79,6 +79,7 @@ Get the path for the currently running executable.
|
|||||||
|
|
||||||
*Allocates Using Provided Allocator*
|
*Allocates Using Provided Allocator*
|
||||||
*/
|
*/
|
||||||
|
@(require_results)
|
||||||
get_executable_path :: proc(allocator: runtime.Allocator) -> (path: string, err: Error) {
|
get_executable_path :: proc(allocator: runtime.Allocator) -> (path: string, err: Error) {
|
||||||
return _get_executable_path(allocator)
|
return _get_executable_path(allocator)
|
||||||
}
|
}
|
||||||
@@ -88,6 +89,7 @@ Get the directory for the currently running executable.
|
|||||||
|
|
||||||
*Allocates Using Provided Allocator*
|
*Allocates Using Provided Allocator*
|
||||||
*/
|
*/
|
||||||
|
@(require_results)
|
||||||
get_executable_directory :: proc(allocator: runtime.Allocator) -> (path: string, err: Error) {
|
get_executable_directory :: proc(allocator: runtime.Allocator) -> (path: string, err: Error) {
|
||||||
path = _get_executable_path(allocator) or_return
|
path = _get_executable_path(allocator) or_return
|
||||||
path, _ = split_path(path)
|
path, _ = split_path(path)
|
||||||
|
|||||||
Reference in New Issue
Block a user