[PATCH libxkbcommon] keymap: add xkb_keymap_new_from_memory()
Bill Spitzak
spitzak at gmail.com
Mon Mar 11 10:29:57 PDT 2013
I know we got flex to work without a terminating null. A quick look at
the source code reveals that we are calling this:
yy_scan_bytes(buffer, length, scanner);
Our code also does this:
#define YY_INPUT(a,b,c) // disable read-next-buffer: unused and makes a
warning
I'm not sure if that is important.
David Herrmann wrote:
> The current API doesn't allow the caller to create keymaps from mmap()'ed
> files. The problem is, xkb_keymap_new_from_string() requires a terminating
> 0 byte. However, there is no way to guarantee that when using mmap() so a
> user currently has to copy the whole file just to get the terminating zero
> byte (assuming they cannot use xkb_keymap_new_from_file()).
More information about the wayland-devel
mailing list