diff options
author | dgp <dgp@users.sourceforge.net> | 2017-11-09 14:44:57 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2017-11-09 14:44:57 (GMT) |
commit | 29dda71bad5e67eb3ada1ce9f836ca43bde1c216 (patch) | |
tree | 967b1560c397b13b2394f8090b166f5b813325e2 /generic/tclExecute.c | |
parent | 42764c99bec23aaae227ff1aba60c1ff9e7d9230 (diff) | |
parent | 0faadee83ceeb72ae3634429f88f0defcb607169 (diff) | |
download | tcl-29dda71bad5e67eb3ada1ce9f836ca43bde1c216.zip tcl-29dda71bad5e67eb3ada1ce9f836ca43bde1c216.tar.gz tcl-29dda71bad5e67eb3ada1ce9f836ca43bde1c216.tar.bz2 |
merge trunk
Diffstat (limited to 'generic/tclExecute.c')
-rw-r--r-- | generic/tclExecute.c | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/generic/tclExecute.c b/generic/tclExecute.c index 68056c6..46bcb8c 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -1277,12 +1277,12 @@ TclStackAlloc( int numBytes) { Interp *iPtr = (Interp *) interp; - int numWords = (numBytes + (sizeof(Tcl_Obj *) - 1))/sizeof(Tcl_Obj *); + int numWords; if (iPtr == NULL || iPtr->execEnvPtr == NULL) { return (void *) ckalloc(numBytes); } - + numWords = (numBytes + (sizeof(Tcl_Obj *) - 1))/sizeof(Tcl_Obj *); return (void *) StackAllocWords(interp, numWords); } @@ -9272,16 +9272,7 @@ IllegalExprOperandType( } if (GetNumberFromObj(NULL, opndPtr, &ptr, &type) != TCL_OK) { - int numBytes; - const char *bytes = TclGetStringFromObj(opndPtr, &numBytes); - - if (numBytes == 0) { - description = "empty string"; - } else if (TclCheckBadOctal(NULL, bytes)) { - description = "invalid octal number"; - } else { - description = "non-numeric string"; - } + description = "non-numeric string"; } else if (type == TCL_NUMBER_NAN) { description = "non-numeric floating-point value"; } else if (type == TCL_NUMBER_DOUBLE) { @@ -9292,7 +9283,8 @@ IllegalExprOperandType( } Tcl_SetObjResult(interp, Tcl_ObjPrintf( - "can't use %s as operand of \"%s\"", description, operator)); + "can't use %s \"%s\" as operand of \"%s\"", description, + Tcl_GetString(opndPtr), operator)); Tcl_SetErrorCode(interp, "ARITH", "DOMAIN", description, NULL); } |