summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2020-09-20 21:39:02 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2020-09-20 21:39:02 (GMT)
commitebb520a84937f16bef1ffe4d56ed7f6f542eedc2 (patch)
tree1a2f23d6dc60a5fbe113158e5e941dde3a6a36ae
parent7f917c56f757a3a2724bc9f477a6d5c0395bcb57 (diff)
parent9e43cbb9739ecfd05d38ff31a49050a0eb04505b (diff)
downloadtcl-ebb520a84937f16bef1ffe4d56ed7f6f542eedc2.zip
tcl-ebb520a84937f16bef1ffe4d56ed7f6f542eedc2.tar.gz
tcl-ebb520a84937f16bef1ffe4d56ed7f6f542eedc2.tar.bz2
Merge 8.6
-rw-r--r--generic/tcl.h2
-rw-r--r--generic/tclInt.h16
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)
/*
*----------------------------------------------------------------