[PATCH libxkbcommon] keymap: add xkb_keymap_new_from_memory()

Bill Spitzak spitzak at gmail.com
Mon Mar 18 13:05:41 PDT 2013


I guess I still question why you are not just calling yy_scan_bytes. If 
you look at the output of flex it contains the source code for 
yy_scan_bytes, which shows it doing *exactly* the same thing (allocating 
a buffer 2 bytes larger, copying the memory block, setting the nulls, 
then calling yy_scan_buffer, and sets things up so resetting the scanner 
deletes the temporary buffer).

It just seems to me that this code serves no purpose, and that if flex 
is ever "fixed" to not require the bytes (most likely by making it reuse 
the code to read blocks from files to read blocks from the source 
buffer), that this patch would then not use this fix and have to be 
removed anyway...




More information about the wayland-devel mailing list