diff options
author | hobbs <hobbs@noemail.net> | 2006-05-30 00:29:37 (GMT) |
---|---|---|
committer | hobbs <hobbs@noemail.net> | 2006-05-30 00:29:37 (GMT) |
commit | a4da8e3864adc0522e32241d3bbd2cc65207ba86 (patch) | |
tree | 5dc7f5944e6aafb79bcc700a9d8a68c70ed0f096 | |
parent | 15af57c91d4a34a4545bfa29c338b110f9531c53 (diff) | |
download | tcl-a4da8e3864adc0522e32241d3bbd2cc65207ba86.zip tcl-a4da8e3864adc0522e32241d3bbd2cc65207ba86.tar.gz tcl-a4da8e3864adc0522e32241d3bbd2cc65207ba86.tar.bz2 |
* generic/tcl.h (Tcl_DecrRefCount): use if/else construct to allow
placement in unbraced outer if/else conditions. (jcw)
FossilOrigin-Name: 4bef433d451275ad5cf1d389396fb47244dadd66
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | generic/tcl.h | 7 |
2 files changed, 10 insertions, 2 deletions
@@ -1,3 +1,8 @@ +2006-05-29 Jeff Hobbs <jeffh@ActiveState.com> + + * generic/tcl.h (Tcl_DecrRefCount): use if/else construct to allow + placement in unbraced outer if/else conditions. (jcw) + 2006-05-27 Daniel Steffen <das@users.sourceforge.net> * 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 |