mirror of
https://github.com/ntop/ntopng.git
synced 2026-05-06 03:45:26 +00:00
Fixed 32 and 64 bit number expor from C++ to Lua
This commit is contained in:
parent
ea85e43cbb
commit
1716fdad31
1 changed files with 2 additions and 20 deletions
|
|
@ -3492,16 +3492,7 @@ void lua_push_uint64_table_entry(lua_State *L, const char *key,
|
|||
if (L) {
|
||||
lua_pushstring(L, key);
|
||||
/* NOTE since LUA 5.3 integers are 64 bits */
|
||||
|
||||
#if defined(__i686__)
|
||||
if (value > 0x7FFFFFFF)
|
||||
#else
|
||||
if (value > 0xFFFFFFFF)
|
||||
#endif
|
||||
lua_pushnumber(L, (lua_Number)value);
|
||||
else
|
||||
lua_pushinteger(L, (lua_Integer)value);
|
||||
|
||||
lua_pushinteger(L, (lua_Integer)value);
|
||||
lua_settable(L, -3);
|
||||
}
|
||||
}
|
||||
|
|
@ -3512,16 +3503,7 @@ void lua_push_int64_table_entry(lua_State *L, const char *key, int64_t value) {
|
|||
if (L) {
|
||||
lua_pushstring(L, key);
|
||||
/* NOTE since LUA 5.3 integers are 64 bits */
|
||||
|
||||
#if defined(__i686__)
|
||||
if (value > 0x7FFFFFFF)
|
||||
#else
|
||||
if (value > 0xFFFFFFFF)
|
||||
#endif
|
||||
lua_pushnumber(L, (lua_Number)value);
|
||||
else
|
||||
lua_pushinteger(L, (lua_Integer)value);
|
||||
|
||||
lua_pushinteger(L, (lua_Integer)value);
|
||||
lua_settable(L, -3);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue