dynlib: add last_error procedure

This commit is contained in:
Laytan Laats committed 2024-01-06 02:08:11 +01:00
1 parent 649b5fa528
commit 85b71708dd
4 files changed
+33 -2

No files matched your search

+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
}