arcapos / luapgsql

Lua binding for PostgreSQL
108 stars 24 forks source link

Lua 5.3 support #21

Closed daurnimator closed 9 years ago

daurnimator commented 9 years ago

I tested out 5.3 support today, worked at a basic level by merely adding -DLUA_COMPAT_APIINTCASTS to CFLAGS. The reason for this is the removal of luaL_checkint, use luaL_checkinteger instead.

For complete support, I think the only other thing would be supporting 64bit ints in get_sql_params in LUA_TNUMBER case:

mbalmer commented 9 years ago

Thanks, changed it accordingly, but could not yet test it on a 5.3 Lua (no regression on 5.2, though).

daurnimator commented 9 years ago

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:

mbalmer commented 9 years ago

afaict, swap.i and the value returned by lua_tointeger are of the same size. The other issues have been addressed.

daurnimator commented 9 years ago

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.