The TCL interface responds correctly to "break", "continue", and "return"
inside of the script of an eval statement. (CVS 1958) FossilOrigin-Name: dd62224ae8d1047db388acdc4b91eb56fb9e966a
This commit is contained in:
parent
94a98365a6
commit
90b6bb1995
12
manifest
12
manifest
@ -1,5 +1,5 @@
|
||||
C Fix\san\suninitialized\svariable\sbug\sin\snullif().\s\sTicket\s#898.\s(CVS\s1957)
|
||||
D 2004-09-13T13:13:19
|
||||
C The\sTCL\sinterface\sresponds\scorrectly\sto\s"break",\s"continue",\sand\s"return"\ninside\sof\sthe\sscript\sof\san\seval\sstatement.\s(CVS\s1958)
|
||||
D 2004-09-13T13:16:32
|
||||
F Makefile.in 7f481bb8cdb032491df611526e6f4eb6af79691d
|
||||
F Makefile.linux-gcc a9e5a0d309fa7c38e7c14d3ecf7690879d3a5457
|
||||
F README f1de682fbbd94899d50aca13d387d1b3fd3be2dd
|
||||
@ -63,7 +63,7 @@ F src/shell.c 4f1a2760ced81c829defb47b0a3b61ffec61b604
|
||||
F src/sqlite.h.in e29a526593b806f148017ed8bada760ada84cf2f
|
||||
F src/sqliteInt.h c63aad21da12f12193cfa46a820c51cc837f5048
|
||||
F src/table.c 8168c6e824009f8485bff79fc60ea8fea6829b10
|
||||
F src/tclsqlite.c 9225350a3144b3c0dd07a3cc88d2c219d57e2f0d
|
||||
F src/tclsqlite.c 0302e3f42f015d132d1291f3388c06e86c24a008
|
||||
F src/test1.c 1305825c29575ee55a1c8b98a191669fd78b6287
|
||||
F src/test2.c 0f3e0ad7b675a6f3323211ab4ea95490855654c3
|
||||
F src/test3.c 1df9ea27467e50666e574ebe22d434288beb3050
|
||||
@ -248,7 +248,7 @@ F www/tclsqlite.tcl 560ecd6a916b320e59f2917317398f3d59b7cc25
|
||||
F www/vdbe.tcl 59288db1ac5c0616296b26dce071c36cb611dfe9
|
||||
F www/version3.tcl 092a01f5ef430d2c4acc0ae558d74c4bb89638a0
|
||||
F www/whentouse.tcl a8335bce47cc2fddb07f19052cb0cb4d9129a8e4
|
||||
P b5b2e3db09831fe808f9f2692a836eef716df1c5
|
||||
R 992ce50ef6a903331a42eb50a0f32e09
|
||||
P ee335b501cf45727929aac12c0b74547dd54729e
|
||||
R ecb736557a3f73e3cac4e72650b0e555
|
||||
U drh
|
||||
Z a98b1f7a0cbcaa0996885af9189fff88
|
||||
Z 9a080417236581205e2b636a7a8ab66c
|
||||
|
@ -1 +1 @@
|
||||
ee335b501cf45727929aac12c0b74547dd54729e
|
||||
dd62224ae8d1047db388acdc4b91eb56fb9e966a
|
@ -11,7 +11,7 @@
|
||||
*************************************************************************
|
||||
** A TCL Interface to SQLite
|
||||
**
|
||||
** $Id: tclsqlite.c,v 1.105 2004/09/07 13:20:35 drh Exp $
|
||||
** $Id: tclsqlite.c,v 1.106 2004/09/13 13:16:32 drh Exp $
|
||||
*/
|
||||
#ifndef NO_TCL /* Omit this whole file if TCL is unavailable */
|
||||
|
||||
@ -664,7 +664,7 @@ static int DbObjCmd(void *cd, Tcl_Interp *interp, int objc,Tcl_Obj *const*objv){
|
||||
|
||||
Tcl_IncrRefCount(objv[2]);
|
||||
zSql = Tcl_GetStringFromObj(objv[2], 0);
|
||||
while( zSql[0] ){
|
||||
while( rc==TCL_OK && zSql[0] ){
|
||||
int i; /* Loop counter */
|
||||
int nVar; /* Number of wildcards in the SQL */
|
||||
int nCol; /* Number of columns in the result set */
|
||||
@ -752,7 +752,7 @@ static int DbObjCmd(void *cd, Tcl_Interp *interp, int objc,Tcl_Obj *const*objv){
|
||||
|
||||
/* Execute the SQL
|
||||
*/
|
||||
while( pStmt && SQLITE_ROW==sqlite3_step(pStmt) ){
|
||||
while( rc==TCL_OK && pStmt && SQLITE_ROW==sqlite3_step(pStmt) ){
|
||||
for(i=0; i<nCol; i++){
|
||||
Tcl_Obj *pVal;
|
||||
|
||||
@ -794,7 +794,7 @@ static int DbObjCmd(void *cd, Tcl_Interp *interp, int objc,Tcl_Obj *const*objv){
|
||||
pRet = pVal;
|
||||
Tcl_IncrRefCount(pRet);
|
||||
}
|
||||
goto end_step;
|
||||
rc = TCL_BREAK;
|
||||
}else{
|
||||
Tcl_ListObjAppendElement(interp, pRet, pVal);
|
||||
}
|
||||
@ -802,10 +802,14 @@ static int DbObjCmd(void *cd, Tcl_Interp *interp, int objc,Tcl_Obj *const*objv){
|
||||
|
||||
if( pScript ){
|
||||
rc = Tcl_EvalObjEx(interp, pScript, 0);
|
||||
if( rc!=TCL_ERROR ) rc = TCL_OK;
|
||||
if( rc==TCL_CONTINUE ){
|
||||
rc = TCL_OK;
|
||||
}
|
||||
}
|
||||
}
|
||||
end_step:
|
||||
if( rc==TCL_BREAK ){
|
||||
rc = TCL_OK;
|
||||
}
|
||||
|
||||
/* Free the column name objects */
|
||||
if( pScript ){
|
||||
@ -846,7 +850,6 @@ static int DbObjCmd(void *cd, Tcl_Interp *interp, int objc,Tcl_Obj *const*objv){
|
||||
}
|
||||
Tcl_DecrRefCount(pRet);
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user