<html><head></head><body>Hi,<br><br>You don't need to care about the order or content of the va_list. Just pass the format string and the va_list to the suitable formatted output function, e.g. vfprintf(), vsyslog(), etc.<br><br><div class="gmail_quote">Le 20 mai 2019 15:18:11 GMT+03:00, Steve Lhomme <robux4@ycbcr.xyz> a écrit :<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<pre class="k9mail">On 2019-05-20 14:03, Rémi Denis-Courmont wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #729fcf; padding-left: 1ex;">I don't see how passing va_list to whatever is the appropriate <br>formatting function for your logging system, is a PITA.<br></blockquote><br>The order or the elements in the va_list is completely arbitrary and <br>entirely depends on the format string it's tied to. There's no way the <br>libvlc host can actually make sense of which parameter does what and <br>reformat this.<br><br>IMO we can just replace this by the formatted string and everyone will <br>be happy. Nothing will be lost.<br><br><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #729fcf; padding-left: 1ex;">Certainly, implementing printf() by hand is a PITA, but why the heck <br>would you do that??<br><br>Le 20 mai 2019 10:41:07 GMT+03:00, Steve Lhomme <robux4@ycbcr.xyz> a écrit :<br><br> On 2019-05-19 8:32, Rémi Denis-Courmont wrote:<br><br> Le lauantaina 18. toukokuuta 2019, 23.12.30 EEST Jeremy<br> Vignelles a écrit :<br><br> Hi Rémi,<br><br> Thanks for your review.<br><br> Le 18 mai 2019 à 09:18, Rémi Denis-Courmont<br> <remi@remlab.net> a écrit :<br><br> Le perjantaina 17. toukokuuta 2019, 11.04.59 EEST Jérémy<br> VIGNELLES a écrit<br><br> :<br><br> Hi,<br><br> In libvlc, there is currently a `libvlc_log_set`<br> function, that can<br> register log callback in a vprintf style, that is,<br> with a `va_list`<br> argument.<br><br> This is nice when you are trying to call from C, but<br> when using other<br> languages like C# or Java, va_list is impossible to<br> get right, and even<br> if<br> it did, those languages do not provide ways to<br> format that kind of<br> stuff.<br><br> We already tried to adapt to foreign function interfaces<br> and failed, and<br> realized that the FFI just could not handle it across<br> the broad set of<br> platforms that VLC supports.<br><br> Then we took the logical decision going forward: to<br> reject that sort of<br> patchsets.<br><br> As of today, every libvlc API that made sense to expose are<br> implemented in<br> LibVLCSharp, with the only exception of that specific<br> logging API. I don't<br> know if there is something missing for other languages on<br> specific APIs,<br> but as far as .net is concerned, the other functions are<br> correctly<br> supported.<br><br> And? The point is, we decided to *stop* vainly trying to support<br> the DotNet<br> DllImport natively, because we want char, bool, size_t, va_list,<br> etc. and<br> becausewe found out that it ws anyway not possible to import<br> LibVLC without<br> platform-specific code even if the type system were watered-down.<br><br><br> I followed the conversation and still don't understand why it's wrong to<br> replace a "format string + va_list" by a "formatted string" in the API.<br> Even in C handling a va_list is a PITA. If you want to peek into it, you<br> need to copy it. Let alone the typing of the variables in the va_list.<hr> vlc-devel mailing list<br> To unsubscribe or modify your subscription options:<br> <a href="https://mailman.videolan.org/listinfo/vlc-devel">https://mailman.videolan.org/listinfo/vlc-devel</a><br><br><br>-- <br>Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser <br>ma brièveté.<hr>vlc-devel mailing list<br>To unsubscribe or modify your subscription options:<br><a href="https://mailman.videolan.org/listinfo/vlc-devel">https://mailman.videolan.org/listinfo/vlc-devel</a><br><br></blockquote><hr>vlc-devel mailing list<br>To unsubscribe or modify your subscription options:<br><a href="https://mailman.videolan.org/listinfo/vlc-devel">https://mailman.videolan.org/listinfo/vlc-devel</a></pre></blockquote></div><br>-- <br>Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.</body></html>