summaryrefslogtreecommitdiffstats
path: root/generic/tclOOMethod.c
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2018-05-14 20:55:40 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2018-05-14 20:55:40 (GMT)
commitbd706be303307bc4bdeacf15c1af1a43f1585d6b (patch)
treef87d640e805454a2c847c8924004a30449d45d13 /generic/tclOOMethod.c
parent5eef06ea24f7486a2dcca559a64b3ec08f0c6710 (diff)
downloadtcl-bd706be303307bc4bdeacf15c1af1a43f1585d6b.zip
tcl-bd706be303307bc4bdeacf15c1af1a43f1585d6b.tar.gz
tcl-bd706be303307bc4bdeacf15c1af1a43f1585d6b.tar.bz2
Make sure that [self call] reports useful info.
Diffstat (limited to 'generic/tclOOMethod.c')
-rw-r--r--generic/tclOOMethod.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/generic/tclOOMethod.c b/generic/tclOOMethod.c
index 82204f1..9bc9daa 100644
--- a/generic/tclOOMethod.c
+++ b/generic/tclOOMethod.c
@@ -188,6 +188,9 @@ Tcl_NewInstanceMethod(
if (flags) {
mPtr->flags |= flags &
(PUBLIC_METHOD | PRIVATE_METHOD | TRUE_PRIVATE_METHOD);
+ if (flags & TRUE_PRIVATE_METHOD) {
+ oPtr->flags |= HAS_PRIVATE_METHODS;
+ }
}
oPtr->epoch++;
return (Tcl_Method) mPtr;
@@ -253,6 +256,9 @@ Tcl_NewMethod(
if (flags) {
mPtr->flags |= flags &
(PUBLIC_METHOD | PRIVATE_METHOD | TRUE_PRIVATE_METHOD);
+ if (flags & TRUE_PRIVATE_METHOD) {
+ clsPtr->flags |= HAS_PRIVATE_METHODS;
+ }
}
return (Tcl_Method) mPtr;