Change xkb_key_get_syms to just return a bare int Signed-off-by: Daniel Stone <daniel@fooishbar.org>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
diff --git a/include/xkbcommon/xkbcommon.h b/include/xkbcommon/xkbcommon.h
index d98daf8..541b571 100644
--- a/include/xkbcommon/xkbcommon.h
+++ b/include/xkbcommon/xkbcommon.h
@@ -416,7 +416,7 @@ xkb_state_update_key(struct xkb_state *state, xkb_keycode_t key,
*
* This should be called before xkb_state_update_key.
*/
-unsigned int
+int
xkb_key_get_syms(struct xkb_state *state, xkb_keycode_t key,
const xkb_keysym_t **syms_out);
diff --git a/src/map.c b/src/map.c
index 7d12765..fb005a5 100644
--- a/src/map.c
+++ b/src/map.c
@@ -295,7 +295,7 @@ xkb_key_get_group(struct xkb_state *state, xkb_keycode_t key)
/**
* As below, but takes an explicit group/level rather than state.
*/
-unsigned int
+int
xkb_key_get_syms_by_level(struct xkb_keymap *keymap, xkb_keycode_t key,
unsigned int group, unsigned int level,
const xkb_keysym_t **syms_out)
@@ -323,7 +323,7 @@ err:
* Provides the symbols to use for the given key and state. Returns the
* number of symbols pointed to in syms_out.
*/
-_X_EXPORT unsigned int
+_X_EXPORT int
xkb_key_get_syms(struct xkb_state *state, xkb_keycode_t key,
const xkb_keysym_t **syms_out)
{
diff --git a/src/xkb-priv.h b/src/xkb-priv.h
index b76b8c0..a7f5a70 100644
--- a/src/xkb-priv.h
+++ b/src/xkb-priv.h
@@ -449,7 +449,7 @@ extern unsigned int
xkb_key_get_level(struct xkb_state *state, xkb_keycode_t key,
unsigned int group);
-extern unsigned int
+extern int
xkb_key_get_syms_by_level(struct xkb_keymap *keymap, xkb_keycode_t key,
unsigned int group, unsigned int level,
const xkb_keysym_t **syms_out);