dynlib: add last_error procedure

This commit is contained in:
Laytan Laats
2024-01-06 02:08:11 +01:00
parent 649b5fa528
commit 85b71708dd
4 changed files with 33 additions and 2 deletions
+5
View File
@@ -22,3 +22,8 @@ _symbol_address :: proc(library: Library, symbol: string) -> (ptr: rawptr, found
found = ptr != nil
return
}
_last_error :: proc() -> string {
err := os.dlerror()
return "unknown" if err == "" else err
}