summaryrefslogtreecommitdiffstats
path: root/generic/tclCmdMZ.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/tclCmdMZ.c')
-rw-r--r--generic/tclCmdMZ.c25
1 files changed, 12 insertions, 13 deletions
diff --git a/generic/tclCmdMZ.c b/generic/tclCmdMZ.c
index 0af8133..f140f3c 100644
--- a/generic/tclCmdMZ.c
+++ b/generic/tclCmdMZ.c
@@ -635,8 +635,7 @@ Tcl_RegsubObjCmd(
for (p = wfirstChar = wstring; wstring < wend; wstring++) {
if ((*wstring == *wsrc ||
(nocase && Tcl_UniCharToLower(*wstring)==wsrclc)) &&
- (slen==1 || (strCmpFn(wstring, wsrc,
- (size_t)slen) == 0))) {
+ (slen==1 || (strCmpFn(wstring, wsrc, slen) == 0))) {
if (numMatches == 0) {
resultPtr = Tcl_NewUnicodeObj(wstring, 0);
Tcl_IncrRefCount(resultPtr);
@@ -1430,7 +1429,7 @@ StringIndexCmd(
return TCL_ERROR;
}
- if ((index != TCL_INDEX_NONE) && ((size_t)index + 1 <= end + 1)) {
+ if ((index != TCL_INDEX_NONE) && (index + 1 <= end + 1)) {
int ch = Tcl_GetUniChar(objv[1], index);
if (ch == -1) {
@@ -1645,9 +1644,9 @@ StringIsCmd(
chcomp = Tcl_UniCharIsDigit;
break;
case STR_IS_DOUBLE: {
- if (Tcl_FetchIntRep(objPtr, &tclDoubleType) ||
- Tcl_FetchIntRep(objPtr, &tclIntType) ||
- Tcl_FetchIntRep(objPtr, &tclBignumType)) {
+ if ((objPtr->typePtr == &tclDoubleType) ||
+ (objPtr->typePtr == &tclIntType) ||
+ (objPtr->typePtr == &tclBignumType)) {
break;
}
string1 = TclGetStringFromObj(objPtr, &length1);
@@ -1676,8 +1675,8 @@ StringIsCmd(
break;
case STR_IS_INT:
case STR_IS_ENTIER:
- if (Tcl_FetchIntRep(objPtr, &tclIntType) ||
- Tcl_FetchIntRep(objPtr, &tclBignumType)) {
+ if ((objPtr->typePtr == &tclIntType) ||
+ (objPtr->typePtr == &tclBignumType)) {
break;
}
string1 = TclGetStringFromObj(objPtr, &length1);
@@ -1941,7 +1940,7 @@ StringMapCmd(
const char *string = TclGetStringFromObj(objv[1], &length2);
if ((length2 > 1) &&
- strncmp(string, "-nocase", (size_t) length2) == 0) {
+ strncmp(string, "-nocase", length2) == 0) {
nocase = 1;
} else {
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
@@ -1958,7 +1957,7 @@ StringMapCmd(
*/
if (!TclHasStringRep(objv[objc-2])
- && Tcl_FetchIntRep(objv[objc-2], &tclDictType)){
+ && (objv[objc-2]->typePtr == &tclDictType)){
int i, done;
Tcl_DictSearch search;
@@ -4062,7 +4061,7 @@ Tcl_TimeObjCmd(
* Use int obj since we know time is not fractional. [Bug 1202178]
*/
- objs[0] = Tcl_NewWideIntObj((count <= 0) ? 0 : (Tcl_WideInt) totalMicroSec);
+ objs[0] = Tcl_NewWideIntObj((count <= 0) ? 0 : (Tcl_WideInt)totalMicroSec);
} else {
objs[0] = Tcl_NewDoubleObj(totalMicroSec/count);
}
@@ -4201,7 +4200,7 @@ TclNRTryObjCmd(
if (Tcl_ListObjLength(NULL, objv[i+1], &dummy) != TCL_OK) {
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
"bad prefix '%s': must be a list",
- Tcl_GetString(objv[i+1])));
+ TclGetString(objv[i+1])));
Tcl_DecrRefCount(handlersObj);
Tcl_SetErrorCode(interp, "TCL", "OPERATION", "TRY", "TRAP",
"EXNFORMAT", NULL);
@@ -4740,7 +4739,7 @@ TclListLines(
Tcl_Obj *const *elems) /* The list elems as Tcl_Obj*, in need of
* derived continuation data */
{
- const char *listStr = Tcl_GetString(listObj);
+ const char *listStr = TclGetString(listObj);
const char *listHead = listStr;
int i, length = strlen(listStr);
const char *element = NULL, *next = NULL;