Index: mojo/public/c/system/macros.h |
diff --git a/mojo/public/c/system/macros.h b/mojo/public/c/system/macros.h |
index 5f0040cac8cffef3223b480532da8e7c3dfea5d9..551f693678776defb1b6aba46b2b72472dda35dd 100644 |
--- a/mojo/public/c/system/macros.h |
+++ b/mojo/public/c/system/macros.h |
@@ -62,4 +62,14 @@ |
#error "Please define MOJO_ALIGNAS() for your compiler." |
#endif |
+// Use these to declare functions in C header files, so that they'll be usable |
jamesr
2016/03/15 19:33:21
i think that comma, is not needed here
viettrungluu
2016/03/15 19:37:05
Done.
|
+// from C++. |
+#if defined(__cplusplus) |
+#define MOJO_BEGIN_EXTERN_C extern "C" { |
+#define MOJO_END_EXTERN_C } |
+#else |
+#define MOJO_BEGIN_EXTERN_C |
+#define MOJO_END_EXTERN_C |
+#endif |
+ |
#endif // MOJO_PUBLIC_C_SYSTEM_MACROS_H_ |