From c19661b965c0058a525f439abd7ac4c5a3532c7d Mon Sep 17 00:00:00 2001 From: Pekka Paalanen Date: Fri, 16 Dec 2011 12:52:00 +0000 Subject: [PATCH] Add xkbc_free_keymap helper Which just calls XkbcFreeKeyboard with the only arguments you'd ever pass it. Signed-off-by: Pekka Paalanen Signed-off-by: Daniel Stone --- include/X11/extensions/XKBcommon.h | 3 +++ src/xkbcomp/xkbcomp.c | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/include/X11/extensions/XKBcommon.h b/include/X11/extensions/XKBcommon.h index 4e6058c..b353759 100644 --- a/include/X11/extensions/XKBcommon.h +++ b/include/X11/extensions/XKBcommon.h @@ -795,6 +795,9 @@ xkb_compile_keymap_from_file(FILE *inputFile, const char *mapName); _X_EXPORT extern struct xkb_desc * xkb_compile_keymap_from_string(const char *string, const char *mapName); +_X_EXPORT extern void +xkb_free_keymap(struct xkb_desc *xkb); + _X_EXPORT extern struct xkb_component_list * xkb_list_components(struct xkb_component_names * ptrns, int *maxMatch); diff --git a/src/xkbcomp/xkbcomp.c b/src/xkbcomp/xkbcomp.c index 63858a0..cc3b52d 100644 --- a/src/xkbcomp/xkbcomp.c +++ b/src/xkbcomp/xkbcomp.c @@ -324,3 +324,9 @@ xkb_compile_keymap_from_file(FILE *inputFile, const char *mapName) return compile_keymap(file, mapName); } + +void +xkb_free_keymap(struct xkb_desc *xkb) +{ + XkbcFreeKeyboard(xkb, 0, True); +}