aboutsummaryrefslogtreecommitdiff
path: root/src/test_malloc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/test_malloc.c')
-rw-r--r--src/test_malloc.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/test_malloc.c b/src/test_malloc.c
index 30df0348f..ea5c2d6c7 100644
--- a/src/test_malloc.c
+++ b/src/test_malloc.c
@@ -13,7 +13,7 @@
** This file contains code used to implement test interfaces to the
** memory allocation subsystem.
**
-** $Id: test_malloc.c,v 1.39 2008/07/24 08:20:40 danielk1977 Exp $
+** $Id: test_malloc.c,v 1.40 2008/07/25 08:49:00 danielk1977 Exp $
*/
#include "sqliteInt.h"
#include "tcl.h"
@@ -967,11 +967,13 @@ static int test_config_chunkalloc(
Tcl_Obj *CONST objv[]
){
int rc;
- if( objc!=1 ){
- Tcl_WrongNumArgs(interp, 1, objv, "");
+ int nThreshold;
+ if( objc!=2 ){
+ Tcl_WrongNumArgs(interp, 1, objv, "THRESHOLD");
return TCL_ERROR;
}
- rc = sqlite3_config(SQLITE_CONFIG_CHUNKALLOC);
+ if( Tcl_GetIntFromObj(interp, objv[1], &nThreshold) ) return TCL_ERROR;
+ rc = sqlite3_config(SQLITE_CONFIG_CHUNKALLOC, nThreshold);
Tcl_SetObjResult(interp, Tcl_NewIntObj(rc));
return TCL_OK;
}