summaryrefslogtreecommitdiffstats
path: root/generic/tkBind.c
diff options
context:
space:
mode:
authornijtmans <nijtmans>2009-12-16 22:00:30 (GMT)
committernijtmans <nijtmans>2009-12-16 22:00:30 (GMT)
commit5a94ed5e36c396971c0dc7a1c193c734c799233c (patch)
tree8230caa2b08bf3c9ea41bd365636a69852c3c8a1 /generic/tkBind.c
parent4e49c034fea39f59a67ca7461b12f3d936aa5f95 (diff)
downloadtk-5a94ed5e36c396971c0dc7a1c193c734c799233c.zip
tk-5a94ed5e36c396971c0dc7a1c193c734c799233c.tar.gz
tk-5a94ed5e36c396971c0dc7a1c193c734c799233c.tar.bz2
CONSTify return values of TkKeysymToString,
TkFindStateString, TkpGetString, TkpGetChar, which are all not supposed to be modified by the caller. In tkUtil.c this gets rid of a dangerous type cast.
Diffstat (limited to 'generic/tkBind.c')
-rw-r--r--generic/tkBind.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/generic/tkBind.c b/generic/tkBind.c
index c460a8c..2277917 100644
--- a/generic/tkBind.c
+++ b/generic/tkBind.c
@@ -11,7 +11,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkBind.c,v 1.57 2009/08/24 00:54:42 das Exp $
+ * RCS: @(#) $Id: tkBind.c,v 1.58 2009/12/16 22:00:31 nijtmans Exp $
*/
#include "tkInt.h"
@@ -2532,7 +2532,7 @@ ExpandPercents(
goto doNumber;
case 'K':
if (flags & KEY) {
- char *name = TkKeysymToString(keySym);
+ const char *name = TkKeysymToString(keySym);
if (name != NULL) {
string = name;
@@ -4504,7 +4504,7 @@ GetPatternString(
if (patPtr->detail.clientData != 0) {
if ((patPtr->eventType == KeyPress)
|| (patPtr->eventType == KeyRelease)) {
- char *string = TkKeysymToString(patPtr->detail.keySym);
+ const char *string = TkKeysymToString(patPtr->detail.keySym);
if (string != NULL) {
Tcl_DStringAppend(dsPtr, string, -1);
@@ -4599,7 +4599,7 @@ TkStringToKeysym(
*----------------------------------------------------------------------
*/
-char *
+const char *
TkKeysymToString(
KeySym keysym)
{