Index: generic/nsf.c =================================================================== diff -u -rfdc8830eff0ef4987213bac5f99adbda08d87f81 -r884a4e033f0d9d93bf1e151dfe1be8cb074dad0f --- generic/nsf.c (.../nsf.c) (revision fdc8830eff0ef4987213bac5f99adbda08d87f81) +++ generic/nsf.c (.../nsf.c) (revision 884a4e033f0d9d93bf1e151dfe1be8cb074dad0f) @@ -4239,7 +4239,7 @@ * Variable resolvers * *********************************************************/ -#define FOR_COLON_RESOLVER(ptr) (*(ptr) == ':' && *(ptr+1) != ':') +#define FOR_COLON_RESOLVER(ptr) (*(ptr) == ':' && *((ptr)+1) != ':') /* *---------------------------------------------------------------------- @@ -21112,7 +21112,7 @@ */ #define SkipNonposParamDefs(cPtr) \ - for (; ++cPtr <= lastParamPtr && *cPtr->name == '-';) + for (; ++(cPtr) <= lastParamPtr && *(cPtr)->name == '-';) static int ArgumentParse(Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[], Index: generic/nsfAccessInt.h =================================================================== diff -u -rcaba76f5ac2943f5a3dfd33550cb578132f40c80 -r884a4e033f0d9d93bf1e151dfe1be8cb074dad0f --- generic/nsfAccessInt.h (.../nsfAccessInt.h) (revision caba76f5ac2943f5a3dfd33550cb578132f40c80) +++ generic/nsfAccessInt.h (.../nsfAccessInt.h) (revision 884a4e033f0d9d93bf1e151dfe1be8cb074dad0f) @@ -22,54 +22,54 @@ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. */ -#define Tcl_Interp_numLevels(interp) ((Interp *)interp)->numLevels -#define Tcl_Interp_framePtr(interp) ((Tcl_CallFrame *)((Interp *)interp)->framePtr) -#define Tcl_Interp_varFramePtr(interp) (((Interp *)interp)->varFramePtr) -#define Tcl_Interp_cmdFramePtr(interp) (((Interp *)interp)->cmdFramePtr) -#define Tcl_Interp_globalNsPtr(interp) ((Tcl_Namespace *)((Interp *)interp)->globalNsPtr) -#define Tcl_Interp_flags(interp) ((Interp *)interp)->flags -#define Tcl_Interp_threadId(interp) ((Interp *)interp)->threadId +#define Tcl_Interp_numLevels(interp) ((Interp *)(interp))->numLevels +#define Tcl_Interp_framePtr(interp) ((Tcl_CallFrame *)((Interp *)(interp))->framePtr) +#define Tcl_Interp_varFramePtr(interp) (((Interp *)(interp))->varFramePtr) +#define Tcl_Interp_cmdFramePtr(interp) (((Interp *)(interp))->cmdFramePtr) +#define Tcl_Interp_globalNsPtr(interp) ((Tcl_Namespace *)((Interp *)(interp))->globalNsPtr) +#define Tcl_Interp_flags(interp) ((Interp *)(interp))->flags +#define Tcl_Interp_threadId(interp) ((Interp *)(interp))->threadId -#define Tcl_CallFrame_callerPtr(cf) ((Tcl_CallFrame*)((CallFrame *)cf)->callerPtr) -#define Tcl_CallFrame_procPtr(cf) ((CallFrame *)cf)->procPtr -#define Tcl_CallFrame_varTablePtr(cf) ((CallFrame *)cf)->varTablePtr -#define Tcl_CallFrame_level(cf) ((CallFrame *)cf)->level -#define Tcl_CallFrame_isProcCallFrame(cf) ((CallFrame *)cf)->isProcCallFrame -#define Tcl_CallFrame_compiledLocals(cf) ((CallFrame *)cf)->compiledLocals -#define Tcl_CallFrame_numCompiledLocals(cf) ((CallFrame *)cf)->numCompiledLocals -#define Tcl_CallFrame_callerVarPtr(cf) ((Tcl_CallFrame*)((CallFrame *)cf)->callerVarPtr) -#define Tcl_CallFrame_objc(cf) ((CallFrame *)cf)->objc -#define Tcl_CallFrame_objv(cf) ((CallFrame *)cf)->objv -#define Tcl_CallFrame_clientData(cf) ((CallFrame *)cf)->clientData -#define Tcl_CallFrame_nsPtr(cf) ((Tcl_Namespace *)((CallFrame *)cf)->nsPtr) +#define Tcl_CallFrame_callerPtr(cf) ((Tcl_CallFrame*)((CallFrame *)(cf))->callerPtr) +#define Tcl_CallFrame_procPtr(cf) ((CallFrame *)(cf))->procPtr +#define Tcl_CallFrame_varTablePtr(cf) ((CallFrame *)(cf))->varTablePtr +#define Tcl_CallFrame_level(cf) ((CallFrame *)(cf))->level +#define Tcl_CallFrame_isProcCallFrame(cf) ((CallFrame *)(cf))->isProcCallFrame +#define Tcl_CallFrame_compiledLocals(cf) ((CallFrame *)(cf))->compiledLocals +#define Tcl_CallFrame_numCompiledLocals(cf) ((CallFrame *)(cf))->numCompiledLocals +#define Tcl_CallFrame_callerVarPtr(cf) ((Tcl_CallFrame*)((CallFrame *)(cf))->callerVarPtr) +#define Tcl_CallFrame_objc(cf) ((CallFrame *)(cf))->objc +#define Tcl_CallFrame_objv(cf) ((CallFrame *)(cf))->objv +#define Tcl_CallFrame_clientData(cf) ((CallFrame *)(cf))->clientData +#define Tcl_CallFrame_nsPtr(cf) ((Tcl_Namespace *)((CallFrame *)(cf))->nsPtr) -#define Tcl_Namespace_cmdTablePtr(nsPtr) &((Namespace *)nsPtr)->cmdTable -#define Tcl_Namespace_varTablePtr(nsPtr) &((Namespace *)nsPtr)->varTable -#define Tcl_Namespace_childTablePtr(nsPtr) &((Namespace *)nsPtr)->childTable -#define Tcl_Namespace_activationCount(nsPtr) ((Namespace *)nsPtr)->activationCount -#define Tcl_Namespace_deleteProc(nsPtr) ((Namespace *)nsPtr)->deleteProc -#define Tcl_Namespace_parentPtr(nsPtr) ((Namespace *)nsPtr)->parentPtr -#define Tcl_Namespace_commandPathLength(nsPtr) ((Namespace *)nsPtr)->commandPathLength -#define Tcl_Namespace_commandPathArray(nsPtr) ((Namespace *)nsPtr)->commandPathArray -#define Tcl_Namespace_refCount(nsPtr) ((Namespace *)nsPtr)->refCount -#define Tcl_Namespace_flags(nsPtr) ((Namespace *)nsPtr)->flags +#define Tcl_Namespace_cmdTablePtr(nsPtr) &((Namespace *)(nsPtr))->cmdTable +#define Tcl_Namespace_varTablePtr(nsPtr) &((Namespace *)(nsPtr))->varTable +#define Tcl_Namespace_childTablePtr(nsPtr) &((Namespace *)(nsPtr))->childTable +#define Tcl_Namespace_activationCount(nsPtr) ((Namespace *)(nsPtr))->activationCount +#define Tcl_Namespace_deleteProc(nsPtr) ((Namespace *)(nsPtr))->deleteProc +#define Tcl_Namespace_parentPtr(nsPtr) ((Namespace *)(nsPtr))->parentPtr +#define Tcl_Namespace_commandPathLength(nsPtr) ((Namespace *)(nsPtr))->commandPathLength +#define Tcl_Namespace_commandPathArray(nsPtr) ((Namespace *)(nsPtr))->commandPathArray +#define Tcl_Namespace_refCount(nsPtr) ((Namespace *)(nsPtr))->refCount +#define Tcl_Namespace_flags(nsPtr) ((Namespace *)(nsPtr))->flags -#define Tcl_Command_refCount(cmd) ((Command *)cmd)->refCount -#define Tcl_Command_cmdEpoch(cmd) ((Command *)cmd)->cmdEpoch -#define Tcl_Command_flags(cmd) ((Command *)cmd)->flags +#define Tcl_Command_refCount(cmd) ((Command *)(cmd))->refCount +#define Tcl_Command_cmdEpoch(cmd) ((Command *)(cmd))->cmdEpoch +#define Tcl_Command_flags(cmd) ((Command *)(cmd))->flags /* the following items could be obtained from Tcl_GetCommandInfoFromToken(cmd, infoPtr) */ -#define Tcl_Command_nsPtr(cmd) ((Tcl_Namespace*)(((Command *)cmd)->nsPtr)) -#define Tcl_Command_objProc(cmd) ((Command *)cmd)->objProc +#define Tcl_Command_nsPtr(cmd) ((Tcl_Namespace*)(((Command *)(cmd))->nsPtr)) +#define Tcl_Command_objProc(cmd) ((Command *)(cmd))->objProc #if defined(NRE) -# define Tcl_Command_nreProc(cmd) ((Command *)cmd)->nreProc +# define Tcl_Command_nreProc(cmd) ((Command *)(cmd))->nreProc #endif -#define Tcl_Command_objClientData(cmd) ((Command *)cmd)->objClientData -#define Tcl_Command_proc(cmd) ((Command *)cmd)->proc -#define Tcl_Command_clientData(cmd) ((Command *)cmd)->clientData -#define Tcl_Command_deleteProc(cmd) ((Command *)cmd)->deleteProc -#define Tcl_Command_deleteData(cmd) ((Command *)cmd)->deleteData +#define Tcl_Command_objClientData(cmd) ((Command *)(cmd))->objClientData +#define Tcl_Command_proc(cmd) ((Command *)(cmd))->proc +#define Tcl_Command_clientData(cmd) ((Command *)(cmd))->clientData +#define Tcl_Command_deleteProc(cmd) ((Command *)(cmd))->deleteProc +#define Tcl_Command_deleteData(cmd) ((Command *)(cmd))->deleteData /* * Var Reform Compatibility support. @@ -81,7 +81,7 @@ #define TclIsCompiledLocalArgument(compiledLocalPtr) ((compiledLocalPtr)->flags & VAR_ARGUMENT) #define TclIsCompiledLocalTemporary(compiledLocalPtr) ((compiledLocalPtr)->flags & VAR_TEMPORARY) -#define TclVarHashGetValue(hPtr) ((Var *) ((char *)hPtr - TclOffset(VarInHash, entry))) +#define TclVarHashGetValue(hPtr) ((Var *) ((char *)(hPtr) - TclOffset(VarInHash, entry))) #define TclVarHashGetKey(varPtr) (((VarInHash *)(varPtr))->entry.key.objPtr) #define TclVarHashTablePtr(varTablePtr) &(varTablePtr)->table #define TclVarValue(type, varPtr, field) (type *)(varPtr)->value.field Index: generic/nsfInt.h =================================================================== diff -u -ra7ab2109deda0d156ef74ecdae0c48b03c42ec17 -r884a4e033f0d9d93bf1e151dfe1be8cb074dad0f --- generic/nsfInt.h (.../nsfInt.h) (revision a7ab2109deda0d156ef74ecdae0c48b03c42ec17) +++ generic/nsfInt.h (.../nsfInt.h) (revision 884a4e033f0d9d93bf1e151dfe1be8cb074dad0f) @@ -102,9 +102,9 @@ #elif __GNUC_PREREQ(2, 7) # define UNUSED(x) UNUSED_ ## x __attribute__((unused)) #elif defined(__LCLINT__) -# define UNUSED(x) /*@unused@*/ x +# define UNUSED(x) /*@unused@*/ (x) #else -# define UNUSED(x) x +# define UNUSED(x) (x) #endif #if defined(NSF_DTRACE) @@ -114,11 +114,11 @@ # define NSF_DTRACE_OBJECT_ALLOC_ENABLED() unlikely(NSF_OBJECT_ALLOC_ENABLED()) # define NSF_DTRACE_OBJECT_FREE_ENABLED() unlikely(NSF_OBJECT_FREE_ENABLED()) # define NSF_DTRACE_CONFIGURE_PROBE_ENABLED() unlikely(NSF_CONFIGURE_PROBE_ENABLED()) -# define NSF_DTRACE_METHOD_ENTRY(a0, a1, a2, a3, a4) NSF_METHOD_ENTRY(a0, a1, a2, a3, a4) -# define NSF_DTRACE_METHOD_RETURN(a0, a1, a2, a3) NSF_METHOD_RETURN(a0, a1, a2, a3) -# define NSF_DTRACE_OBJECT_ALLOC(a0, a1) NSF_OBJECT_ALLOC(a0, a1) -# define NSF_DTRACE_OBJECT_FREE(a0, a1) NSF_OBJECT_FREE(a0, a1) -# define NSF_DTRACE_CONFIGURE_PROBE(a0, a1) NSF_CONFIGURE_PROBE(a0, a1) +# define NSF_DTRACE_METHOD_ENTRY(a0, a1, a2, a3, a4) NSF_METHOD_ENTRY((a0), (a1), (a2), (a3), (a4)) +# define NSF_DTRACE_METHOD_RETURN(a0, a1, a2, a3) NSF_METHOD_RETURN((a0), (a1), (a2), (a3)) +# define NSF_DTRACE_OBJECT_ALLOC(a0, a1) NSF_OBJECT_ALLOC((a0), (a1)) +# define NSF_DTRACE_OBJECT_FREE(a0, a1) NSF_OBJECT_FREE((a0), (a1)) +# define NSF_DTRACE_CONFIGURE_PROBE(a0, a1) NSF_CONFIGURE_PROBE((a0), (a1)) #else # define NSF_DTRACE_METHOD_ENTRY_ENABLED() 0 # define NSF_DTRACE_METHOD_RETURN_ENABLED() 0 @@ -152,8 +152,8 @@ int peak; int count; } NsfMemCounter; -# define MEM_COUNT_ALLOC(id,p) NsfMemCountAlloc(id, p) -# define MEM_COUNT_FREE(id,p) NsfMemCountFree(id, p) +# define MEM_COUNT_ALLOC(id,p) NsfMemCountAlloc((id), (p)) +# define MEM_COUNT_FREE(id,p) NsfMemCountFree((id), (p)) # define MEM_COUNT_INIT() NsfMemCountInit() # define MEM_COUNT_RELEASE() NsfMemCountRelease() #else @@ -163,55 +163,55 @@ # define MEM_COUNT_RELEASE() #endif -# define STRING_NEW(target, p, l) target = ckalloc(l+1); strncpy(target, p, l); *((target)+l) = '\0'; \ - MEM_COUNT_ALLOC(#target, target) -# define STRING_FREE(key, p) MEM_COUNT_FREE(key, p); ckfree((p)) +# define STRING_NEW(target, p, l) (target) = ckalloc((l)+1); strncpy((target), (p), (l)); *((target)+(l)) = '\0'; \ + MEM_COUNT_ALLOC(#target, (target)) +# define STRING_FREE(key, p) MEM_COUNT_FREE((key), (p)); ckfree((p)) -#define DSTRING_INIT(dsPtr) Tcl_DStringInit(dsPtr); MEM_COUNT_ALLOC("DString",dsPtr) +#define DSTRING_INIT(dsPtr) Tcl_DStringInit(dsPtr); MEM_COUNT_ALLOC("DString",(dsPtr)) #define DSTRING_FREE(dsPtr) \ - if ((dsPtr)->string != (dsPtr)->staticSpace) {Tcl_DStringFree(dsPtr);} MEM_COUNT_FREE("DString",dsPtr) + if ((dsPtr)->string != (dsPtr)->staticSpace) {Tcl_DStringFree(dsPtr);} MEM_COUNT_FREE("DString",(dsPtr)) #if USE_ASSOC_DATA # define RUNTIME_STATE(interp) ((NsfRuntimeState*)Tcl_GetAssocData((interp), "NsfRuntimeState", NULL)) #else # define RUNTIME_STATE(interp) ((NsfRuntimeState*)((Interp*)(interp))->globalNsPtr->clientData) #endif -#define nr_elements(arr) ((int) (sizeof(arr) / sizeof(arr[0]))) +#define nr_elements(arr) ((int) (sizeof(arr) / sizeof((arr)[0]))) # define NEW(type) \ - (type *)ckalloc(sizeof(type)); MEM_COUNT_ALLOC(#type, NULL) + (type *)ckalloc(sizeof(type)); MEM_COUNT_ALLOC(#type, NULL) # define NEW_ARRAY(type,n) \ - (type *)ckalloc(sizeof(type)*(n)); MEM_COUNT_ALLOC(#type "*", NULL) + (type *)ckalloc(sizeof(type)*(n)); MEM_COUNT_ALLOC(#type "*", NULL) # define FREE(type, var) \ - ckfree((char*) var); MEM_COUNT_FREE(#type,var) + ckfree((char*) (var)); MEM_COUNT_FREE(#type,(var)) -#define isAbsolutePath(m) (*m == ':' && m[1] == ':') +#define isAbsolutePath(m) (*(m) == ':' && (m)[1] == ':') #define isArgsString(m) (\ - *m == 'a' && m[1] == 'r' && m[2] == 'g' && m[3] == 's' && \ - m[4] == '\0') + *(m) == 'a' && (m)[1] == 'r' && (m)[2] == 'g' && (m)[3] == 's' && \ + (m)[4] == '\0') #define isBodyString(m) (\ - *m == 'b' && m[1] == 'o' && m[2] == 'd' && m[3] == 'y' && \ - m[4] == '\0') + *(m) == 'b' && (m)[1] == 'o' && (m)[2] == 'd' && (m)[3] == 'y' && \ + (m)[4] == '\0') #define isCheckString(m) (\ - *m == 'c' && m[1] == 'h' && m[2] == 'e' && m[3] == 'c' && \ - m[4] == 'k' && m[5] == '\0') + *(m) == 'c' && (m)[1] == 'h' && (m)[2] == 'e' && (m)[3] == 'c' && \ + (m)[4] == 'k' && (m)[5] == '\0') #define isCheckObjString(m) (\ - *m == 'c' && m[1] == 'h' && m[2] == 'e' && m[3] == 'c' && \ - m[4] == 'k' && m[5] == 'o' && m[6] == 'b' && m[7] == 'j' && \ - m[8] == '\0') + *(m) == 'c' && (m)[1] == 'h' && (m)[2] == 'e' && (m)[3] == 'c' && \ + (m)[4] == 'k' && (m)[5] == 'o' && (m)[6] == 'b' && (m)[7] == 'j' && \ + (m)[8] == '\0') #define isCreateString(m) (\ - *m == 'c' && m[1] == 'r' && m[2] == 'e' && m[3] == 'a' && \ - m[4] == 't' && m[5] == 'e' && m[6] == '\0') + *(m) == 'c' && (m)[1] == 'r' && (m)[2] == 'e' && (m)[3] == 'a' && \ + (m)[4] == 't' && (m)[5] == 'e' && (m)[6] == '\0') #define isTypeString(m) (\ - *m == 't' && m[1] == 'y' && m[2] == 'p' && m[3] == 'e' && \ - m[4] == '\0') + *(m) == 't' && (m)[1] == 'y' && (m)[2] == 'p' && (m)[3] == 'e' && \ + (m)[4] == '\0') #define isObjectString(m) (\ - *m == 'o' && m[1] == 'b' && m[2] == 'j' && m[3] == 'e' && \ - m[4] == 'c' && m[5] == 't' && m[6] == '\0') + *(m) == 'o' && (m)[1] == 'b' && (m)[2] == 'j' && (m)[3] == 'e' && \ + (m)[4] == 'c' && (m)[5] == 't' && (m)[6] == '\0') #define isClassString(m) (\ - *m == 'c' && m[1] == 'l' && m[2] == 'a' && m[3] == 's' && \ - m[4] == 's' && m[5] == '\0') + *(m) == 'c' && (m)[1] == 'l' && (m)[2] == 'a' && (m)[3] == 's' && \ + (m)[4] == 's' && (m)[5] == '\0') #if (defined(sun) || defined(__hpux)) && !defined(__GNUC__) # define USE_ALLOCA @@ -232,20 +232,20 @@ #if defined(__GNUC__) && !defined(USE_ALLOCA) && !defined(USE_MALLOC) # if !defined(NDEBUG) # define ALLOC_ON_STACK(type,n,var) \ - int __##var##_count = (n); type __##var[n+2]; \ - type *var = __##var + 1; var[-1] = var[__##var##_count] = (type)0xdeadbeaf + int __##var##_count = (n); type __##var[(n)+2]; \ + type *(var) = __##var + 1; (var)[-1] = var[__##var##_count] = (type)0xdeadbeaf # define FREE_ON_STACK(type,var) \ - assert(var[-1] == var[__##var##_count] && var[-1] == (type)0xdeadbeaf) + assert((var)[-1] == (var)[__##var##_count] && (var)[-1] == (type)0xdeadbeaf) # else -# define ALLOC_ON_STACK(type,n,var) type var[(n)] +# define ALLOC_ON_STACK(type,n,var) type (var)[(n)] # define FREE_ON_STACK(type,var) # endif #elif defined(USE_ALLOCA) -# define ALLOC_ON_STACK(type,n,var) type *var = (type *)alloca((n)*sizeof(type)) +# define ALLOC_ON_STACK(type,n,var) type *(var) = (type *)alloca((n)*sizeof(type)) # define FREE_ON_STACK(type,var) #else -# define ALLOC_ON_STACK(type,n,var) type *var = (type *)ckalloc((n)*sizeof(type)) -# define FREE_ON_STACK(type,var) ckfree((char*)var) +# define ALLOC_ON_STACK(type,n,var) type *(var) = (type *)ckalloc((n)*sizeof(type)) +# define FREE_ON_STACK(type,var) ckfree((char*)(var)) #endif #ifdef USE_ALLOCA @@ -254,12 +254,12 @@ #if !defined(NDEBUG) # if defined(PRE86) -# define ISOBJ(o) (o != NULL && o != (void*)0xdeadbeaf && (o->typePtr ? o->typePtr->name != NULL : 1) && o->length >= -1 && (o->length > 0 ? o->bytes!= NULL : 1) && o->refCount >= 0) +# define ISOBJ(o) ((o) != NULL && (o) != (void*)0xdeadbeaf && ((o)->typePtr ? (o)->typePtr->name != NULL : 1) && (o)->length >= -1 && ((o)->length > 0 ? (o)->bytes!= NULL : 1) && (o)->refCount >= 0) # else -# define ISOBJ(o) (o != NULL && o != (void*)0xdeadbeaf && (o->typePtr ? o->typePtr->name != NULL : 1) && (o->bytes != NULL ? o->length >= 0 : 1) && o->refCount >= 0) +# define ISOBJ(o) ((o) != NULL && (o) != (void*)0xdeadbeaf && ((o)->typePtr ? (o)->typePtr->name != NULL : 1) && ((o)->bytes != NULL ? (o)->length >= 0 : 1) && (o)->refCount >= 0) # endif #else -# define ISOBJ(o) (o != NULL) +# define ISOBJ(o) ((o) != NULL) #endif #define NSF_ABBREV_MIN_CHARS 4 @@ -275,22 +275,22 @@ #ifdef USE_TCL_STUBS # define DECR_REF_COUNT(A) \ - MEM_COUNT_FREE("INCR_REF_COUNT" #A,A); assert((A)->refCount > -1); \ - Tcl_DecrRefCount(A) + MEM_COUNT_FREE("INCR_REF_COUNT" #A,(A)); assert((A)->refCount > -1); \ + Tcl_DecrRefCount(A) # define DECR_REF_COUNT2(name,A) \ - MEM_COUNT_FREE("INCR_REF_COUNT-" name,A); assert((A)->refCount > -1); \ - Tcl_DecrRefCount(A) + MEM_COUNT_FREE("INCR_REF_COUNT-" (name),(A)); assert((A)->refCount > -1); \ + Tcl_DecrRefCount(A) #else # define DECR_REF_COUNT(A) \ - MEM_COUNT_FREE("INCR_REF_COUNT" #A,A); TclDecrRefCount(A) + MEM_COUNT_FREE("INCR_REF_COUNT" #A,(A)); TclDecrRefCount(A) # define DECR_REF_COUNT2(name,A) \ - MEM_COUNT_FREE("INCR_REF_COUNT-" name,A); TclDecrRefCount(A) + MEM_COUNT_FREE("INCR_REF_COUNT-" (name),(A)); TclDecrRefCount(A) #endif -#define INCR_REF_COUNT(A) MEM_COUNT_ALLOC("INCR_REF_COUNT"#A,A); Tcl_IncrRefCount(A) +#define INCR_REF_COUNT(A) MEM_COUNT_ALLOC("INCR_REF_COUNT"#A,(A)); Tcl_IncrRefCount((A)) #define INCR_REF_COUNT2(name,A) \ /*fprintf(stderr, "c '%s'\n", ObjStr(A));*/ \ - MEM_COUNT_ALLOC("INCR_REF_COUNT-" name,A); Tcl_IncrRefCount(A) + MEM_COUNT_ALLOC("INCR_REF_COUNT-" (name),(A)); Tcl_IncrRefCount((A)) #define ObjStr(obj) ((obj)->bytes) ? ((obj)->bytes) : Tcl_GetString(obj) #define ClassName(cl) (((cl) ? ObjStr((cl)->object.cmdName) : "NULL")) @@ -299,7 +299,7 @@ #ifdef OBJDELETION_TRACE # define PRINTOBJ(ctx,obj) \ fprintf(stderr, " %s %p %s oid=%p teardown=%p destroyCalled=%d\n", \ - ctx,obj,(obj)->teardown?ObjStr((obj)->cmdName):"(deleted)", \ + (ctx),(obj),(obj)->teardown?ObjStr((obj)->cmdName):"(deleted)", \ (obj)->id, (obj)->teardown, \ ((obj)->flags & NSF_DESTROY_CALLED)) #else @@ -1139,7 +1139,7 @@ */ #ifndef va_copy #ifdef __va_copy -#define va_copy(dest,src) __va_copy(dest,src) +#define va_copy(dest,src) __va_copy((dest),(src)) #else #define va_copy(dest,src) ((dest) = (src)) #endif