Index: TODO =================================================================== diff -u -rc95e8ce3d63c826e5d706b55acb3be94cb8edcde -r177fdf89cda99d37b8466278d953c0532df95a50 --- TODO (.../TODO) (revision c95e8ce3d63c826e5d706b55acb3be94cb8edcde) +++ TODO (.../TODO) (revision 177fdf89cda99d37b8466278d953c0532df95a50) @@ -2856,14 +2856,14 @@ * added profiling support for nsf::proc when NSF_INVOKE_SHADOWED_TRADITIONAL is turned off. - - removal of unneeded flags "-incontext" and "-nomixins" from * /obj/ info methods * /cls/ info methods These flags are correct for "info lookup", but unneeded for "info methods" -+ cleanup of ListDefinedMethods() +- cleanup of ListDefinedMethods() +- nsf.c: use NsfObjectRefCountIncr() instead of object->refCount++ TODO: - add explicit regression tests for disposition + types Index: generic/nsf.c =================================================================== diff -u -rc95e8ce3d63c826e5d706b55acb3be94cb8edcde -r177fdf89cda99d37b8466278d953c0532df95a50 --- generic/nsf.c (.../nsf.c) (revision c95e8ce3d63c826e5d706b55acb3be94cb8edcde) +++ generic/nsf.c (.../nsf.c) (revision 177fdf89cda99d37b8466278d953c0532df95a50) @@ -856,7 +856,8 @@ #if defined(NSFOBJ_TRACE) # define NsfObjectRefCountIncr(obj) \ ((NsfObject *)obj)->refCount++; \ - fprintf(stderr, "RefCountIncr %p count=%d %s\n", obj, ((NsfObject *)obj)->refCount, ((NsfObject *)obj)->cmdName?ObjStr(((NsfObject *)obj)->cmdName):"no name"); \ + fprintf(stderr, "RefCountIncr %p count=%d %s\n", obj, ((NsfObject *)obj)->refCount, \ + ((NsfObject *)obj)->cmdName?ObjStr(((NsfObject *)obj)->cmdName):"no name"); \ MEM_COUNT_ALLOC("NsfObject RefCount", obj) # define NsfObjectRefCountDecr(obj) \ (obj)->refCount--; \ @@ -4381,7 +4382,7 @@ * from Tcl. We make sure via refcounting that the object * structure is kept until after DeleteCommandFromToken(). */ - object->refCount ++; + NsfObjectRefCountIncr(object); PrimitiveDestroy(object); @@ -8845,7 +8846,7 @@ * this function. */ INCR_REF_COUNT(cmdName); - object->refCount ++; + NsfObjectRefCountIncr(object); /*fprintf(stderr, "obj refCount of %p after incr %d (ObjectDispatch) %s\n", object,object->refCount, methodName);*/ @@ -12747,7 +12748,7 @@ * Make sure, the object survives initialization; the initcmd might * destroy it. */ - object->refCount ++; + NsfObjectRefCountIncr(object); /* * call configure method