summaryrefslogtreecommitdiffstats
path: root/generic/tcl.h
diff options
context:
space:
mode:
authorhobbs <hobbs>2006-05-30 00:29:37 (GMT)
committerhobbs <hobbs>2006-05-30 00:29:37 (GMT)
commit25de471fe95c99c2a07ea97c5b26c0326b2a5400 (patch)
tree5dc7f5944e6aafb79bcc700a9d8a68c70ed0f096 /generic/tcl.h
parentd9fb2d616e85d1da1ad401a0c964dc9c56e85ee8 (diff)
downloadtcl-25de471fe95c99c2a07ea97c5b26c0326b2a5400.zip
tcl-25de471fe95c99c2a07ea97c5b26c0326b2a5400.tar.gz
tcl-25de471fe95c99c2a07ea97c5b26c0326b2a5400.tar.bz2
* generic/tcl.h (Tcl_DecrRefCount): use if/else construct to allow
placement in unbraced outer if/else conditions. (jcw)
Diffstat (limited to 'generic/tcl.h')
-rw-r--r--generic/tcl.h7
1 files changed, 5 insertions, 2 deletions
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