diff options
author | drh <drh@noemail.net> | 2010-09-15 17:54:31 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2010-09-15 17:54:31 +0000 |
commit | f82ccf64377b6f8f89dfa13cf40dd9ae3ae314cf (patch) | |
tree | 294b877353389c29f301daf45859696de33c56b4 /src/test1.c | |
parent | 2969a587907e56557ebbc71197968fa663b5b9c7 (diff) | |
download | sqlite-f82ccf64377b6f8f89dfa13cf40dd9ae3ae314cf.tar.gz sqlite-f82ccf64377b6f8f89dfa13cf40dd9ae3ae314cf.zip |
Added the sqlite3_soft_heap_limit64() interface. Deprecate the older
sqlite3_soft_heap_limit() interface.
FossilOrigin-Name: 82268a2c3d75431cd40de6ad09d398729de32a29
Diffstat (limited to 'src/test1.c')
-rw-r--r-- | src/test1.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/test1.c b/src/test1.c index ff06724cb..8e827f07b 100644 --- a/src/test1.c +++ b/src/test1.c @@ -4390,20 +4390,17 @@ static int test_soft_heap_limit( int objc, Tcl_Obj *CONST objv[] ){ - static int softHeapLimit = 0; - int amt; + sqlite3_int64 amt; + sqlite3_int64 N = -1; if( objc!=1 && objc!=2 ){ Tcl_WrongNumArgs(interp, 1, objv, "?N?"); return TCL_ERROR; } - amt = softHeapLimit; if( objc==2 ){ - int N; - if( Tcl_GetIntFromObj(interp, objv[1], &N) ) return TCL_ERROR; - sqlite3_soft_heap_limit(N); - softHeapLimit = N; + if( Tcl_GetWideIntFromObj(interp, objv[1], &N) ) return TCL_ERROR; } - Tcl_SetObjResult(interp, Tcl_NewIntObj(amt)); + amt = sqlite3_soft_heap_limit64(N); + Tcl_SetObjResult(interp, Tcl_NewWideIntObj(amt)); return TCL_OK; } |