summaryrefslogtreecommitdiff
path: root/mojo/public/c/system/buffer.h
diff options
context:
space:
mode:
authorviettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-30 02:22:08 +0900
committerQijiang Fan <fqj@google.com>2020-06-04 16:47:31 +0900
commit432750437990d7ca96621125de046ee6870b2d19 (patch)
tree51f623a8f1341dfd90a148edcb26a65aebd7baa6 /mojo/public/c/system/buffer.h
parentc11e2f761a635e987021b350c67adfa7e22b4c83 (diff)
downloadlibchrome-432750437990d7ca96621125de046ee6870b2d19.tar.gz
Mojo: Require our public options structs to be aligned like int64_t's.
The structs are meant to be extensible and part of the ABI, and not requiring such alignment of them would mean that it'd be difficult to add (u)int64_t's (or anything aligned like them) to them in the future. R=darin@chromium.org Review URL: https://codereview.chromium.org/295383012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@273508 0039d316-1c4b-4281-b951-d872f2087c98 CrOS-Libchrome-Original-Commit: 54743a5071e673a394501c3da0f3de7409cf3891
Diffstat (limited to 'mojo/public/c/system/buffer.h')
-rw-r--r--mojo/public/c/system/buffer.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/mojo/public/c/system/buffer.h b/mojo/public/c/system/buffer.h
index 360832150f..ab5734d7eb 100644
--- a/mojo/public/c/system/buffer.h
+++ b/mojo/public/c/system/buffer.h
@@ -38,7 +38,8 @@ const MojoCreateSharedBufferOptionsFlags
((MojoCreateSharedBufferOptionsFlags) 0)
#endif
-struct MojoCreateSharedBufferOptions {
+MOJO_COMPILE_ASSERT(MOJO_ALIGNOF(int64_t) == 8, int64_t_has_weird_alignment);
+struct MOJO_ALIGNAS(8) MojoCreateSharedBufferOptions {
uint32_t struct_size;
MojoCreateSharedBufferOptionsFlags flags;
};