Fix Fsqlite_finalize book-keeping
* src/sqlite.c (Fsqlite_finalize): Mark the object as dead.
This commit is contained in:
parent
19233f6501
commit
17569c9495
2 changed files with 5 additions and 2 deletions
|
@ -290,7 +290,7 @@ DEFUN ("sqlite-close", Fsqlite_close, Ssqlite_close, 1, 1, 0,
|
|||
check_sqlite (db, false);
|
||||
sqlite3_close (XSQLITE (db)->db);
|
||||
XSQLITE (db)->db = NULL;
|
||||
return Qnil;
|
||||
return Qt;
|
||||
}
|
||||
|
||||
/* Bind values in a statement like
|
||||
|
@ -647,6 +647,7 @@ This will free the resources held by SET. */)
|
|||
{
|
||||
check_sqlite (set, true);
|
||||
sqlite3_finalize (XSQLITE (set)->stmt);
|
||||
XSQLITE (set)->db = NULL;
|
||||
return Qt;
|
||||
}
|
||||
|
||||
|
|
|
@ -79,7 +79,9 @@
|
|||
(should (equal (sqlite-next set)
|
||||
'("bar" 2)))
|
||||
(should-not (sqlite-next set))
|
||||
(should-not (sqlite-more-p set))))
|
||||
(should-not (sqlite-more-p set))
|
||||
(sqlite-finalize set)
|
||||
(should-error (sqlite-next set))))
|
||||
|
||||
(ert-deftest sqlite-chars ()
|
||||
(skip-unless (sqlite-available-p))
|
||||
|
|
Loading…
Add table
Reference in a new issue