summaryrefslogtreecommitdiff
path: root/databases/luasql-mysql/files/patch-src_ls__odbc.c
diff options
context:
space:
mode:
Diffstat (limited to 'databases/luasql-mysql/files/patch-src_ls__odbc.c')
-rw-r--r--databases/luasql-mysql/files/patch-src_ls__odbc.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/databases/luasql-mysql/files/patch-src_ls__odbc.c b/databases/luasql-mysql/files/patch-src_ls__odbc.c
new file mode 100644
index 000000000000..c6953edba8a2
--- /dev/null
+++ b/databases/luasql-mysql/files/patch-src_ls__odbc.c
@@ -0,0 +1,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)