summaryrefslogtreecommitdiffstats
path: root/generic/tclObj.c
diff options
context:
space:
mode:
authorhobbs <hobbs@noemail.net>1999-12-04 06:15:40 (GMT)
committerhobbs <hobbs@noemail.net>1999-12-04 06:15:40 (GMT)
commit69dfc25e1bbb81bf10b839417b2d011522f4d8e3 (patch)
treec153fe1950b58db095afef4ac9ea58a5e73ebb2a /generic/tclObj.c
parent799ee9d205f8b3c2051b44f05f75141ff73abb2f (diff)
downloadtcl-69dfc25e1bbb81bf10b839417b2d011522f4d8e3.zip
tcl-69dfc25e1bbb81bf10b839417b2d011522f4d8e3.tar.gz
tcl-69dfc25e1bbb81bf10b839417b2d011522f4d8e3.tar.bz2
* tests/expr-old.test:
* tests/parseExpr.test: * tests/string.test: * generic/tclGet.c: * generic/tclInt.h: * generic/tclObj.c: * generic/tclParseExpr.c: * generic/tclUtil.c: * generic/tclExecute.c: added TclCheckBadOctal routine to enhance error message checking for when users use invalid octal numbers (like 08), as well as replumbed the Expr*Funcs with a new VerifyExprObjType to simplify type handling. * tests/expr.test: * generic/tclCompile.c: fixed 'bad code length' error for 'expr + {[incr]}' case, with new test case [Bug: 3736] and seg fault on 'expr + {[error]}' (different cause) that was caused by a correct optimization that didn't correctly track how it was modifying the source string in the opt. The optimization was removed, which means that: expr 1 + {[string length abc]} will be not be compiled inline as before, but this should be written: expr {1 + [string length abc]} which will be compiled inline for speed. This prevents expr 1 + {[mindless error]} from seg faulting, and only affects optimizations for degenerate cases [Bug: 3737] FossilOrigin-Name: bc2b85b9c25cb34899d95dc05eed84694149d3ba
Diffstat (limited to 'generic/tclObj.c')
-rw-r--r--generic/tclObj.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/generic/tclObj.c b/generic/tclObj.c
index e83d70a..5b3fec7 100644
--- a/generic/tclObj.c
+++ b/generic/tclObj.c
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclObj.c,v 1.11 1999/11/10 02:51:57 hobbs Exp $
+ * RCS: @(#) $Id: tclObj.c,v 1.12 1999/12/04 06:15:41 hobbs Exp $
*/
#include "tclInt.h"
@@ -1686,6 +1686,7 @@ SetIntFromAny(interp, objPtr)
sprintf(buf, "expected integer but got \"%.50s\"", string);
Tcl_ResetResult(interp);
Tcl_AppendToObj(Tcl_GetObjResult(interp), buf, -1);
+ TclCheckBadOctal(interp, string);
}
return TCL_ERROR;
}