diff options
Diffstat (limited to 'src/tools.c')
-rw-r--r-- | src/tools.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/tools.c b/src/tools.c index e0f4c40..bd1ea85 100644 --- a/src/tools.c +++ b/src/tools.c | |||
@@ -286,7 +286,7 @@ FuncSubType luaG_getfuncsubtype( lua_State *L, int _i) | |||
286 | // the provided writer fails with code 666 | 286 | // the provided writer fails with code 666 |
287 | // therefore, anytime we get 666, this means that lua_dump() attempted a dump | 287 | // therefore, anytime we get 666, this means that lua_dump() attempted a dump |
288 | // all other cases mean this is either a C or LuaJIT-fast function | 288 | // all other cases mean this is either a C or LuaJIT-fast function |
289 | dumpres = lua_dump( L, dummy_writer, NULL); | 289 | dumpres = lua503_dump( L, dummy_writer, NULL, 1); |
290 | lua_pop( L, mustpush); | 290 | lua_pop( L, mustpush); |
291 | if( dumpres == 666) | 291 | if( dumpres == 666) |
292 | { | 292 | { |
@@ -1192,7 +1192,7 @@ static void inter_copy_func( struct s_Universe* U, lua_State* L2, uint_t L2_cach | |||
1192 | // "value returned is the error code returned by the last call | 1192 | // "value returned is the error code returned by the last call |
1193 | // to the writer" (and we only return 0) | 1193 | // to the writer" (and we only return 0) |
1194 | // not sure this could ever fail but for memory shortage reasons | 1194 | // not sure this could ever fail but for memory shortage reasons |
1195 | if( lua_dump( L, buf_writer, &b) != 0) | 1195 | if( lua503_dump( L, buf_writer, &b, 1) != 0) |
1196 | { | 1196 | { |
1197 | luaL_error( L, "internal error: function dump failed."); | 1197 | luaL_error( L, "internal error: function dump failed."); |
1198 | } | 1198 | } |
@@ -1400,9 +1400,8 @@ static bool_t inter_copy_one_( struct s_Universe* U, lua_State* L2, uint_t L2_ca | |||
1400 | 1400 | ||
1401 | case LUA_TNUMBER: | 1401 | case LUA_TNUMBER: |
1402 | /* LNUM patch support (keeping integer accuracy) */ | 1402 | /* LNUM patch support (keeping integer accuracy) */ |
1403 | // TODO: support for integer in Lua 5.3 | 1403 | #if defined LUA_LNUM || LUA_VERSION_NUM >= 503 |
1404 | #ifdef LUA_LNUM | 1404 | if( lua_isinteger( L, i)) |
1405 | if( lua_isinteger(L,i)) | ||
1406 | { | 1405 | { |
1407 | lua_Integer v = lua_tointeger( L, i); | 1406 | lua_Integer v = lua_tointeger( L, i); |
1408 | DEBUGSPEW_CODE( if( vt == VT_KEY) fprintf( stderr, INDENT_BEGIN "KEY: %d\n" INDENT_END, v)); | 1407 | DEBUGSPEW_CODE( if( vt == VT_KEY) fprintf( stderr, INDENT_BEGIN "KEY: %d\n" INDENT_END, v)); |