[Bf-blender-cvs] [88c14f588a0] new-object-types: Fix Windows build error with DNA defaults and C++

Brecht Van Lommel noreply at git.blender.org
Fri Mar 6 15:38:09 CET 2020


Commit: 88c14f588a0425cc38d974660a10c6422dcec10b
Author: Brecht Van Lommel
Date:   Fri Mar 6 15:36:24 2020 +0100
Branches: new-object-types
https://developer.blender.org/rB88c14f588a0425cc38d974660a10c6422dcec10b

Fix Windows build error with DNA defaults and C++

===================================================================

M	source/blender/makesdna/DNA_defaults.h

===================================================================

diff --git a/source/blender/makesdna/DNA_defaults.h b/source/blender/makesdna/DNA_defaults.h
index 5b9297ce46a..96266e18913 100644
--- a/source/blender/makesdna/DNA_defaults.h
+++ b/source/blender/makesdna/DNA_defaults.h
@@ -27,6 +27,10 @@
 #ifndef __DNA_DEFAULTS_H__
 #define __DNA_DEFAULTS_H__
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #include "dna_type_offsets.h"
 
 extern const void *DNA_default_table[SDNA_TYPE_MAX];
@@ -43,4 +47,8 @@ char *_DNA_struct_default_alloc_impl(const char *data_src, size_t size, const ch
   (struct_name *)_DNA_struct_default_alloc_impl( \
       DNA_default_table[SDNA_TYPE_FROM_STRUCT(struct_name)], sizeof(struct_name), __func__)
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* __DNA_DEFAULTS_H__ */



More information about the Bf-blender-cvs mailing list