arcapos / luapgsql

Lua binding for PostgreSQL
108 stars 24 forks source link

use luaL_testudata instead of luaL_checkudata in cleanups #29

Closed daurnimator closed 8 years ago

daurnimator commented 8 years ago

res_clear should probably have used testudata instead of checkudata

Same with conn_finish, notify_clear, pgsql_lo_clear

mbalmer commented 8 years ago

How would res_clear() end up being called not by resultset? I don't agree that this is an issue.

mbalmer commented 8 years ago

I leave this out for now, as luaL_testudata is not available in Lua 5.1. Also, I don't think these functions will be called other than for __gc purposes.

daurnimator commented 8 years ago

I don't think these functions will be called other than for __gc purposes.

conn_finish is the main exception here.