Fix. On Lua 5.3 returns info as integer.
This commit is contained in:
parent
6426798c50
commit
a1e7eb6bc0
@ -790,7 +790,13 @@ static int lcurl_info_get_long_(lua_State *L, int opt){
|
|||||||
return lcurl_fail_ex(L, p->err_mode, LCURL_ERROR_EASY, code);
|
return lcurl_fail_ex(L, p->err_mode, LCURL_ERROR_EASY, code);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if LUA_VERSION_NUM >= 503 /* Lua 5.3 */
|
||||||
|
if(sizeof(lua_Integer) >= sizeof(val))
|
||||||
|
lua_pushinteger(L, (lua_Integer)val);
|
||||||
|
else
|
||||||
|
#endif
|
||||||
lua_pushnumber(L, val);
|
lua_pushnumber(L, val);
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user