Index: generic/nsf.c =================================================================== diff -u -rc0828ca7faac0ea7ebf189685a47c3163e966f7a -r46e91441fa18c0dbcabc216779c00c607740a883 --- generic/nsf.c (.../nsf.c) (revision c0828ca7faac0ea7ebf189685a47c3163e966f7a) +++ generic/nsf.c (.../nsf.c) (revision 46e91441fa18c0dbcabc216779c00c607740a883) @@ -427,7 +427,6 @@ static int MethodSourceMatches(int withSource, NsfClass *cl, NsfObject *object); static NsfObjectOpt *NsfRequireObjectOpt(NsfObject *object) nonnull(1) returns_nonnull; -static NsfClassOpt * NsfRequireClassOpt(/*@notnull@*/ NsfClass *cl) nonnull(1) returns_nonnull; static int ObjectSystemsCheckSystemMethod(Tcl_Interp *interp, CONST char *methodName, NsfObject *object, unsigned int flags) @@ -4148,7 +4147,7 @@ } -static NsfClassOpt * +NsfClassOpt * NsfRequireClassOpt(/*@notnull@*/ NsfClass *cl) { assert(cl); @@ -18724,16 +18723,24 @@ } } - if (clopt) { + if (clopt != NULL) { /* * Remove this class from all isClassMixinOf lists and clear the * class mixin list */ - if (clopt->classMixins) RemoveFromClassMixinsOf(clopt->id, clopt->classMixins); + if (clopt->classMixins) { + RemoveFromClassMixinsOf(clopt->id, clopt->classMixins); + } CmdListFree(&clopt->classMixins, GuardDel); CmdListFree(&clopt->classFilters, GuardDel); + if (clopt->mixinRegObjs != NULL) { + NsfMixinregInvalidate(interp, clopt->mixinRegObjs); + DECR_REF_COUNT2("mixinRegObjs", clopt->mixinRegObjs); + clopt->mixinRegObjs = NULL; + } + if (!recreate) { /* * Remove this class from all mixin lists and clear the isObjectMixinOf list @@ -18805,9 +18812,9 @@ MEM_COUNT_FREE("Tcl_InitHashTable", &cl->instances); } - if ((clopt) && (!recreate)) { + if (clopt != NULL && recreate == 0) { FREE(NsfClassOpt, clopt); - cl->opt = 0; + cl->opt = NULL; } if (subClasses) { @@ -26770,8 +26777,8 @@ int canFree; } NsfParamWrapper; -static Tcl_DupInternalRepProc ParamDupInteralRep; -static Tcl_FreeInternalRepProc ParamFreeInternalRep; +static Tcl_DupInternalRepProc ParamDupInteralRep; +static Tcl_FreeInternalRepProc ParamFreeInternalRep; static Tcl_UpdateStringProc ParamUpdateString; static void ParamUpdateString(Tcl_Obj *objPtr) nonnull(1);