On Sat, May 8, 2010 at 9:47 AM, Keith Packard <[email protected]> wrote:
> On Sat, 8 May 2010 12:57:37 +0200, Julien Cristau <[email protected]> wrote:
>
>> Can we make the stuff in InputAttributes const instead?
>
> Yeah, that appears to mostly work. I can't figure out how to get this
> line to compile:

That works for config/udev. Not config/hal. Try building with
--disable-config-udev --enable-config-hal.

>    attrs.tags = xstrtokenize(udev_device_get_property_value(udev_device, 
> "ID_INPUT.tags"), ",");
>
> no matter how I decorate the declaration of 'tags' with 'const'. And, of
> course, freeing the tags will take a cast.

Because xstrtokenize splits the string and allocates the chunks. It's
not const and it gets freed at the end of the function.

--
Dan
_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to