aboutsummaryrefslogtreecommitdiff
path: root/src/tclsqlite.c
diff options
context:
space:
mode:
authordanielk1977 <danielk1977@noemail.net>2005-12-30 16:28:01 +0000
committerdanielk1977 <danielk1977@noemail.net>2005-12-30 16:28:01 +0000
commitaef0bf64299f8ed3bfd53880f6ac7327d650b9fa (patch)
treed71d4c28bff1cc7af6b69509cfd9ccf93291879b /src/tclsqlite.c
parentfaa59554c38c568e13a3da5e1f5267e305218f24 (diff)
downloadsqlite-aef0bf64299f8ed3bfd53880f6ac7327d650b9fa.tar.gz
sqlite-aef0bf64299f8ed3bfd53880f6ac7327d650b9fa.zip
Add part of the btree layer of the shared-cache feature. (CVS 2848)
FossilOrigin-Name: 2afcad990190af97d1ad0010f211a5ca8f0fd745
Diffstat (limited to 'src/tclsqlite.c')
-rw-r--r--src/tclsqlite.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/tclsqlite.c b/src/tclsqlite.c
index 7d1dc0348..5a97da069 100644
--- a/src/tclsqlite.c
+++ b/src/tclsqlite.c
@@ -11,7 +11,7 @@
*************************************************************************
** A TCL Interface to SQLite
**
-** $Id: tclsqlite.c,v 1.141 2005/12/19 14:18:11 danielk1977 Exp $
+** $Id: tclsqlite.c,v 1.142 2005/12/30 16:28:02 danielk1977 Exp $
*/
#ifndef NO_TCL /* Omit this whole file if TCL is unavailable */
@@ -1754,11 +1754,12 @@ static int DbObjCmd(void *cd, Tcl_Interp *interp, int objc,Tcl_Obj *const*objv){
** $db soft_heap_limit N
**
** Set the soft-heap-limit for this thread. Note that the limit is
- ** per-thread, not per-database. An empty string is returned.
+ ** per-thread, not per-database. The previous limit is returned.
*/
case DB_SOFT_HEAP_LIMIT: {
#ifndef SQLITE_OMIT_MEMORY_MANAGEMENT
int n;
+ int ret;
if( objc!=3 ){
Tcl_WrongNumArgs(interp, 2, objv, "BYTES");
return TCL_ERROR;
@@ -1766,8 +1767,9 @@ static int DbObjCmd(void *cd, Tcl_Interp *interp, int objc,Tcl_Obj *const*objv){
if( Tcl_GetIntFromObj(interp, objv[2], &n) ){
return TCL_ERROR;
}
+ ret = sqlite3Tsd()->nSoftHeapLimit;
sqlite3_soft_heap_limit(n);
- Tcl_ResetResult(interp);
+ Tcl_SetObjResult(interp, Tcl_NewIntObj(ret));
#endif
break;
}