summaryrefslogtreecommitdiffstats
path: root/generic/tkPack.c
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2008-11-08 22:52:29 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2008-11-08 22:52:29 (GMT)
commit6bb91a5313a57dceb34e2cd3764971af61368408 (patch)
tree307fda8121ab3396f4464ecccf7f5167defc07dd /generic/tkPack.c
parentb2576f90de3e5a4860a8c5d13b864ee10225f5d6 (diff)
downloadtk-6bb91a5313a57dceb34e2cd3764971af61368408.zip
tk-6bb91a5313a57dceb34e2cd3764971af61368408.tar.gz
tk-6bb91a5313a57dceb34e2cd3764971af61368408.tar.bz2
More small changes to use C89 better and manage the result more efficiently.
Diffstat (limited to 'generic/tkPack.c')
-rw-r--r--generic/tkPack.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/generic/tkPack.c b/generic/tkPack.c
index 42fe12b..2233a9f 100644
--- a/generic/tkPack.c
+++ b/generic/tkPack.c
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkPack.c,v 1.30 2008/10/28 22:33:06 nijtmans Exp $
+ * RCS: @(#) $Id: tkPack.c,v 1.31 2008/11/08 22:52:29 dkf Exp $
*/
#include "tkInt.h"
@@ -407,6 +407,7 @@ Tk_PackObjCmd(
case PACK_SLAVES: {
Tk_Window master;
Packer *masterPtr, *slavePtr;
+ Tcl_Obj *resultObj;
if (objc != 3) {
Tcl_WrongNumArgs(interp, 2, objv, "window");
@@ -415,11 +416,14 @@ Tk_PackObjCmd(
if (TkGetWindowFromObj(interp, tkwin, objv[2], &master) != TCL_OK) {
return TCL_ERROR;
}
+ resultObj = Tcl_NewObj();
masterPtr = GetPacker(master);
for (slavePtr = masterPtr->slavePtr; slavePtr != NULL;
slavePtr = slavePtr->nextPtr) {
- Tcl_AppendElement(interp, Tk_PathName(slavePtr->tkwin));
+ Tcl_ListObjAppendElement(NULL, resultObj,
+ TkNewWindowObj(slavePtr->tkwin));
}
+ Tcl_SetObjResult(interp, resultObj);
break;
}
case PACK_UNPACK: {