blob: c6953edba8a240a06f0eb01d4ca32418c9f50dc7 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
--- src/ls_odbc.c.orig 2025-07-17 01:23:45 UTC
+++ src/ls_odbc.c
@@ -493,6 +493,16 @@ static int cur_fetch (lua_State *L)
}
/*
+** Cursor object collector function
+*/
+static int cur_gc (lua_State *L) {
+ cur_data *cur = (cur_data *) luaL_checkudata (L, 1, LUASQL_CURSOR_ODBC);
+ if (cur != NULL && !(cur->closed))
+ cur_shut(L, cur);
+ return 0;
+}
+
+/*
** Closes a cursor.
*/
static int cur_close (lua_State *L)
|