[Xcb] Reply Buffering Question

Barton C Massey bart at cs.pdx.edu
Fri Nov 16 15:31:47 PST 2007


The reply data is copied as it is passed to you by
xcb_input_list_input_devices_reply().  That's why you need
to free the reply at the end.

	Bart

In message <473E2511.2010009 at tycho.nsa.gov> you wrote:
> I'm assuming that I can't do something like the following:
> 
>   iterator = xcb_input_list_input_devices_devices_iterator(reply);
>   while (iterator.rem) {
> 
>     cookie = xcb_foo_request(conn);
> 
>     error = xcb_request_check(conn, cookie);
>     if (error)
>        ...
> 
>     xcb_input_deviceinfo_next(&iterator);
>   }
> 
> 
> 
> Because the reply buffer used by the iterator will get trashed by the 
> calls inside the loop.
> 
> Is this a correct assumption, or does XCB do internal copying that would 
> make this work?  Thanks,


More information about the Xcb mailing list