diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2014-04-10 07:57:18 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2014-04-10 07:57:18 (GMT) |
commit | da36dfe69e58aec61afac3c396af8cf6107b0ff1 (patch) | |
tree | 4024d6f9c7a4cfea5f3e7bb8d7b9617cd5b05c19 | |
parent | c46faeda6e6c7c35ff2ec921585fe63ea854f432 (diff) | |
download | tcl-da36dfe69e58aec61afac3c396af8cf6107b0ff1.zip tcl-da36dfe69e58aec61afac3c396af8cf6107b0ff1.tar.gz tcl-da36dfe69e58aec61afac3c396af8cf6107b0ff1.tar.bz2 |
Fix bug [e663138a06]: Test failures in "string is"
-rw-r--r-- | generic/tclExecute.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/generic/tclExecute.c b/generic/tclExecute.c index 41730d3..6394a60 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -5990,6 +5990,15 @@ TEBCresume( if (GetNumberFromObj(NULL, OBJ_AT_TOS, &ptr1, &type1) != TCL_OK) { type1 = 0; } +#ifndef TCL_WIDE_INT_IS_LONG + else if (type1 == TCL_NUMBER_WIDE) { + /** See bug [e663138a06] */ + Tcl_WideInt value = (OBJ_AT_TOS)->internalRep.wideValue; + if ((-value <= ULONG_MAX) && (value <= ULONG_MAX)) { + type1 = TCL_NUMBER_LONG; + } + } +#endif TclNewIntObj(objResultPtr, type1); TRACE(("\"%.20s\" => %d\n", O2S(OBJ_AT_TOS), type1)); NEXT_INST_F(1, 1, 1); |