summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
authornijtmans <nijtmans>2008-11-18 23:49:42 (GMT)
committernijtmans <nijtmans>2008-11-18 23:49:42 (GMT)
commit00d49f9867cee2ccb0107d42c242542bb1724968 (patch)
tree977344186af30768099bdf29836d163bc796c6e0 /win
parentd9fafe1f52ff004f0ff69bd9c137f8ac0ffa1a85 (diff)
downloadtk-00d49f9867cee2ccb0107d42c242542bb1724968.zip
tk-00d49f9867cee2ccb0107d42c242542bb1724968.tar.gz
tk-00d49f9867cee2ccb0107d42c242542bb1724968.tar.bz2
Minor simplification in fix for [Bug 2312027]:
no need to malloc and copy photo type name because it is a constant to begin with. Convert Tcl_SetResult(......, TCL_DYNAMIC) to Tcl_SetResult(......, TCL_VOLATILE), in preparation for TIP #340
Diffstat (limited to 'win')
-rw-r--r--win/tkWinWm.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/win/tkWinWm.c b/win/tkWinWm.c
index 7660c04..8ffc4d5 100644
--- a/win/tkWinWm.c
+++ b/win/tkWinWm.c
@@ -12,7 +12,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkWinWm.c,v 1.132 2008/11/15 00:00:27 patthoyts Exp $
+ * RCS: @(#) $Id: tkWinWm.c,v 1.133 2008/11/18 23:49:42 nijtmans Exp $
*/
#include "tkWinInt.h"
@@ -3537,8 +3537,9 @@ WmCommandCmd(
}
if (objc == 3) {
if (wmPtr->cmdArgv != NULL) {
- Tcl_SetResult(interp,
- Tcl_Merge(wmPtr->cmdArgc, wmPtr->cmdArgv), TCL_DYNAMIC);
+ argv3 = Tcl_Merge(wmPtr->cmdArgc, wmPtr->cmdArgv);
+ Tcl_SetResult(interp, argv3, TCL_VOLATILE);
+ ckfree(argv3);
}
return TCL_OK;
}
@@ -3713,7 +3714,8 @@ WmForgetCmd(
/* Already not managed by wm - ignore it */
}
return TCL_OK;
-}
+}
+
/*
*----------------------------------------------------------------------
*