summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2012-12-13 12:09:21 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2012-12-13 12:09:21 (GMT)
commite1c8f78ed0b89df2af160895d4fca6d630815c2a (patch)
treebc481384d1bfa0258ec498009f7f2f9297e82f17
parenteb7f17ba98bd89105f743da8af3037728027b4de (diff)
parentb9a522a6bf466ea2e0be03923be7029824ffb17b (diff)
downloadtcl-e1c8f78ed0b89df2af160895d4fca6d630815c2a.zip
tcl-e1c8f78ed0b89df2af160895d4fca6d630815c2a.tar.gz
tcl-e1c8f78ed0b89df2af160895d4fca6d630815c2a.tar.bz2
Changelog entry, and change macro variable to not conflict with possible outside variable names
-rw-r--r--ChangeLog5
-rw-r--r--generic/tcl.h6
2 files changed, 8 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 25691fa..a9b9d57 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-07 Jan Nijtmans <nijtmans@users.sf.net>
* unix/dltest/pkgb.c: Turn pkgb.so into a Tcl9 interoperability test
diff --git a/generic/tcl.h b/generic/tcl.h
index b253db7..7a21590 100644
--- a/generic/tcl.h
+++ b/generic/tcl.h
@@ -2313,9 +2313,9 @@ EXTERN void Tcl_GetMemoryInfo _ANSI_ARGS_((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) \