[Bf-blender-cvs] [7ccef23c4d0] master: Add C++ guards to some blenlib headers
Sergey Sharybin
noreply at git.blender.org
Thu Jan 31 14:34:54 CET 2019
Commit: 7ccef23c4d010d4b4f83efe2cd6c82ff26824a10
Author: Sergey Sharybin
Date: Thu Jan 31 14:22:46 2019 +0100
Branches: master
https://developer.blender.org/rB7ccef23c4d010d4b4f83efe2cd6c82ff26824a10
Add C++ guards to some blenlib headers
===================================================================
M source/blender/blenlib/BLI_console.h
M source/blender/blenlib/BLI_hash.h
===================================================================
diff --git a/source/blender/blenlib/BLI_console.h b/source/blender/blenlib/BLI_console.h
index bf433f78f70..66d6846fbc2 100644
--- a/source/blender/blenlib/BLI_console.h
+++ b/source/blender/blenlib/BLI_console.h
@@ -26,6 +26,10 @@
#ifndef __BLI_CONSOLE_H__
#define __BLI_CONSOLE_H__
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/** \file BLI_console.h
* \ingroup bli
* \brief Set of utility functions and constants to work with consoles.
@@ -39,4 +43,8 @@
/* Marker which indicates that colored output is finished. */
#define TRUECOLOR_ANSI_COLOR_FINISH "\x1b[0m"
+#ifdef __cplusplus
+}
+#endif
+
#endif /* __BLI_CONSOLE_H__ */
diff --git a/source/blender/blenlib/BLI_hash.h b/source/blender/blenlib/BLI_hash.h
index f74010479a9..f369897a1b8 100644
--- a/source/blender/blenlib/BLI_hash.h
+++ b/source/blender/blenlib/BLI_hash.h
@@ -25,6 +25,10 @@
* \ingroup bli
*/
+#ifdef __cplusplus
+extern "C" {
+#endif
+
BLI_INLINE unsigned int BLI_hash_int_2d(unsigned int kx, unsigned int ky)
{
#define rot(x, k) (((x) << (k)) | ((x) >> (32 - (k))))
@@ -80,4 +84,8 @@ BLI_INLINE void BLI_hash_pointer_to_color(const void *ptr, int *r, int *g, int *
*b = hash & 0x0000ff;
}
+#ifdef __cplusplus
+}
+#endif
+
#endif // __BLI_HASH_H__
More information about the Bf-blender-cvs
mailing list