summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@bitplanet.net>2010-10-08 15:33:18 -0400
committerKristian Høgsberg <krh@bitplanet.net>2010-10-08 15:33:18 -0400
commite879828717a8b7bdf12efbbf9a1baeb20e1fcdd2 (patch)
tree332b3c73d32af338423d1f38e2ec62b205aa9ffd /include
parentd202bc4462b4cca91d438b19c3293671f62e15a3 (diff)
downloadxorg-lib-libxkbcommon-e879828717a8b7bdf12efbbf9a1baeb20e1fcdd2.tar.gz
Don't return a static buffer in public API
Diffstat (limited to 'include')
-rw-r--r--include/X11/extensions/XKBcommon.h8
1 files changed, 2 insertions, 6 deletions
diff --git a/include/X11/extensions/XKBcommon.h b/include/X11/extensions/XKBcommon.h
index c1bc270..0b6fb77 100644
--- a/include/X11/extensions/XKBcommon.h
+++ b/include/X11/extensions/XKBcommon.h
@@ -797,15 +797,11 @@ xkb_canonicalise_components(struct xkb_component_names * names,
* Converts a keysym to a string; will return unknown Unicode codepoints
* as "Ua1b2", and other unknown keysyms as "0xabcd1234".
*
- * The string returned may become invalidated after the next call to
- * xkb_keysym_to_string: if you need to preserve it, then you must
- * duplicate it.
- *
* This is uint32_t rather than KeySym, as KeySym changes size between
* client and server (no, really).
*/
-_X_EXPORT extern char *
-xkb_keysym_to_string(uint32_t ks);
+_X_EXPORT extern void
+xkb_keysym_to_string(uint32_t ks, char *buffer, size_t size);
/*
* See xkb_keysym_to_string comments: this function will accept any string