summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--generic/tclCompCmds.c11
-rw-r--r--generic/tclProc.c4
2 files changed, 7 insertions, 8 deletions
diff --git a/generic/tclCompCmds.c b/generic/tclCompCmds.c
index d8f0aeb..fa192ef 100644
--- a/generic/tclCompCmds.c
+++ b/generic/tclCompCmds.c
@@ -3441,10 +3441,10 @@ TclPushVarName(
/*
* last char is ')' => potential array reference.
*/
- last = Tcl_UtfPrev(name + nameLen, name);
+ last = &name[nameLen-1];
if (*last == ')') {
- for (p = name; p < last; p = Tcl_UtfNext(p)) {
+ for (p = name; p < last; p++) {
if (*p == '(') {
elName = p + 1;
elNameLen = last - elName;
@@ -3472,15 +3472,14 @@ TclPushVarName(
} else if (interp && ((n = varTokenPtr->numComponents) > 1)
&& (varTokenPtr[1].type == TCL_TOKEN_TEXT)
&& (varTokenPtr[n].type == TCL_TOKEN_TEXT)
- && (*((p = varTokenPtr[n].start + varTokenPtr[n].size)-1) == ')')
- && (*Tcl_UtfPrev(p, varTokenPtr[n].start) == ')')) {
+ && (*(varTokenPtr[n].start + varTokenPtr[n].size - 1) == ')')) {
/*
* Check for parentheses inside first token.
*/
simpleVarName = 0;
for (p = varTokenPtr[1].start,
- last = p + varTokenPtr[1].size; p < last; p = Tcl_UtfNext(p)) {
+ last = p + varTokenPtr[1].size; p < last; p++) {
if (*p == '(') {
simpleVarName = 1;
break;
@@ -3548,7 +3547,7 @@ TclPushVarName(
int hasNsQualifiers = 0;
- for (p = name, last = p + nameLen-1; p < last; p = Tcl_UtfNext(p)) {
+ for (p = name, last = p + nameLen-1; p < last; p++) {
if ((*p == ':') && (*(p+1) == ':')) {
hasNsQualifiers = 1;
break;
diff --git a/generic/tclProc.c b/generic/tclProc.c
index f050d54..7be1fb7 100644
--- a/generic/tclProc.c
+++ b/generic/tclProc.c
@@ -511,7 +511,7 @@ TclCreateProc(
*/
argnamei = argname;
- argnamelast = Tcl_UtfPrev(argname + nameLength, argname);
+ argnamelast = (nameLength > 0) ? (argname + nameLength - 1) : argname;
while (argnamei < argnamelast) {
if (*argnamei == '(') {
if (*argnamelast == ')') { /* We have an array element. */
@@ -532,7 +532,7 @@ TclCreateProc(
"FORMALARGUMENTFORMAT", NULL);
goto procError;
}
- argnamei = Tcl_UtfNext(argnamei);
+ argnamei++;
}
if (precompiled) {