We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 3219 - introduce a typedef for a type that marks functions that return an error-code
Summary: introduce a typedef for a type that marks functions that return an error-code
Status: ASSIGNED
Alias: None
Product: SDL
Classification: Unclassified
Component: *don't know* (show other bugs)
Version: HG 2.1
Hardware: All All
: P2 enhancement
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-01-01 16:53 UTC by attila
Modified: 2017-08-12 21:49 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description attila 2016-01-01 16:53:41 UTC
i'm working on a Common Lisp FFI for libsdl, and the whole thing is mostly automatically generated (https://github.com/attila-lendvai/hu.dwim.sdl).

on the lisp side i have introduced a type that upon ffi->lisp conversion automatically signals an error if the return value is negative, but right now i would need to list every function by hand where it applies. unfortunately not all int return values are error codes.

if there was something along the lines:

typedef SDL_ErrorCode int;

and it was used to mark the functions that return an error code, then the lisp FFI could automatically translate that type. please consider adding this!
Comment 1 Sam Lantinga 2017-08-12 21:49:16 UTC
That seems like a good change for SDL 2.1