Chromium Code Reviews

Unified Diff: mojo/public/c/system/data_pipe.h

Issue 295383012: Mojo: Require our public options structs to be aligned like int64_t's. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix win 2 Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
« no previous file with comments | « mojo/public/c/system/buffer.h ('k') | mojo/public/c/system/macros.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/c/system/data_pipe.h
diff --git a/mojo/public/c/system/data_pipe.h b/mojo/public/c/system/data_pipe.h
index 511858df76d8cde20e17c4870e156396ede05cdf..1313448ebdc235cce18550ea7e5e60bd64bd96c7 100644
--- a/mojo/public/c/system/data_pipe.h
+++ b/mojo/public/c/system/data_pipe.h
@@ -46,7 +46,8 @@ const MojoCreateDataPipeOptionsFlags
((MojoCreateDataPipeOptionsFlags) 1 << 0)
#endif
-struct MojoCreateDataPipeOptions {
+MOJO_COMPILE_ASSERT(MOJO_ALIGNOF(int64_t) == 8, int64_t_has_weird_alignment);
+struct MOJO_ALIGNAS(8) MojoCreateDataPipeOptions {
uint32_t struct_size;
MojoCreateDataPipeOptionsFlags flags;
uint32_t element_num_bytes;
« no previous file with comments | « mojo/public/c/system/buffer.h ('k') | mojo/public/c/system/macros.h » ('j') | no next file with comments »

Powered by Google App Engine