<html><head></head><body>Hi,<br><br>I considered doing that, but it potentially wrecks common C/C++ code (in headers), if the code is cancellable in C. Same problem with vlc_cancel(), which is not strictly wrong in C++.<br><br>But if you prefer that way, I can live with it.<br><br><div class="gmail_quote">Le 11 février 2020 09:45:01 GMT+02: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">It may work for some C++ code only used on Linux. But if the module is compiled<br>on other platforms it will assert.<hr> include/vlc_threads.h | 10 ++++------<br> 1 file changed, 4 insertions(+), 6 deletions(-)<br><br>diff --git a/include/vlc_threads.h b/include/vlc_threads.h<br>index 0e27ea803fa..5a75f4ad1f8 100644<br>--- a/include/vlc_threads.h<br>+++ b/include/vlc_threads.h<br>@@ -1084,12 +1084,10 @@ struct vlc_cleanup_t<br>         vlc_control_cancel (NULL); \<br>     } while (0)<br> # else<br>-/* Those macros do not work in C++. However common C/C++ helpers may call them<br>- * anyway - this is fine if the code is never cancelled in C++ case.<br>- * So define the macros to do nothing.<br>- */<br>-#  define vlc_cleanup_push(routine, arg) do { (routine, arg)<br>-#  define vlc_cleanup_pop() } while (0)<br>+#  define vlc_cleanup_push(routine, arg) \<br>+    static_assert(false, "don't use vlc_cleanup_push in portable C++ code")<br>+#  define vlc_cleanup_pop() \<br>+    static_assert(false, "don'o't use vlc_cleanup_pop in portable C++ code")<br> # endif<br> <br> #endif /* !LIBVLC_USE_PTHREAD_CLEANUP */</pre></blockquote></div><br>-- <br>Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.</body></html>