Hi Bill On Mon, Mar 11, 2013 at 7:06 PM, Bill Spitzak <spit...@gmail.com> wrote: > Okay looking more at your patch and the output of flex, I think you can just > call yy_scan_bytes. It does a copy, true, but that is exactly what your code > is doing. And it does it by reusing code that is already in the flex output.
yy_scan_bytes saves us a direct call to malloc(), nothing more. I thought it's better to do that ourselves so we actually see that there is a copy involved and not hide it in flex. For instance if we ever add an mmap() interface or if we need it for something else internally, we can reuse XkbParseBuffer() and don't need another of these helpers. We could even remove XkbParseString() and use XkbParseBuffer() instead. Anyway, I'm open to change this to use yy_scan_bytes() instead if that's preferred. Regards David _______________________________________________ wayland-devel mailing list wayland-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/wayland-devel