diff options
| -rw-r--r-- | generic/tcl.h | 2 | ||||
| -rw-r--r-- | generic/tclInt.h | 16 |
2 files changed, 11 insertions, 7 deletions
diff --git a/generic/tcl.h b/generic/tcl.h index 65169c0..e76eb58 100644 --- a/generic/tcl.h +++ b/generic/tcl.h @@ -2479,7 +2479,7 @@ EXTERN int TclZipfs_AppHook(int *argc, char ***argv); # define Tcl_DecrRefCount(objPtr) \ do { \ Tcl_Obj *_objPtr = (objPtr); \ - if ((_objPtr)->refCount-- <= 1) { \ + if (_objPtr->refCount-- <= 1) { \ TclFreeObj(_objPtr); \ } \ } while(0) diff --git a/generic/tclInt.h b/generic/tclInt.h index a5e8122..9dde88b 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -4518,12 +4518,15 @@ MODULE_SCOPE void TclDbInitNewObj(Tcl_Obj *objPtr, const char *file, */ #define TclInvalidateStringRep(objPtr) \ - if ((objPtr)->bytes != NULL) { \ - if ((objPtr)->bytes != &tclEmptyString) { \ - ckfree((objPtr)->bytes); \ + do { \ + Tcl_Obj *_isobjPtr = (Tcl_Obj *)(objPtr); \ + if (_isobjPtr->bytes != NULL) { \ + if (_isobjPtr->bytes != &tclEmptyString) { \ + ckfree((char *)_isobjPtr->bytes); \ + } \ + _isobjPtr->bytes = NULL; \ } \ - (objPtr)->bytes = NULL; \ - } + } while (0) /* * These form part of the native filesystem support. They are needed here @@ -4550,7 +4553,8 @@ MODULE_SCOPE const TclFileAttrProcs tclpFileAttrProcs[]; *---------------------------------------------------------------- */ -#define TclHasStringRep(objPtr) ((objPtr)->bytes != NULL) +#define TclHasStringRep(objPtr) \ + ((objPtr)->bytes != NULL) /* *---------------------------------------------------------------- |
