lunarmodules / luasql

LuaSQL is a simple interface from Lua to a DBMS.
http://lunarmodules.github.io/luasql
535 stars 192 forks source link

ls_sqlite3: conditional use of lua_isinteger #158

Closed cpu closed 5 months ago

cpu commented 5 months ago

The lua_isinteger function is only present in Lua 5.3+. To maintain compatibility with earlier Lua versions (notably 5.2 and 5.1) this pull request gates the usage of this function with defined pre-processor checks. In the case where the symbol is not defined, we unconditionally fall back to existing logic that treats the maybe-an-int item in question as if lua_isinteger returned false.

Resolves https://github.com/lunarmodules/luasql/issues/147