diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2012-03-28 13:30:53 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2012-03-28 13:30:53 (GMT) |
commit | 3ca91bcffca105a9023965df4a51a84ece77d737 (patch) | |
tree | 35f8922b46b33a26720eca7b667c6aed392e90a3 /generic/tclOOBasic.c | |
parent | e77556d943f0e745bb066779d9f775c92a281142 (diff) | |
parent | 1251bcbcc6272da5c31c077c03ce238cfde19844 (diff) | |
download | tcl-3ca91bcffca105a9023965df4a51a84ece77d737.zip tcl-3ca91bcffca105a9023965df4a51a84ece77d737.tar.gz tcl-3ca91bcffca105a9023965df4a51a84ece77d737.tar.bz2 |
merge trunk
Diffstat (limited to 'generic/tclOOBasic.c')
-rw-r--r-- | generic/tclOOBasic.c | 9 |
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; } |