summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2011-04-19 16:38:15 (GMT)
committerdgp <dgp@users.sourceforge.net>2011-04-19 16:38:15 (GMT)
commit55d4ba1b0d34a24cb5581a496604c032f1c7b5da (patch)
tree73eb6cc6deea46c3a2c7cc806eecad93e72a7434
parentfcbe7394ea753c7d82eeefb2a7874c00198136df (diff)
downloadtcl-55d4ba1b0d34a24cb5581a496604c032f1c7b5da.zip
tcl-55d4ba1b0d34a24cb5581a496604c032f1c7b5da.tar.gz
tcl-55d4ba1b0d34a24cb5581a496604c032f1c7b5da.tar.bz2
Reduce internals access in the implementation of [<foo>::pkgconfig list].
-rw-r--r--ChangeLog5
-rw-r--r--generic/tclConfig.c11
2 files changed, 8 insertions, 8 deletions
diff --git a/ChangeLog b/ChangeLog
index d55c35e..ddb6690 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2011-04-19 Don Porter <dgp@users.sourceforge.net>
+
+ * generic/tclConfig.c: Reduce internals access in the implementation
+ of [<foo>::pkgconfig list].
+
2011-04-18 Don Porter <dgp@users.sourceforge.net>
* generic/tclCmdIL.c: Use ListRepPtr(.) and other cleanup.
diff --git a/generic/tclConfig.c b/generic/tclConfig.c
index 2ba1bd2..251868e 100644
--- a/generic/tclConfig.c
+++ b/generic/tclConfig.c
@@ -273,18 +273,13 @@ QueryConfigObjCmd(
}
if (n) {
- List *listRepPtr = ListRepPtr(listPtr);
Tcl_DictSearch s;
- Tcl_Obj *key, **vals;
- int done, i = 0;
-
- listRepPtr->elemCount = n;
- vals = &listRepPtr->elements;
+ Tcl_Obj *key;
+ int done;
for (Tcl_DictObjFirst(interp, pkgDict, &s, &key, NULL, &done);
!done; Tcl_DictObjNext(&s, &key, NULL, &done)) {
- vals[i++] = key;
- Tcl_IncrRefCount(key);
+ Tcl_ListObjAppendElement(NULL, listPtr, key);
}
}