<html>
<head>
<base href="https://bugs.freedesktop.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - passing lists with variadic sized types to requests looks complicated and error prone"
href="https://bugs.freedesktop.org/show_bug.cgi?id=70956#c1">Comment # 1</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW --- - passing lists with variadic sized types to requests looks complicated and error prone"
href="https://bugs.freedesktop.org/show_bug.cgi?id=70956">bug 70956</a>
from <span class="vcard"><a class="email" href="mailto:ran234@gmail.com" title="Ran Benita <ran234@gmail.com>"> <span class="fn">Ran Benita</span></a>
</span></b>
<pre>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.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the QA Contact for the bug.</li>
</ul>
</body>
</html>