On Wed, 2017-03-29 at 10:28 +1000, Peter Hutterer wrote:
> On Tue, Mar 28, 2017 at 01:42:21PM -0400, Adam Jackson wrote:
> > for (i = 0; i < count; i++) {
> > - eventFrom = &events[i];
> > - eventTo = swapEvent;
> > + xEvent swapped;
>
> as keith already pointed out, this will break for generic events. but you
> can still get the same effect by switching to
> unsigned char buffer[eventlength];
> xEvent *swapped = buffer;
> and get rid of the heap allocation this way.
Are we okay with VLAs now? I mean, I am, just it's not currently one of
the C extensions we require.
- ajax
_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel