[Xcb] [Bug 70956] passing lists with variadic sized types to requests looks complicated and error prone
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Wed Oct 30 23:03:15 CET 2013
https://bugs.freedesktop.org/show_bug.cgi?id=70956
--- Comment #1 from Ran Benita <ran234 at gmail.com> ---
Hi Daniel,
First thanks for making the bug easy to follow :)
I can see the problem, the current interface is clearly not usable, and
certainly unexpected. As for the solution, it's the only reasonable approach I
can come up with as well.
Instead of changing the function signature/abi, you might consider generating a
'_serialize' function for this argument, which takes the array-of-structs as
you proposed and puts out the serialized buffer, which you can then pass to
e.g. xcb_set_font_path(). There's some precedent to these '_serialize'
functions as you know (though only for entire requests AFAIK). A shortcoming of
this is that you have to malloc() the returned buffer inside the serialize
function, but xcb isn't repelled by malloc() anyway. However since no one's
using these functions, I would personally prefer the direct-function-argument
approach. But just something to consider.
--
You are receiving this mail because:
You are the QA Contact for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/xcb/attachments/20131030/c6ac9b83/attachment.html>
More information about the Xcb
mailing list