[vlc-devel] [PATCH 1/2] vlc_common: add VLC_ALIGN macro
Rémi Denis-Courmont
remi at remlab.net
Sat Jan 11 03:49:32 CET 2020
This is not expansion-safe. No please.
Le 11 janvier 2020 04:05:04 GMT+09:00, Marvin Scholz <epirat07 at gmail.com> a écrit :
>---
> include/vlc_common.h | 7 +++++++
> 1 file changed, 7 insertions(+)
>
>diff --git a/include/vlc_common.h b/include/vlc_common.h
>index e4c5cd85c9..66b7df8644 100644
>--- a/include/vlc_common.h
>+++ b/include/vlc_common.h
>@@ -548,6 +548,13 @@ typedef int ( * vlc_list_callback_t ) (
>vlc_object_t *, /* variable's objec
> /* clip v in [min, max] */
> #define VLC_CLIP(v, min, max) __MIN(__MAX((v), (min)), (max))
>
>+/**
>+ * Make integer v a multiple of align
>+ *
>+ * \note align must be a power of 2
>+ */
>+#define VLC_ALIGN(v, align) (((v) + ((align) - 1)) & ~((align) - 1))
>+
> /** Greatest common divisor */
> VLC_USED
> static inline int64_t GCD ( int64_t a, int64_t b )
>--
>2.20.1 (Apple Git-117)
>
>_______________________________________________
>vlc-devel mailing list
>To unsubscribe or modify your subscription options:
>https://mailman.videolan.org/listinfo/vlc-devel
--
Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20200111/c6790379/attachment.html>
More information about the vlc-devel
mailing list