diff options
author | nijtmans <nijtmans> | 2009-12-16 22:00:30 (GMT) |
---|---|---|
committer | nijtmans <nijtmans> | 2009-12-16 22:00:30 (GMT) |
commit | 5a94ed5e36c396971c0dc7a1c193c734c799233c (patch) | |
tree | 8230caa2b08bf3c9ea41bd365636a69852c3c8a1 /generic/tkUtil.c | |
parent | 4e49c034fea39f59a67ca7461b12f3d936aa5f95 (diff) | |
download | tk-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/tkUtil.c')
-rw-r--r-- | generic/tkUtil.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/generic/tkUtil.c b/generic/tkUtil.c index e43613e..81ec092 100644 --- a/generic/tkUtil.c +++ b/generic/tkUtil.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: tkUtil.c,v 1.31 2009/11/21 17:24:42 dkf Exp $ + * RCS: @(#) $Id: tkUtil.c,v 1.32 2009/12/16 22:00:31 nijtmans Exp $ */ #include "tkInt.h" @@ -856,14 +856,14 @@ TkComputeAnchor( *--------------------------------------------------------------------------- */ -char * +const char * TkFindStateString( const TkStateMap *mapPtr, /* The state table. */ int numKey) /* The key to try to find in the table. */ { for (; mapPtr->strKey!=NULL ; mapPtr++) { if (numKey == mapPtr->numKey) { - return (char *) mapPtr->strKey; + return mapPtr->strKey; } } return NULL; |