summaryrefslogtreecommitdiffstats
path: root/generic/tclOODefineCmds.c
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2010-03-04 23:42:52 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2010-03-04 23:42:52 (GMT)
commit8a4b2ce65944b09d87fb02f51dc1ac2346ac9c72 (patch)
tree7df7890a99597754e9b18126fc1ce888486901de /generic/tclOODefineCmds.c
parentf9102947da376b595e386d9bc0e443bf45b39110 (diff)
downloadtcl-8a4b2ce65944b09d87fb02f51dc1ac2346ac9c72.zip
tcl-8a4b2ce65944b09d87fb02f51dc1ac2346ac9c72.tar.gz
tcl-8a4b2ce65944b09d87fb02f51dc1ac2346ac9c72.tar.bz2
Fix [Bug 2962664] by forcing oo::object deletion on oo::class deletion.
Diffstat (limited to 'generic/tclOODefineCmds.c')
-rw-r--r--generic/tclOODefineCmds.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/generic/tclOODefineCmds.c b/generic/tclOODefineCmds.c
index 2fb9ce5..ad088af 100644
--- a/generic/tclOODefineCmds.c
+++ b/generic/tclOODefineCmds.c
@@ -9,7 +9,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclOODefineCmds.c,v 1.11 2009/05/04 17:39:51 dkf Exp $
+ * RCS: @(#) $Id: tclOODefineCmds.c,v 1.12 2010/03/04 23:42:54 dkf Exp $
*/
#ifdef HAVE_CONFIG_H
@@ -1043,12 +1043,12 @@ TclOODefineClassObjCmd(
if (oPtr == NULL) {
return TCL_ERROR;
}
- if (oPtr == fPtr->objectCls->thisPtr) {
+ if (oPtr->flags & ROOT_OBJECT) {
Tcl_AppendResult(interp,
- "may not modify the class of the root object", NULL);
+ "may not modify the class of the root object class", NULL);
return TCL_ERROR;
}
- if (oPtr == fPtr->classCls->thisPtr) {
+ if (oPtr->flags & ROOT_CLASS) {
Tcl_AppendResult(interp,
"may not modify the class of the class of classes", NULL);
return TCL_ERROR;
@@ -1679,7 +1679,7 @@ TclOODefineSuperclassObjCmd(
NULL);
return TCL_ERROR;
}
- if (oPtr == fPtr->objectCls->thisPtr) {
+ if (oPtr->flags & ROOT_OBJECT) {
Tcl_AppendResult(interp,
"may not modify the superclass of the root object", NULL);
return TCL_ERROR;