summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2012-12-29 00:06:42 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2012-12-29 00:06:42 (GMT)
commit7523143f3e7c3a026b3addb99bfeb70dd9adaff5 (patch)
treec00473569b5930ba5e86eaaddd2546cfbc8f5010
parentac61536f6a47bcbaa93399b81a184f647d62a259 (diff)
downloadtcl-7523143f3e7c3a026b3addb99bfeb70dd9adaff5.zip
tcl-7523143f3e7c3a026b3addb99bfeb70dd9adaff5.tar.gz
tcl-7523143f3e7c3a026b3addb99bfeb70dd9adaff5.tar.bz2
For Tcl9, do a real Tcl_DecrRefCountbug_3598580
-rw-r--r--generic/tclListObj.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/generic/tclListObj.c b/generic/tclListObj.c
index 97e7152..5b73a155 100644
--- a/generic/tclListObj.c
+++ b/generic/tclListObj.c
@@ -907,7 +907,11 @@ Tcl_ListObjReplace(
listRepPtr = AttemptNewList(interp, newMax, NULL);
if (listRepPtr == NULL) {
for (i = 0; i < objc; i++) {
+#if TCL_MAJOR_VERSION > 8
+ Tcl_DecrRefCount(objv[i]);
+#else
objv[i]->refCount--;
+#endif
}
return TCL_ERROR;
}