Closed daurnimator closed 9 years ago
Thanks, changed it accordingly, but could not yet test it on a 5.3 Lua (no regression on 5.2, though).
I saw you briefly post the diff here and delete it (probably due to messed up formatting, surround in diff\npaste here\n
to get mono-spaced and syntax highlighted on github).
My comments on that diff:
swap.i = lua_tointeger(L, t);
results in loss of precision? or might have undefined behaviour on overflow? I'd have to check the C standard here...#define INT8OID 20
"lua >= 5.1";
afaict, swap.i and the value returned by lua_tointeger are of the same size. The other issues have been addressed.
afaict, swap.i and the value returned by lua_tointeger are of the same size.
Yep. Just I wasn't sure what would happen as lhs is unsigned, rhs is signed.
The other issues have been addressed.
Yes, Thankyou. I haven't tested it out yet though.
I tested out 5.3 support today, worked at a basic level by merely adding
-DLUA_COMPAT_APIINTCASTS
toCFLAGS
. The reason for this is the removal ofluaL_checkint
, useluaL_checkinteger
instead.For complete support, I think the only other thing would be supporting 64bit ints in
get_sql_params
inLUA_TNUMBER
case:lua_isinteger
, if true:paramTypes[n] = INT8OID;
*(uint64_t *)paramValues[n] = htobe64(lua_tointeger(L, t))