summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2011-04-19 16:41:44 (GMT)
committerdgp <dgp@users.sourceforge.net>2011-04-19 16:41:44 (GMT)
commit980848953d6ba3f3a77f271d6ca7149bc7cb9730 (patch)
tree11659488dc77c5048949c4942cbd1096cab5d79b /generic
parent1ba0761f8a75067fc5f6f597b7a80bd8ab395587 (diff)
parentbb5c4230ac4a9acd532eae83581c1c64a2137dd1 (diff)
downloadtcl-980848953d6ba3f3a77f271d6ca7149bc7cb9730.zip
tcl-980848953d6ba3f3a77f271d6ca7149bc7cb9730.tar.gz
tcl-980848953d6ba3f3a77f271d6ca7149bc7cb9730.tar.bz2
Reduce internals access in the implementation of [<foo>::pkgconfig list].
Diffstat (limited to 'generic')
-rw-r--r--generic/tclConfig.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/generic/tclConfig.c b/generic/tclConfig.c
index 8f60b02..b4735e8 100644
--- a/generic/tclConfig.c
+++ b/generic/tclConfig.c
@@ -277,18 +277,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);
}
}