diff options
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; } |