summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--generic/tcl.h6
2 files changed, 8 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 9beccc7..87f0260 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2012-12-13 Jan Nijtmans <nijtmans@users.sf.net>
+
+ * generic/tcl.h: Fix Tcl_DecrRefCount macro such that it
+ doesn't access its objPtr parameter twice any more.
+
2012-12-10 Donal K. Fellows <dkf@users.sf.net>
* tools/tcltk-man2html.tcl (plus-pkgs): Increased robustness of
diff --git a/generic/tcl.h b/generic/tcl.h
index 5a85c33..129a044 100644
--- a/generic/tcl.h
+++ b/generic/tcl.h
@@ -2502,9 +2502,9 @@ EXTERN void Tcl_GetMemoryInfo(Tcl_DString *dsPtr);
*/
# define Tcl_DecrRefCount(objPtr) \
do { \
- Tcl_Obj *obj = (objPtr); \
- if ((obj)->refCount-- < 2) { \
- TclFreeObj(obj); \
+ Tcl_Obj *_objPtr = (objPtr); \
+ if (_objPtr->refCount-- < 2) { \
+ TclFreeObj(_objPtr); \
} \
} while(0)
# define Tcl_IsShared(objPtr) \