diff options
author | dgp <dgp@users.sourceforge.net> | 2011-04-19 16:41:44 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2011-04-19 16:41:44 (GMT) |
commit | 17fd0d72e1e1ccc57fd32968b5b6ad84cb6f186e (patch) | |
tree | 11659488dc77c5048949c4942cbd1096cab5d79b /generic/tclConfig.c | |
parent | 52110fe64ab3669264a4b65bed6de20dc5ad0c38 (diff) | |
parent | 55d4ba1b0d34a24cb5581a496604c032f1c7b5da (diff) | |
download | tcl-17fd0d72e1e1ccc57fd32968b5b6ad84cb6f186e.zip tcl-17fd0d72e1e1ccc57fd32968b5b6ad84cb6f186e.tar.gz tcl-17fd0d72e1e1ccc57fd32968b5b6ad84cb6f186e.tar.bz2 |
Reduce internals access in the implementation of [<foo>::pkgconfig list].
Diffstat (limited to 'generic/tclConfig.c')
-rw-r--r-- | generic/tclConfig.c | 11 |
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); } } |