<html><head></head><body>Hi,<br><br>This is missing unwinding code for C++. The removed comments are there for reasons...<br><br><div class="gmail_quote">Le 10 février 2020 15:55:44 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">Should fix #23591<hr> include/vlc_threads.h | 12 ++----------<br> 1 file changed, 2 insertions(+), 10 deletions(-)<br><br>diff --git a/include/vlc_threads.h b/include/vlc_threads.h<br>index 0e27ea803fa..b2ef5222d3b 100644<br>--- a/include/vlc_threads.h<br>+++ b/include/vlc_threads.h<br>@@ -1071,26 +1071,18 @@ struct vlc_cleanup_t<br>     void          *data;<br> };<br> <br>-# ifndef __cplusplus<br> /* This macros opens a code block on purpose: It reduces the chance of<br>  * not pairing the push and pop. It also matches the POSIX Thread internals.<br>  * That way, Win32 developers will not accidentally break other platforms.<br>  */<br> # define vlc_cleanup_push( routine, arg ) \<br>     do { \<br>-        vlc_control_cancel(&(vlc_cleanup_t){ NULL, routine, arg })<br>+        vlc_cleanup_t _cleanup = (vlc_cleanup_t){ NULL, routine, arg }; \<br>+        vlc_control_cancel(&_cleanup)<br> <br> #  define vlc_cleanup_pop( ) \<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>-# endif<br> <br> #endif /* !LIBVLC_USE_PTHREAD_CLEANUP */<br> </pre></blockquote></div><br>-- <br>Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.</body></html>