summaryrefslogtreecommitdiffstats
path: root/generic/tclCmdMZ.c
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2013-09-08 14:59:41 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2013-09-08 14:59:41 (GMT)
commit1c05acb41bff9b5827c3ba1f58cc349bc1c8d9a3 (patch)
treec1457302f19e55a3dd912632f32afe12fe27c80c /generic/tclCmdMZ.c
parent53c609c3aa4042d00194dc6d3d2bea553ad9d605 (diff)
downloadtcl-1c05acb41bff9b5827c3ba1f58cc349bc1c8d9a3.zip
tcl-1c05acb41bff9b5827c3ba1f58cc349bc1c8d9a3.tar.gz
tcl-1c05acb41bff9b5827c3ba1f58cc349bc1c8d9a3.tar.bz2
*BACKPORT* [3600057]: Filled out missing parts of implementation of [string is double]. bug_3600057_85
DGP - I'm pretty sure this patch is the Wrong Thing (TM) to do. Push over to a branch until we can mutually examine it.
Diffstat (limited to 'generic/tclCmdMZ.c')
-rw-r--r--generic/tclCmdMZ.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/generic/tclCmdMZ.c b/generic/tclCmdMZ.c
index 6fd468c..5db4b5b 100644
--- a/generic/tclCmdMZ.c
+++ b/generic/tclCmdMZ.c
@@ -1512,14 +1512,14 @@ StringIsCmd(
case STR_IS_DIGIT:
chcomp = Tcl_UniCharIsDigit;
break;
- case STR_IS_DOUBLE: {
- /* TODO */
+ case STR_IS_DOUBLE:
if ((objPtr->typePtr == &tclDoubleType) ||
- (objPtr->typePtr == &tclIntType) ||
+ (objPtr->bytes == NULL &&
+ ((objPtr->typePtr == &tclIntType) ||
#ifndef NO_WIDE_TYPE
(objPtr->typePtr == &tclWideIntType) ||
#endif
- (objPtr->typePtr == &tclBignumType)) {
+ (objPtr->typePtr == &tclBignumType)))) {
break;
}
string1 = TclGetStringFromObj(objPtr, &length1);
@@ -1531,7 +1531,7 @@ StringIsCmd(
}
end = string1 + length1;
if (TclParseNumber(NULL, objPtr, NULL, NULL, -1,
- (const char **) &stop, 0) != TCL_OK) {
+ (const char **) &stop, TCL_PARSE_DECIMAL_ONLY) != TCL_OK) {
result = 0;
failat = 0;
} else {
@@ -1543,7 +1543,6 @@ StringIsCmd(
}
}
break;
- }
case STR_IS_GRAPH:
chcomp = Tcl_UniCharIsGraph;
break;