[vlc-commits] Revert "misc: ensure vlc_object_t is correctly aligned"

Rémi Denis-Courmont git at videolan.org
Wed Jul 26 16:51:49 CEST 2017


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed Jul 26 17:48:52 2017 +0300| [aa96e44194873185ce0df20187907a5696b0e769] | committer: Rémi Denis-Courmont

Revert "misc: ensure vlc_object_t is correctly aligned"

This reverts commit 4f91e6bc15d8b72deb1f761ca857a33d672c91ef.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=aa96e44194873185ce0df20187907a5696b0e769
---

 src/misc/variables.h | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/src/misc/variables.h b/src/misc/variables.h
index bab14c8567..38af8635a2 100644
--- a/src/misc/variables.h
+++ b/src/misc/variables.h
@@ -23,7 +23,6 @@
 #ifndef LIBVLC_VARIABLES_H
 # define LIBVLC_VARIABLES_H 1
 
-# include <stdalign.h>
 # include <vlc_atomic.h>
 
 struct vlc_res;
@@ -54,13 +53,10 @@ struct vlc_object_internals
 
     /* Object resources */
     struct vlc_res *resources;
-
-    max_align_t aligned_end[];
 };
 
-# define vlc_internals(obj) \
-    container_of(VLC_OBJECT(obj), struct vlc_object_internals, aligned_end)
-# define vlc_externals(priv ) ((vlc_object_t *)((priv)->aligned_end))
+# define vlc_internals( obj ) (((vlc_object_internals_t*)(VLC_OBJECT(obj)))-1)
+# define vlc_externals( priv ) ((vlc_object_t *)((priv) + 1))
 
 void DumpVariables(vlc_object_t *obj);
 



More information about the vlc-commits mailing list