olofson / eel

The Extensible Embeddable Language for scripting in realtime applications
http://eelang.org/
zlib License
46 stars 4 forks source link

Implement SDL version/revision API #131

Closed olofson closed 4 years ago

olofson commented 4 years ago

Wrap SDL_GetVersion() and SDL_VERSION in a similar fashion to HeaderVersion() and LinkedVersion() in the Audiality2 module. (Returning arrays with major, minor, micro, and if set, build.)

We can probably use the fourth array entry for SDL_GetRevision()/SDL_REVISION, where my own libraries tend to have build.

SDL_GetRevisionNumber()/SDL_VERSIONNUM are strings, but since we're using EEL arrays, that would work too. However, as it is, the array is not supposed to contain unset/undefined elements. Perhaps not the best interface for general version management... We can use 'nil' for an unset build number, or we could be all fancy and return tables with properly named keys instead.

(Compatibility checking isn't universally standardized anyway, so I'm not sure it matters from that perspective, and either way, that would be on the library/binding level, rather than library/script.)