1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-05 15:55:57 +03:00

Changes to give a warning-free build with SQLITE_OMIT_INCRBLOB and

SQLITE_OMIT_SHARED_CACHE.

FossilOrigin-Name: 711c59171b22df04224183a713e6c36e0bb3bba8
This commit is contained in:
drh
2016-09-10 19:51:40 +00:00
parent 9871664ed6
commit 2eb22af03d
7 changed files with 39 additions and 28 deletions

View File

@@ -253,7 +253,6 @@ static int SQLITE_TCLAPI btree_close_cursor(
const char **argv /* Text of each argument */
){
BtCursor *pCur;
Btree *pBt;
int rc;
if( argc!=2 ){
@@ -262,12 +261,18 @@ static int SQLITE_TCLAPI btree_close_cursor(
return TCL_ERROR;
}
pCur = sqlite3TestTextToPtr(argv[1]);
pBt = pCur->pBtree;
sqlite3_mutex_enter(pBt->db->mutex);
sqlite3BtreeEnter(pBt);
#if SQLITE_THREADSAFE>0
{
Btree *pBt = pCur->pBtree;
sqlite3_mutex_enter(pBt->db->mutex);
sqlite3BtreeEnter(pBt);
rc = sqlite3BtreeCloseCursor(pCur);
sqlite3BtreeLeave(pBt);
sqlite3_mutex_leave(pBt->db->mutex);
}
#else
rc = sqlite3BtreeCloseCursor(pCur);
sqlite3BtreeLeave(pBt);
sqlite3_mutex_leave(pBt->db->mutex);
#endif
ckfree((char *)pCur);
if( rc ){
Tcl_AppendResult(interp, sqlite3ErrName(rc), 0);