summaryrefslogtreecommitdiffstats
path: root/generic/tclOOBasic.c
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2012-03-26 12:51:15 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2012-03-26 12:51:15 (GMT)
commitd23835257d7cdbf7c914e23117f34386a03420f4 (patch)
tree1db6e1428e872a9de7d6e17956bad4dcfeeba688 /generic/tclOOBasic.c
parent1ca58edee5cf1e80b4755b2cb99c405bcd1dac67 (diff)
downloadtcl-d23835257d7cdbf7c914e23117f34386a03420f4.zip
tcl-d23835257d7cdbf7c914e23117f34386a03420f4.tar.gz
tcl-d23835257d7cdbf7c914e23117f34386a03420f4.tar.bz2
Implementation of TIP #380
Diffstat (limited to 'generic/tclOOBasic.c')
-rw-r--r--generic/tclOOBasic.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/generic/tclOOBasic.c b/generic/tclOOBasic.c
index b286088..329f0a4 100644
--- a/generic/tclOOBasic.c
+++ b/generic/tclOOBasic.c
@@ -281,6 +281,7 @@ TclOO_Object_Destroy(
contextPtr->skip = 0;
TclNRAddCallback(interp, AfterNRDestructor, contextPtr,
NULL, NULL, NULL);
+ TclPushTailcallPoint(interp);
return TclOOInvokeContext(contextPtr, interp, 0, NULL);
}
}
@@ -434,8 +435,14 @@ TclOO_Object_Unknown(
const char **methodNames;
int numMethodNames, i, skip = Tcl_ObjectContextSkippedArgs(context);
+ /*
+ * If no method name, generate an error asking for a method name. (Only by
+ * overriding *this* method can an object handle the absence of a method
+ * name without an error).
+ */
+
if (objc < skip+1) {
- Tcl_WrongNumArgs(interp, skip, objv, "methodName ?arg ...?");
+ Tcl_WrongNumArgs(interp, skip, objv, "method ?arg ...?");
return TCL_ERROR;
}