1
0
forked from Mirror/wren

made wren version number accessable via function (#958)

This commit is contained in:
Joram Vandemoortele
2021-04-08 18:33:22 +02:00
committed by GitHub
parent 1307bdfb64
commit e260b467c4
2 changed files with 10 additions and 0 deletions

View File

@ -296,6 +296,11 @@ typedef enum
WREN_TYPE_UNKNOWN
} WrenType;
// Get the current wren version number.
//
// Can be used to range checks over versions.
WREN_API int wrenGetVersionNumber();
// Initializes [configuration] with all of its default values.
//
// Call this before setting the particular fields you care about.

View File

@ -36,6 +36,11 @@ static void* defaultReallocate(void* ptr, size_t newSize, void* _)
return realloc(ptr, newSize);
}
int wrenGetVersionNumber()
{
return WREN_VERSION_NUMBER;
}
void wrenInitConfiguration(WrenConfiguration* config)
{
config->reallocateFn = defaultReallocate;