summaryrefslogtreecommitdiffstats
path: root/generic/tclOOBasic.c
diff options
context:
space:
mode:
authorpooryorick <com.digitalsmarties@pooryorick.com>2018-02-15 09:34:49 (GMT)
committerpooryorick <com.digitalsmarties@pooryorick.com>2018-02-15 09:34:49 (GMT)
commite16817b40903d522f5a911fde6e1640321e94e26 (patch)
tree5af11edf173ed20b90a23ae301b0acb9f8448311 /generic/tclOOBasic.c
parent03a4436237ea997e7a2992ca80c54848cefdb213 (diff)
downloadtcl-e16817b40903d522f5a911fde6e1640321e94e26.zip
tcl-e16817b40903d522f5a911fde6e1640321e94e26.tar.gz
tcl-e16817b40903d522f5a911fde6e1640321e94e26.tar.bz2
Add the check for wrong arguments back to TclOO_Object_Destroy, remove
inadvertant increment of Namespace->refCount.
Diffstat (limited to 'generic/tclOOBasic.c')
-rw-r--r--generic/tclOOBasic.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/generic/tclOOBasic.c b/generic/tclOOBasic.c
index 84f414d..b2c06a7 100644
--- a/generic/tclOOBasic.c
+++ b/generic/tclOOBasic.c
@@ -340,6 +340,11 @@ TclOO_Object_Destroy(
Object *oPtr = (Object *) Tcl_ObjectContextObject(context);
CallContext *contextPtr;
+ if (objc != Tcl_ObjectContextSkippedArgs(context)) {
+ Tcl_WrongNumArgs(interp, Tcl_ObjectContextSkippedArgs(context), objv,
+ NULL);
+ return TCL_ERROR;
+ }
if (!(oPtr->flags & DESTRUCTOR_CALLED)) {
oPtr->flags |= DESTRUCTOR_CALLED;
contextPtr = TclOOGetCallContext(oPtr, NULL, DESTRUCTOR, NULL);