summaryrefslogtreecommitdiffstats
path: root/generic/tclOOMethod.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/tclOOMethod.c')
-rw-r--r--generic/tclOOMethod.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/generic/tclOOMethod.c b/generic/tclOOMethod.c
index 9f5be6b..3b9e700 100644
--- a/generic/tclOOMethod.c
+++ b/generic/tclOOMethod.c
@@ -8,7 +8,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclOOMethod.c,v 1.26 2010/03/24 13:21:11 dkf Exp $
+ * RCS: @(#) $Id: tclOOMethod.c,v 1.27 2010/09/22 00:57:11 hobbs Exp $
*/
#ifdef HAVE_CONFIG_H
@@ -994,8 +994,10 @@ ProcedureMethodCompiledVarConnect(
CallContext *contextPtr;
Tcl_Obj *variableObj;
Tcl_HashEntry *hPtr;
- int i, isNew, cacheIt;
- const char *varName = Tcl_GetString(infoPtr->variableObj);
+ int i, isNew, cacheIt, varLen, len;
+ const char *match, *varName;
+
+ varName = TclGetStringFromObj(infoPtr->variableObj, &varLen);
/*
* Check that the variable is being requested in a context that is also a
@@ -1027,14 +1029,16 @@ ProcedureMethodCompiledVarConnect(
.mPtr->declaringClassPtr != NULL) {
FOREACH(variableObj, contextPtr->callPtr->chain[contextPtr->index]
.mPtr->declaringClassPtr->variables) {
- if (!strcmp(Tcl_GetString(variableObj), varName)) {
+ match = TclGetStringFromObj(variableObj, &len);
+ if ((len == varLen) && !memcmp(match, varName, len)) {
cacheIt = 0;
goto gotMatch;
}
}
} else {
FOREACH(variableObj, contextPtr->oPtr->variables) {
- if (!strcmp(Tcl_GetString(variableObj), varName)) {
+ match = TclGetStringFromObj(variableObj, &len);
+ if ((len == varLen) && !memcmp(match, varName, len)) {
cacheIt = 1;
goto gotMatch;
}