summaryrefslogtreecommitdiffstats
path: root/generic/tclOODefineCmds.c
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2018-05-19 08:38:42 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2018-05-19 08:38:42 (GMT)
commit27ac662b5e74d0413f18cb0f5181a3b06ce2f6c8 (patch)
tree449e70058f76d1d2909a2c38fab68a0858a24159 /generic/tclOODefineCmds.c
parent44d75f55ba0b0486342eb4d3e228b68dc6eef00d (diff)
downloadtcl-27ac662b5e74d0413f18cb0f5181a3b06ce2f6c8.zip
tcl-27ac662b5e74d0413f18cb0f5181a3b06ce2f6c8.tar.gz
tcl-27ac662b5e74d0413f18cb0f5181a3b06ce2f6c8.tar.bz2
Corrections for a number of small things to align with TIP
Diffstat (limited to 'generic/tclOODefineCmds.c')
-rw-r--r--generic/tclOODefineCmds.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/generic/tclOODefineCmds.c b/generic/tclOODefineCmds.c
index 403ed1a..7281d7a 100644
--- a/generic/tclOODefineCmds.c
+++ b/generic/tclOODefineCmds.c
@@ -1187,7 +1187,7 @@ TclOODefineSelfObjCmd(
{
Foundation *fPtr = TclOOGetFoundation(interp);
Object *oPtr;
- int result;
+ int result, private;
oPtr = (Object *) TclOOGetDefineCmdContext(interp);
if (oPtr == NULL) {
@@ -1199,6 +1199,8 @@ TclOODefineSelfObjCmd(
return TCL_OK;
}
+ private = IsPrivateDefine(interp);
+
/*
* Make the oo::objdefine namespace the current namespace and evaluate the
* command(s).
@@ -1207,6 +1209,9 @@ TclOODefineSelfObjCmd(
if (InitDefineContext(interp, fPtr->objdefNs, oPtr, objc,objv) != TCL_OK){
return TCL_ERROR;
}
+ if (private) {
+ ((Interp *) interp)->varFramePtr->isProcCallFrame = PRIVATE_FRAME;
+ }
AddRef(oPtr);
if (objc == 2) {
@@ -1298,9 +1303,9 @@ TclOODefinePrivateObjCmd(
if (oPtr == NULL) {
return TCL_ERROR;
}
- if (objc < 2) {
- Tcl_WrongNumArgs(interp, 1, objv, "definitionCommand ...");
- return TCL_ERROR;
+ if (objc == 1) {
+ Tcl_SetObjResult(interp, Tcl_NewBooleanObj(IsPrivateDefine(interp)));
+ return TCL_OK;
}
/*