From aec2cb8f476764482a9061ea514f32ae532651a3 Mon Sep 17 00:00:00 2001 From: hobbs Date: Tue, 30 May 2006 00:29:37 +0000 Subject: * generic/tcl.h (Tcl_DecrRefCount): use if/else construct to allow placement in unbraced outer if/else conditions. (jcw) --- ChangeLog | 5 +++++ generic/tcl.h | 7 +++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index cea8037..e78d7f2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2006-05-29 Jeff Hobbs + + * generic/tcl.h (Tcl_DecrRefCount): use if/else construct to allow + placement in unbraced outer if/else conditions. (jcw) + 2006-05-27 Daniel Steffen * macosx/tclMacOSXNotify.c: implemented pthread_atfork() handler that diff --git a/generic/tcl.h b/generic/tcl.h index 50a2fa3..5d7f192 100644 --- a/generic/tcl.h +++ b/generic/tcl.h @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tcl.h,v 1.153.2.23 2006/05/04 13:09:16 dgp Exp $ + * RCS: @(#) $Id: tcl.h,v 1.153.2.24 2006/05/30 00:29:38 hobbs Exp $ */ #ifndef _TCL @@ -824,8 +824,11 @@ int Tcl_IsShared _ANSI_ARGS_((Tcl_Obj *objPtr)); #else # define Tcl_IncrRefCount(objPtr) \ ++(objPtr)->refCount + /* + * Use empty if ; else to handle use in unbraced outer if/else conditions + */ # define Tcl_DecrRefCount(objPtr) \ - if (--(objPtr)->refCount <= 0) TclFreeObj(objPtr) + if (--(objPtr)->refCount > 0) ; else TclFreeObj(objPtr) # define Tcl_IsShared(objPtr) \ ((objPtr)->refCount > 1) #endif -- cgit v0.12