summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2016-03-27 17:07:50 (GMT)
committerdgp <dgp@users.sourceforge.net>2016-03-27 17:07:50 (GMT)
commita4022b83c14e2356f20cc5cc76377542ec121499 (patch)
treed47e4fe8b4ad66490dc50f85967d7b5f923a5a7f
parent22aae62e6348893ae6090252bd63d1db2b6248f7 (diff)
downloadtcl-a4022b83c14e2356f20cc5cc76377542ec121499.zip
tcl-a4022b83c14e2356f20cc5cc76377542ec121499.tar.gz
tcl-a4022b83c14e2356f20cc5cc76377542ec121499.tar.bz2
A few more easy conversions.
-rw-r--r--generic/tclClock.c2
-rw-r--r--generic/tclCmdMZ.c24
2 files changed, 13 insertions, 13 deletions
diff --git a/generic/tclClock.c b/generic/tclClock.c
index 949cb1c..a458cb9 100644
--- a/generic/tclClock.c
+++ b/generic/tclClock.c
@@ -438,7 +438,7 @@ ClockGetdatefieldsObjCmd(
* that it isn't.
*/
- if (objv[1]->typePtr == &tclBignumType) {
+ if (Tcl_FetchIntRep(objv[1], &tclBignumType)) {
Tcl_SetObjResult(interp, literals[LIT_INTEGER_VALUE_TOO_LARGE]);
return TCL_ERROR;
}
diff --git a/generic/tclCmdMZ.c b/generic/tclCmdMZ.c
index 02d050a..71e8555 100644
--- a/generic/tclCmdMZ.c
+++ b/generic/tclCmdMZ.c
@@ -1567,12 +1567,12 @@ StringIsCmd(
break;
case STR_IS_DOUBLE: {
/* TODO */
- if ((objPtr->typePtr == &tclDoubleType) ||
- (objPtr->typePtr == &tclIntType) ||
+ if (Tcl_FetchIntRep(objPtr, &tclDoubleType) ||
+ Tcl_FetchIntRep(objPtr, &tclIntType) ||
#ifndef TCL_WIDE_INT_IS_LONG
- (objPtr->typePtr == &tclWideIntType) ||
+ Tcl_FetchIntRep(objPtr, &tclWideIntType) ||
#endif
- (objPtr->typePtr == &tclBignumType)) {
+ Tcl_FetchIntRep(objPtr, &tclBignumType)) {
break;
}
string1 = TclGetStringFromObj(objPtr, &length1);
@@ -1605,11 +1605,11 @@ StringIsCmd(
}
goto failedIntParse;
case STR_IS_ENTIER:
- if ((objPtr->typePtr == &tclIntType) ||
+ if (Tcl_FetchIntRep(objPtr, &tclIntType) ||
#ifndef TCL_WIDE_INT_IS_LONG
- (objPtr->typePtr == &tclWideIntType) ||
+ Tcl_FetchIntRep(objPtr, &tclWideIntType) ||
#endif
- (objPtr->typePtr == &tclBignumType)) {
+ Tcl_FetchIntRep(objPtr, &tclBignumType)) {
break;
}
string1 = TclGetStringFromObj(objPtr, &length1);
@@ -1880,7 +1880,7 @@ StringMapCmd(
* inconsistencies (see test string-10.20 for illustration why!)
*/
- if (objv[objc-2]->typePtr == &tclDictType && objv[objc-2]->bytes == NULL){
+ if (Tcl_FetchIntRep(objv[objc-2], &tclDictType) && objv[objc-2]->bytes == NULL){
int i, done;
Tcl_DictSearch search;
@@ -2621,8 +2621,8 @@ StringEqualCmd(
string1 = (char *) Tcl_GetByteArrayFromObj(objv[0], &length1);
string2 = (char *) Tcl_GetByteArrayFromObj(objv[1], &length2);
strCmpFn = (strCmpFn_t) memcmp;
- } else if ((objv[0]->typePtr == &tclStringType)
- && (objv[1]->typePtr == &tclStringType)) {
+ } else if (Tcl_FetchIntRep(objv[0], &tclStringType)
+ && Tcl_FetchIntRep(objv[1], &tclStringType)) {
/*
* Do a unicode-specific comparison if both of the args are of String
* type. In benchmark testing this proved the most efficient check
@@ -2771,8 +2771,8 @@ StringCmpCmd(
string1 = (char *) Tcl_GetByteArrayFromObj(objv[0], &length1);
string2 = (char *) Tcl_GetByteArrayFromObj(objv[1], &length2);
strCmpFn = (strCmpFn_t) memcmp;
- } else if ((objv[0]->typePtr == &tclStringType)
- && (objv[1]->typePtr == &tclStringType)) {
+ } else if (Tcl_FetchIntRep(objv[0], &tclStringType)
+ && Tcl_FetchIntRep(objv[1], &tclStringType)) {
/*
* Do a unicode-specific comparison if both of the args are of String
* type. In benchmark testing this proved the most efficient check