Conditionalize int2float on lua 5.3

This commit is contained in:
philip 2020-09-25 19:18:01 -04:00 committed by Nathaniel Wesley Filardo
parent f316ebf73a
commit 8bce7937ac
1 changed files with 5 additions and 0 deletions

View File

@ -644,6 +644,7 @@ static int node_writercr (lua_State *L) {
return 1;
}
#if LUA_VERSION_NUM > 501
static int node_int2float(lua_State *L) {
union {
lua_Integer i;
@ -666,6 +667,7 @@ static int node_float2int(lua_State *L) {
return 1;
}
#endif
#endif
// Lua: n = node.LFS.reload(lfsimage)
static int node_lfsreload (lua_State *L) {
@ -932,13 +934,16 @@ LROT_BEGIN(node, NULL, 0)
LROT_FUNCENTRY( restore, node_restore )
LROT_FUNCENTRY( random, node_random )
LROT_FUNCENTRY( stripdebug, node_stripdebug )
LROT_FUNCENTRY( peek, node_peek )
#if LUA_VERSION_NUM == 501
LROT_TABENTRY( egc, node_egc )
#endif
#ifdef DEVELOPMENT_TOOLS
LROT_FUNCENTRY( osprint, node_osprint )
#if LUA_VERSION_NUM > 501
LROT_FUNCENTRY( int2float, node_int2float )
LROT_FUNCENTRY( float2int, node_float2int )
#endif
#endif
LROT_FUNCENTRY( getpartitiontable, node_getpartitiontable )
LROT_FUNCENTRY( setpartitiontable, node_setpartitiontable )