diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-09-20 21:44:53 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-09-20 21:44:53 (GMT) |
commit | 768db27d4cf58b78ffc5aa15b84392a4671fdae8 (patch) | |
tree | beb9c7bb38feb7c10a43ca87ee55cca236e6917b /generic/tclInt.h | |
parent | a9fc439a359b52924df081ed1215e11ae2237809 (diff) | |
parent | ebb520a84937f16bef1ffe4d56ed7f6f542eedc2 (diff) | |
download | tcl-768db27d4cf58b78ffc5aa15b84392a4671fdae8.zip tcl-768db27d4cf58b78ffc5aa15b84392a4671fdae8.tar.gz tcl-768db27d4cf58b78ffc5aa15b84392a4671fdae8.tar.bz2 |
Merge 8.7
Diffstat (limited to 'generic/tclInt.h')
-rw-r--r-- | generic/tclInt.h | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/generic/tclInt.h b/generic/tclInt.h index 04a1866..2e88348 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -4478,12 +4478,15 @@ MODULE_SCOPE void TclDbInitNewObj(Tcl_Obj *objPtr, const char *file, */ #define TclInvalidateStringRep(objPtr) \ - if ((objPtr)->bytes != NULL) { \ - if ((objPtr)->bytes != &tclEmptyString) { \ - Tcl_Free((objPtr)->bytes); \ + do { \ + Tcl_Obj *_isobjPtr = (Tcl_Obj *)(objPtr); \ + if (_isobjPtr->bytes != NULL) { \ + if (_isobjPtr->bytes != &tclEmptyString) { \ + Tcl_Free((char *)_isobjPtr->bytes); \ + } \ + _isobjPtr->bytes = NULL; \ } \ - (objPtr)->bytes = NULL; \ - } + } while (0) /* * These form part of the native filesystem support. They are needed here @@ -4510,7 +4513,8 @@ MODULE_SCOPE const TclFileAttrProcs tclpFileAttrProcs[]; *---------------------------------------------------------------- */ -#define TclHasStringRep(objPtr) ((objPtr)->bytes != NULL) +#define TclHasStringRep(objPtr) \ + ((objPtr)->bytes != NULL) /* *---------------------------------------------------------------- |