Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(28)

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

Issue 2062323002: Mojo C bindings library pt1: MojomBuffer (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: MojomBuffer_Allocate(0) succeeds Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mojo/public/c/system/handle.h ('k') | mojo/public/c/system/message_pipe.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/c/system/macros.h
diff --git a/mojo/public/c/system/macros.h b/mojo/public/c/system/macros.h
index 7c7aa2c3f34f169639b1186e82a273fa9a3526d2..b8dbb1d1cf56374262afe8303ac3c1636a1ba5fd 100644
--- a/mojo/public/c/system/macros.h
+++ b/mojo/public/c/system/macros.h
@@ -24,13 +24,12 @@
#endif
// Assert things at compile time. (|msg| should be a valid identifier name.)
-// This macro is currently C++-only, but we want to use it in the C core.h.
// Use like:
// MOJO_STATIC_ASSERT(sizeof(Foo) == 12, "Foo has invalid size");
#if defined(__cplusplus)
#define MOJO_STATIC_ASSERT(expr, msg) static_assert(expr, msg)
#else
-#define MOJO_STATIC_ASSERT(expr, msg)
+#define MOJO_STATIC_ASSERT(expr, msg) _Static_assert(expr, msg)
#endif
// Like the C++11 |alignof| operator.
« no previous file with comments | « mojo/public/c/system/handle.h ('k') | mojo/public/c/system/message_pipe.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698