Added the sqlite3_soft_heap_limit64() interface. Deprecate the older

sqlite3_soft_heap_limit() interface.

FossilOrigin-Name: 82268a2c3d75431cd40de6ad09d398729de32a29
This commit is contained in:
drh
2010-09-15 17:54:31 +00:00
parent 2969a58790
commit f82ccf6437
6 changed files with 163 additions and 121 deletions
+5 -8
View File
@@ -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;
}