diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2017-02-06 15:47:58 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2017-02-06 15:47:58 (GMT) |
commit | 52bf831c6efbe07bbd9be26d8fce5425e6abffd0 (patch) | |
tree | 9097a72140f28ac4330f969468d6a7aaca813f75 /generic/tclLink.c | |
parent | 169653275a82146f105fc2bec920801cdec15ee1 (diff) | |
parent | f3ca0e45dc4faf67ceb9d9cab12b06ca7ed60a6b (diff) | |
download | tcl-52bf831c6efbe07bbd9be26d8fce5425e6abffd0.zip tcl-52bf831c6efbe07bbd9be26d8fce5425e6abffd0.tar.gz tcl-52bf831c6efbe07bbd9be26d8fce5425e6abffd0.tar.bz2 |
merge trunk
Diffstat (limited to 'generic/tclLink.c')
-rw-r--r-- | generic/tclLink.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/generic/tclLink.c b/generic/tclLink.c index a708668..55e88e5 100644 --- a/generic/tclLink.c +++ b/generic/tclLink.c @@ -706,7 +706,7 @@ GetInvalidIntFromObj(Tcl_Obj *objPtr, int *intPtr) /* * This function checks for double representations, which are valid * when linking with C variables, but which are invalid in other - * contexts in Tcl. Handled are booleans, ".", "0x", "0b" and "0o" + * contexts in Tcl. Handled are booleans, "", ".", "0x", "0b" and "0o" * (upper- and lowercase) and sequences like "1e-". See bug [39f6304c2e]. */ int @@ -716,14 +716,14 @@ GetInvalidDoubleFromObj(Tcl_Obj *objPtr, int intValue; if (objPtr->typePtr == &invalidRealType) { - *doublePtr = objPtr->internalRep.doubleValue; - return TCL_OK; + goto gotdouble; } if (GetInvalidIntFromObj(objPtr, &intValue) == TCL_OK) { *doublePtr = (double) intValue; return TCL_OK; } if (SetInvalidRealFromAny(NULL, objPtr) == TCL_OK) { + gotdouble: *doublePtr = objPtr->internalRep.doubleValue; return TCL_OK; } |