aboutsummaryrefslogtreecommitdiff
path: root/sdl2/errors.ha
diff options
context:
space:
mode:
authorAutumn! <autumnull@posteo.net>2023-05-24 20:37:00 +0000
committerDrew DeVault <sir@cmpwn.com>2023-06-04 09:23:18 +0200
commit3ca5d97376151d6f1a4a1787b6609c470a05a82c (patch)
tree624e7cdf0711f30512b9ce03c67fd9356073b1ad /sdl2/errors.ha
parentadded some missing bindings (diff)
downloadhare-chip8-3ca5d97376151d6f1a4a1787b6609c470a05a82c.tar.gz
Use types::c:: instead of char and strings::
Signed-off-by: Autumn! <autumnull@posteo.net>
Diffstat (limited to 'sdl2/errors.ha')
-rw-r--r--sdl2/errors.ha8
1 files changed, 4 insertions, 4 deletions
diff --git a/sdl2/errors.ha b/sdl2/errors.ha
index 52d23a0..b386ebe 100644
--- a/sdl2/errors.ha
+++ b/sdl2/errors.ha
@@ -1,4 +1,4 @@
-use strings;
+use types::c;
// Returned when an error occurs in an SDL function.
export type error = !str;
@@ -8,7 +8,7 @@ export fn strerror(err: error) str = {
return err: str;
};
-@symbol("SDL_GetError") fn SDL_GetError() const *char;
+@symbol("SDL_GetError") fn SDL_GetError() const *c::char;
export fn wrapvoid(ret: int) (void | error) = {
wrapint(ret)?;
@@ -16,7 +16,7 @@ export fn wrapvoid(ret: int) (void | error) = {
export fn wrapint(ret: int) (int | error) = {
if (ret < 0) {
- return strings::fromc(SDL_GetError()): error;
+ return c::tostr(SDL_GetError()): error;
};
return ret;
};
@@ -26,6 +26,6 @@ export fn wrapptr(ret: nullable *void) (*void | error) = {
case let v: *void =>
return v;
case null =>
- return strings::fromc(SDL_GetError()): error;
+ return c::tostr(SDL_GetError()): error;
};
};