summaryrefslogtreecommitdiffstats
path: root/generic/tclEnsemble.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2023-05-31 14:12:12 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2023-05-31 14:12:12 (GMT)
commitc8ff4cae81a4a80f22f1b6ceb2475b2483e31592 (patch)
treeeddeeae749b9dd0ae9e14f643e0c4e0d5bf77f7e /generic/tclEnsemble.c
parentb87d0095dc09d7d1fc1dc4b000f3ed0141aa8b6a (diff)
downloadtcl-c8ff4cae81a4a80f22f1b6ceb2475b2483e31592.zip
tcl-c8ff4cae81a4a80f22f1b6ceb2475b2483e31592.tar.gz
tcl-c8ff4cae81a4a80f22f1b6ceb2475b2483e31592.tar.bz2
Use TclDuplicatePureObj() in stead of TclListObjCopy() where appropriate. Backported from 9.0
Diffstat (limited to 'generic/tclEnsemble.c')
-rw-r--r--generic/tclEnsemble.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/generic/tclEnsemble.c b/generic/tclEnsemble.c
index b946a84..610198c 100644
--- a/generic/tclEnsemble.c
+++ b/generic/tclEnsemble.c
@@ -1900,7 +1900,11 @@ NsEnsembleImplementationCmdNR(
TclListObjLengthM(NULL, prefixObj, &prefixObjc);
if (objc == 2) {
- copyPtr = TclListObjCopy(NULL, prefixObj);
+ copyPtr = TclDuplicatePureObj(
+ interp, prefixObj, &tclListType);
+ if (!copyPtr) {
+ return TCL_ERROR;
+ }
} else {
copyPtr = Tcl_NewListObj(objc - 2 + prefixObjc, NULL);
Tcl_ListObjAppendList(NULL, copyPtr, prefixObj);