diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2012-12-13 12:03:51 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2012-12-13 12:03:51 (GMT) |
commit | b9a522a6bf466ea2e0be03923be7029824ffb17b (patch) | |
tree | 8ff73a68779156be1ab89b42823c7662ccc51060 | |
parent | 2f1b92ba12fe6dcbad5a26a6dc6f6be837155049 (diff) | |
download | tcl-b9a522a6bf466ea2e0be03923be7029824ffb17b.zip tcl-b9a522a6bf466ea2e0be03923be7029824ffb17b.tar.gz tcl-b9a522a6bf466ea2e0be03923be7029824ffb17b.tar.bz2 |
Changelog entry, and change macro variable to not conflict with possible outside variable names
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | generic/tcl.h | 6 |
2 files changed, 8 insertions, 3 deletions
@@ -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-11-14 Donal K. Fellows <dkf@users.sf.net> * unix/tclUnixPipe.c (DefaultTempDir): [Bug 2933003]: Allow overriding diff --git a/generic/tcl.h b/generic/tcl.h index 48fe062..bf9b446 100644 --- a/generic/tcl.h +++ b/generic/tcl.h @@ -832,9 +832,9 @@ int Tcl_IsShared _ANSI_ARGS_((Tcl_Obj *objPtr)); */ # 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) \ |