summaryrefslogtreecommitdiffstats
path: root/generic/tclClock.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2024-04-10 14:47:21 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2024-04-10 14:47:21 (GMT)
commit9ac22a9200db4d034922f3f15194cc1f3568e230 (patch)
treeece226b385bf0b07f5910bee412698ac534b425e /generic/tclClock.c
parentd30a8fa3d452bd96dd59335d6f94e12310ef8e3e (diff)
parentc6410375c4529e798dfdef177ee755680007fe58 (diff)
downloadtcl-9ac22a9200db4d034922f3f15194cc1f3568e230.zip
tcl-9ac22a9200db4d034922f3f15194cc1f3568e230.tar.gz
tcl-9ac22a9200db4d034922f3f15194cc1f3568e230.tar.bz2
Merge 8.6 Use TclHasInternalRep() macro in more places.
Diffstat (limited to 'generic/tclClock.c')
-rw-r--r--generic/tclClock.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/generic/tclClock.c b/generic/tclClock.c
index f79a5b4..100cfd6 100644
--- a/generic/tclClock.c
+++ b/generic/tclClock.c
@@ -3456,7 +3456,7 @@ ClockParseFmtScnArgs(
goto baseNow;
}
- if (baseObj->typePtr == &tclBignumType) {
+ if (TclHasInternalRep(baseObj, &tclBignumType)) {
goto baseOverflow;
}
@@ -3472,7 +3472,7 @@ ClockParseFmtScnArgs(
* Note the year is currently an integer, thus avoid to overflow it also.
*/
- if ( baseObj->typePtr == &tclBignumType
+ if (TclHasInternalRep(baseObj, &tclBignumType)
|| baseVal < TCL_MIN_SECONDS || baseVal > TCL_MAX_SECONDS
) {
baseOverflow:
@@ -4463,7 +4463,7 @@ ClockAddObjCmd(
&unitIndex) != TCL_OK) {
goto done;
}
- if (objv[i]->typePtr == &tclBignumType
+ if (TclHasInternalRep(objv[i], &tclBignumType)
|| offs > (unitIndex < CLC_ADD_HOURS ? 0x7fffffff : TCL_MAX_SECONDS)
|| offs < (unitIndex < CLC_ADD_HOURS ? -0x7fffffff : TCL_MIN_SECONDS)
) {