summaryrefslogtreecommitdiffstats
path: root/win/tkWinDialog.c
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2008-10-05 18:22:21 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2008-10-05 18:22:21 (GMT)
commit501d0b1523e4a2b370c58cd262bbed99725a5ab1 (patch)
tree57b5f8cd5ff8ef866da62495bc435946f4655c50 /win/tkWinDialog.c
parent291d618cfb6ad5e935244599abbf1bdb93a284fc (diff)
downloadtk-501d0b1523e4a2b370c58cd262bbed99725a5ab1.zip
tk-501d0b1523e4a2b370c58cd262bbed99725a5ab1.tar.gz
tk-501d0b1523e4a2b370c58cd262bbed99725a5ab1.tar.bz2
Greatly clean up Tk's handling of the writability of the Tcl result object.
Diffstat (limited to 'win/tkWinDialog.c')
-rw-r--r--win/tkWinDialog.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/win/tkWinDialog.c b/win/tkWinDialog.c
index 93d2d57..c55fb2a 100644
--- a/win/tkWinDialog.c
+++ b/win/tkWinDialog.c
@@ -8,7 +8,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkWinDialog.c,v 1.52 2008/04/27 22:39:14 dkf Exp $
+ * RCS: @(#) $Id: tkWinDialog.c,v 1.53 2008/10/05 18:22:22 dkf Exp $
*
*/
@@ -883,12 +883,13 @@ GetFileNameW(
int listObjc, count;
Tcl_Obj **listObjv = NULL;
Tcl_Obj **typeInfo = NULL;
+
if (Tcl_ListObjGetElements(interp, filterObj,
- &listObjc, &listObjv) != TCL_OK) {
+ &listObjc, &listObjv) != TCL_OK) {
result = TCL_ERROR;
} else if (Tcl_ListObjGetElements(interp,
- listObjv[ofn.nFilterIndex - 1],
- &count, &typeInfo) != TCL_OK) {
+ listObjv[ofn.nFilterIndex - 1], &count,
+ &typeInfo) != TCL_OK) {
result = TCL_ERROR;
} else {
Tcl_ObjSetVar2(interp, typeVariableObj, NULL, typeInfo[0], 0);
@@ -1332,12 +1333,13 @@ GetFileNameA(
int listObjc, count;
Tcl_Obj **listObjv = NULL;
Tcl_Obj **typeInfo = NULL;
- if (Tcl_ListObjGetElements(interp, filterObj,
- &listObjc, &listObjv) != TCL_OK) {
+
+ if (Tcl_ListObjGetElements(interp, filterObj, &listObjc,
+ &listObjv) != TCL_OK) {
result = TCL_ERROR;
} else if (Tcl_ListObjGetElements(interp,
- listObjv[ofn.nFilterIndex - 1],
- &count, &typeInfo) != TCL_OK) {
+ listObjv[ofn.nFilterIndex - 1], &count,
+ &typeInfo) != TCL_OK) {
result = TCL_ERROR;
} else {
Tcl_ObjSetVar2(interp, typeVariableObj, NULL, typeInfo[0], 0);