<html><head></head><body>I don't see how passing va_list to whatever is the appropriate formatting function for your logging system, is a PITA.<br><br>Certainly, implementing printf() by hand is a PITA, but why the heck would you do that??<br><br><div class="gmail_quote">Le 20 mai 2019 10:41:07 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-19 8:32, 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;">Le lauantaina 18. toukokuuta 2019, 23.12.30 EEST Jeremy Vignelles a écrit :<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ad7fa8; padding-left: 1ex;"> Hi Rémi,<br><br> Thanks for your review.<br><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #8ae234; padding-left: 1ex;"> Le 18 mai 2019 à 09:18, Rémi Denis-Courmont <remi@remlab.net> a écrit :<br><br> Le perjantaina 17. toukokuuta 2019, 11.04.59 EEST Jérémy VIGNELLES a écrit<br></blockquote></blockquote>:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ad7fa8; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #8ae234; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #fcaf3e; padding-left: 1ex;"> Hi,<br><br> In libvlc, there is currently a `libvlc_log_set` function, that can<br> register log callback in a vprintf style, that is, with a `va_list`<br> argument.<br><br> This is nice when you are trying to call from C, but when using other<br> languages like C# or Java, va_list is impossible to get right, and even<br> if<br> it did, those languages do not provide ways to format that kind of<br> stuff.<br></blockquote> We already tried to adapt to foreign function interfaces and failed, and<br> realized that the FFI just could not handle it across the broad set of<br> platforms that VLC supports.<br><br> Then we took the logical decision going forward: to reject that sort of<br> patchsets.<br></blockquote>As of today, every libvlc API that made sense to expose are implemented in<br>LibVLCSharp, with the only exception of that specific logging API. I don't<br>know if there is something missing for other languages on specific APIs,<br>but as far as .net is concerned, the other functions are correctly<br>supported.<br></blockquote>And? The point is, we decided to *stop* vainly trying to support the DotNet<br>DllImport natively, because we want char, bool, size_t, va_list, etc. and<br>becausewe found out that it ws anyway not possible to import LibVLC without<br>platform-specific code even if the type system were watered-down.<br></blockquote><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></pre></blockquote></div><br>-- <br>Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.</body></html>