summaryrefslogtreecommitdiffstats
path: root/generic/tclOOScript.h
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2018-09-11 07:44:04 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2018-09-11 07:44:04 (GMT)
commit90e3bdc291f94c2e3ff1c4e5b0edb6e203966147 (patch)
treee69f3260c3e1813c3b0426461d0b09e4bb91d68a /generic/tclOOScript.h
parent4f178616784e701a7b93586556ffbf292dd173aa (diff)
downloadtcl-90e3bdc291f94c2e3ff1c4e5b0edb6e203966147.zip
tcl-90e3bdc291f94c2e3ff1c4e5b0edb6e203966147.tar.gz
tcl-90e3bdc291f94c2e3ff1c4e5b0edb6e203966147.tar.bz2
Simplify the slot resolution protocol
Diffstat (limited to 'generic/tclOOScript.h')
-rw-r--r--generic/tclOOScript.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/generic/tclOOScript.h b/generic/tclOOScript.h
index 5627bf8..2213ce3 100644
--- a/generic/tclOOScript.h
+++ b/generic/tclOOScript.h
@@ -151,25 +151,26 @@ static const char *tclOOSetupScript =
"\t\t\treturn $list\n"
"\t\t}\n"
"\t\tmethod -set args {\n"
-"\t\t\tset args [uplevel 1 [list [namespace which my] Resolve $args]]\n"
+"\t\t\tset my [namespace which my]\n"
+"\t\t\tset args [lmap a $args {uplevel 1 [list $my Resolve $a]}]\n"
"\t\t\ttailcall my Set $args\n"
"\t\t}\n"
"\t\tmethod -append args {\n"
"\t\t\tset my [namespace which my]\n"
-"\t\t\tset args [uplevel 1 [list $my Resolve $args]]\n"
+"\t\t\tset args [lmap a $args {uplevel 1 [list $my Resolve $a]}]\n"
"\t\t\tset current [uplevel 1 [list $my Get]]\n"
"\t\t\ttailcall my Set [list {*}$current {*}$args]\n"
"\t\t}\n"
"\t\tmethod -clear {} {tailcall my Set {}}\n"
"\t\tmethod -prepend args {\n"
"\t\t\tset my [namespace which my]\n"
-"\t\t\tset args [uplevel 1 [list $my Resolve $args]]\n"
+"\t\t\tset args [lmap a $args {uplevel 1 [list $my Resolve $a]}]\n"
"\t\t\tset current [uplevel 1 [list $my Get]]\n"
"\t\t\ttailcall my Set [list {*}$args {*}$current]\n"
"\t\t}\n"
"\t\tmethod -remove args {\n"
"\t\t\tset my [namespace which my]\n"
-"\t\t\tset args [uplevel 1 [list $my Resolve $args]]\n"
+"\t\t\tset args [lmap a $args {uplevel 1 [list $my Resolve $a]}]\n"
"\t\t\tset current [uplevel 1 [list $my Get]]\n"
"\t\t\ttailcall my Set [lmap val $current {\n"
"\t\t\t\tif {$val in $args} continue else {set val}\n"