Index: generic/nsfStack.c =================================================================== diff -u -rb876f2df8715159b566727e3c240b5bcca7bacab -re3b809c0e845559a101259fd00e04c017f43e999 --- generic/nsfStack.c (.../nsfStack.c) (revision b876f2df8715159b566727e3c240b5bcca7bacab) +++ generic/nsfStack.c (.../nsfStack.c) (revision e3b809c0e845559a101259fd00e04c017f43e999) @@ -859,7 +859,7 @@ * track class activations */ if (cl && cmd) { - Namespace *nsPtr = ((Command *)cmd)->nsPtr; + Tcl_Namespace *nsPtr = Tcl_Command_nsPtr(cmd); cl->object.activationCount ++; /*fprintf(stderr, "CscInit %s %s activationCount %d cmd %s cmd ns %p (%s, refCount %d ++) " "obj ns %p parent %p\n", @@ -872,7 +872,7 @@ * Incremement the namespace ptr in case Tcl tries to delete * this namespace during the invocation */ - nsPtr->refCount ++; + NSNamespacePreserve(nsPtr); } } @@ -961,7 +961,7 @@ tracking activations of classes */ if (cscPtr->cl) { - Namespace *nsPtr = cscPtr->cmdPtr ? ((Command *)(cscPtr->cmdPtr))->nsPtr : NULL; + Tcl_Namespace *nsPtr = cscPtr->cmdPtr ? Tcl_Command_nsPtr(cscPtr->cmdPtr) : NULL; object = &cscPtr->cl->object; object->activationCount --;