proper constness
This commit is contained in:
parent
d3ff019f53
commit
c6b2272564
2 changed files with 3 additions and 3 deletions
|
@ -156,7 +156,7 @@ translation_fail:
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
const gchar *translate_keycode(guint keycode)
|
gchar *translate_keycode(guint keycode)
|
||||||
{
|
{
|
||||||
KeySym sym;
|
KeySym sym;
|
||||||
const gchar *ret = NULL;
|
const gchar *ret = NULL;
|
||||||
|
@ -170,7 +170,7 @@ gunichar translate_unichar(guint keycode)
|
||||||
{
|
{
|
||||||
gunichar unikey = 0;
|
gunichar unikey = 0;
|
||||||
|
|
||||||
const char *key;
|
char *key;
|
||||||
if ((key = translate_keycode(keycode)) != NULL &&
|
if ((key = translate_keycode(keycode)) != NULL &&
|
||||||
/* don't accept keys that aren't a single letter, like "space" */
|
/* don't accept keys that aren't a single letter, like "space" */
|
||||||
key[1] == '\0')
|
key[1] == '\0')
|
||||||
|
|
|
@ -25,7 +25,7 @@ gboolean translate_button(const gchar *str, guint *state, guint *keycode);
|
||||||
gboolean translate_key(const gchar *str, guint *state, guint *keycode);
|
gboolean translate_key(const gchar *str, guint *state, guint *keycode);
|
||||||
|
|
||||||
/*! Give the string form of a keycode */
|
/*! Give the string form of a keycode */
|
||||||
const gchar *translate_keycode(guint keycode);
|
gchar *translate_keycode(guint keycode);
|
||||||
|
|
||||||
/*! Translate a keycode to the unicode character it represents */
|
/*! Translate a keycode to the unicode character it represents */
|
||||||
gunichar translate_unichar(guint keycode);
|
gunichar translate_unichar(guint keycode);
|
||||||
|
|
Loading…
Reference in a new issue