diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2012-08-04 07:47:22 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2012-08-04 07:47:22 (GMT) |
commit | ef03a2c7809309b2255f7c82c6abe0db2e4160bf (patch) | |
tree | fd7b6368f954a4c1a95289f5dc388a409605c11c /generic/tclClock.c | |
parent | bf9624b12a9e6fe010e025b8f76d3e29c8399725 (diff) | |
parent | 24ef33dc101a3e9114318b884c1e99d792f4739d (diff) | |
download | tcl-ef03a2c7809309b2255f7c82c6abe0db2e4160bf.zip tcl-ef03a2c7809309b2255f7c82c6abe0db2e4160bf.tar.gz tcl-ef03a2c7809309b2255f7c82c6abe0db2e4160bf.tar.bz2 |
merge trunk
Diffstat (limited to 'generic/tclClock.c')
-rw-r--r-- | generic/tclClock.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/generic/tclClock.c b/generic/tclClock.c index 7fa4017..6d2976d 100644 --- a/generic/tclClock.c +++ b/generic/tclClock.c @@ -878,8 +878,8 @@ ConvertLocalToUTCUsingC( if (localErrno != 0 || (fields->seconds == -1 && timeVal.tm_yday == -1)) { - Tcl_SetResult(interp, "time value too large/small to represent", - TCL_STATIC); + Tcl_SetObjResult(interp, Tcl_NewStringObj( + "time value too large/small to represent", -1)); return TCL_ERROR; } return TCL_OK; @@ -1018,17 +1018,17 @@ ConvertUTCToLocalUsingC( tock = (time_t) fields->seconds; if ((Tcl_WideInt) tock != fields->seconds) { - Tcl_AppendResult(interp, - "number too large to represent as a Posix time", NULL); + Tcl_SetObjResult(interp, Tcl_NewStringObj( + "number too large to represent as a Posix time", -1)); Tcl_SetErrorCode(interp, "CLOCK", "argTooLarge", NULL); return TCL_ERROR; } TzsetIfNecessary(); timeVal = ThreadSafeLocalTime(&tock); if (timeVal == NULL) { - Tcl_AppendResult(interp, + Tcl_SetObjResult(interp, Tcl_NewStringObj( "localtime failed (clock value may be too " - "large/small to represent)", NULL); + "large/small to represent)", -1)); Tcl_SetErrorCode(interp, "CLOCK", "localtimeFailed", NULL); return TCL_ERROR; } |