Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacques Lucke <jacques@blender.org>2020-07-28 17:32:30 +0300
committerJacques Lucke <jacques@blender.org>2020-07-28 17:33:43 +0300
commitb274d18aec525621bcb0a2234fc65e09398616c2 (patch)
treeec4310013623197f5bac2eb51c200503d898bd06
parent9c1da81a4c173437c1e556afde7b32eef4b0a47d (diff)
Cleanup: correct usage of extern-C blocks in various places
This removes extern-C blocks around other includes and adds such blocks for some headers that need them.
-rw-r--r--source/blender/blenkernel/intern/fcurve_test.cc2
-rw-r--r--source/blender/freestyle/intern/application/AppConfig.cpp2
-rw-r--r--source/blender/freestyle/intern/application/AppView.cpp2
-rw-r--r--source/blender/freestyle/intern/blender_interface/BlenderFileLoader.h2
-rw-r--r--source/blender/freestyle/intern/blender_interface/FRS_freestyle.cpp4
-rw-r--r--source/blender/freestyle/intern/stroke/BasicStrokeShaders.cpp2
-rw-r--r--source/blender/freestyle/intern/system/PythonInterpreter.h2
-rw-r--r--source/blender/freestyle/intern/system/RenderMonitor.h2
-rw-r--r--source/blender/freestyle/intern/system/StringUtils.h2
-rw-r--r--source/blender/gpu/GPU_framebuffer.h4
-rw-r--r--source/blender/gpu/GPU_texture.h11
-rw-r--r--source/blender/io/common/intern/hierarchy_context_order_test.cc2
-rw-r--r--source/blender/makesdna/DNA_genfile.h8
-rw-r--r--source/blender/python/intern/bpy.h8
-rw-r--r--source/blender/python/intern/bpy_app.h8
-rw-r--r--source/blender/python/intern/bpy_app_alembic.h8
-rw-r--r--source/blender/python/intern/bpy_app_build_options.h8
-rw-r--r--source/blender/python/intern/bpy_app_ffmpeg.h8
-rw-r--r--source/blender/python/intern/bpy_app_handlers.h8
-rw-r--r--source/blender/python/intern/bpy_app_icons.h8
-rw-r--r--source/blender/python/intern/bpy_app_ocio.h8
-rw-r--r--source/blender/python/intern/bpy_app_oiio.h8
-rw-r--r--source/blender/python/intern/bpy_app_opensubdiv.h8
-rw-r--r--source/blender/python/intern/bpy_app_openvdb.h8
-rw-r--r--source/blender/python/intern/bpy_app_sdl.h8
-rw-r--r--source/blender/python/intern/bpy_app_timers.h8
-rw-r--r--source/blender/python/intern/bpy_app_translations.h8
-rw-r--r--source/blender/python/intern/bpy_app_usd.h8
-rw-r--r--source/blender/python/intern/bpy_capi_utils.h8
-rw-r--r--source/blender/python/intern/bpy_driver.h8
-rw-r--r--source/blender/python/intern/bpy_gizmo_wrap.h8
-rw-r--r--source/blender/python/intern/bpy_intern_string.h8
-rw-r--r--source/blender/python/intern/bpy_library.h8
-rw-r--r--source/blender/python/intern/bpy_msgbus.h8
-rw-r--r--source/blender/python/intern/bpy_operator.h8
-rw-r--r--source/blender/python/intern/bpy_operator_wrap.h8
-rw-r--r--source/blender/python/intern/bpy_path.h8
-rw-r--r--source/blender/python/intern/bpy_props.h8
-rw-r--r--source/blender/python/intern/bpy_rna.h8
-rw-r--r--source/blender/python/intern/bpy_rna_anim.h8
-rw-r--r--source/blender/python/intern/bpy_rna_callback.h8
-rw-r--r--source/blender/python/intern/bpy_rna_driver.h8
-rw-r--r--source/blender/python/intern/bpy_rna_gizmo.h8
-rw-r--r--source/blender/python/intern/bpy_rna_id_collection.h8
-rw-r--r--source/blender/python/intern/bpy_rna_types_capi.h8
-rw-r--r--source/blender/python/intern/bpy_traceback.h8
-rw-r--r--source/blender/python/intern/bpy_utils_previews.h8
-rw-r--r--source/blender/python/intern/bpy_utils_units.h8
-rw-r--r--source/blender/render/extern/include/RE_bake.h8
-rw-r--r--source/blender/render/extern/include/RE_engine.h8
-rw-r--r--source/blender/render/extern/include/RE_multires_bake.h8
-rw-r--r--source/blender/render/extern/include/RE_render_ext.h8
-rw-r--r--source/blender/render/intern/include/initrender.h8
-rw-r--r--source/blender/render/intern/include/render_result.h8
-rw-r--r--source/blender/render/intern/include/render_types.h8
-rw-r--r--source/blender/render/intern/include/renderpipeline.h8
-rw-r--r--source/blender/render/intern/include/texture.h8
-rw-r--r--source/blender/render/intern/include/zbuf.h8
-rw-r--r--source/blender/windowmanager/gizmo/WM_gizmo_api.h8
-rw-r--r--source/blender/windowmanager/gizmo/WM_gizmo_types.h8
-rw-r--r--source/blender/windowmanager/gizmo/wm_gizmo_fn.h8
-rw-r--r--source/blender/windowmanager/gizmo/wm_gizmo_wmapi.h8
-rw-r--r--source/blender/windowmanager/message_bus/wm_message_bus.h8
-rw-r--r--source/blender/windowmanager/wm.h8
-rw-r--r--source/blender/windowmanager/wm_cursors.h8
-rw-r--r--source/blender/windowmanager/wm_draw.h8
-rw-r--r--source/blender/windowmanager/wm_event_system.h8
-rw-r--r--source/blender/windowmanager/wm_event_types.h8
-rw-r--r--source/blender/windowmanager/wm_files.h8
-rw-r--r--source/blender/windowmanager/wm_surface.h8
-rw-r--r--source/blender/windowmanager/wm_window.h8
-rw-r--r--tests/gtests/alembic/abc_export_test.cc2
-rw-r--r--tests/gtests/alembic/abc_matrix_test.cc2
-rw-r--r--tests/gtests/blenlib/BLI_array_store_test.cc2
-rw-r--r--tests/gtests/blenlib/BLI_array_utils_test.cc2
-rw-r--r--tests/gtests/blenlib/BLI_delaunay_2d_test.cc2
-rw-r--r--tests/gtests/blenlib/BLI_expr_pylike_eval_test.cc2
-rw-r--r--tests/gtests/blenlib/BLI_ghash_performance_test.cc2
-rw-r--r--tests/gtests/blenlib/BLI_ghash_test.cc2
-rw-r--r--tests/gtests/blenlib/BLI_hash_mm2a_test.cc2
-rw-r--r--tests/gtests/blenlib/BLI_heap_simple_test.cc2
-rw-r--r--tests/gtests/blenlib/BLI_heap_test.cc2
-rw-r--r--tests/gtests/blenlib/BLI_kdopbvh_test.cc2
-rw-r--r--tests/gtests/blenlib/BLI_listbase_test.cc2
-rw-r--r--tests/gtests/blenlib/BLI_memiter_test.cc2
-rw-r--r--tests/gtests/blenlib/BLI_path_util_test.cc2
-rw-r--r--tests/gtests/blenlib/BLI_polyfill_2d_test.cc2
-rw-r--r--tests/gtests/blenlib/BLI_stack_test.cc2
-rw-r--r--tests/gtests/blenlib/BLI_string_test.cc2
-rw-r--r--tests/gtests/blenlib/BLI_string_utf8_test.cc2
-rw-r--r--tests/gtests/blenlib/BLI_task_performance_test.cc2
-rw-r--r--tests/gtests/blenlib/BLI_task_test.cc2
-rw-r--r--tests/gtests/blenloader/blendfile_loading_base_test.cc2
-rw-r--r--tests/gtests/guardedalloc/guardedalloc_alignment_test.cc2
94 files changed, 483 insertions, 72 deletions
diff --git a/source/blender/blenkernel/intern/fcurve_test.cc b/source/blender/blenkernel/intern/fcurve_test.cc
index 2248cce37e5..a6f65a7c9b3 100644
--- a/source/blender/blenkernel/intern/fcurve_test.cc
+++ b/source/blender/blenkernel/intern/fcurve_test.cc
@@ -19,13 +19,11 @@
#include "MEM_guardedalloc.h"
-extern "C" {
#include "BKE_fcurve.h"
#include "ED_keyframing.h"
#include "DNA_anim_types.h"
-}
namespace blender::bke::tests {
diff --git a/source/blender/freestyle/intern/application/AppConfig.cpp b/source/blender/freestyle/intern/application/AppConfig.cpp
index b26c9a58f70..3aae4254b4b 100644
--- a/source/blender/freestyle/intern/application/AppConfig.cpp
+++ b/source/blender/freestyle/intern/application/AppConfig.cpp
@@ -26,9 +26,7 @@
using namespace std;
-extern "C" {
#include "BKE_appdir.h"
-}
namespace Freestyle {
diff --git a/source/blender/freestyle/intern/application/AppView.cpp b/source/blender/freestyle/intern/application/AppView.cpp
index 0956d33a20e..5cd30a61712 100644
--- a/source/blender/freestyle/intern/application/AppView.cpp
+++ b/source/blender/freestyle/intern/application/AppView.cpp
@@ -33,7 +33,6 @@
#include "../view_map/Silhouette.h"
#include "../view_map/ViewMap.h"
-extern "C" {
#include "BLI_blenlib.h"
#include "IMB_imbuf.h"
@@ -45,7 +44,6 @@ extern "C" {
#endif
#include "FRS_freestyle.h"
-}
namespace Freestyle {
diff --git a/source/blender/freestyle/intern/blender_interface/BlenderFileLoader.h b/source/blender/freestyle/intern/blender_interface/BlenderFileLoader.h
index d9387b221f8..9d8b7e55fbb 100644
--- a/source/blender/freestyle/intern/blender_interface/BlenderFileLoader.h
+++ b/source/blender/freestyle/intern/blender_interface/BlenderFileLoader.h
@@ -37,7 +37,6 @@
#include "MEM_guardedalloc.h"
-extern "C" {
#include "DNA_material_types.h"
#include "DNA_mesh_types.h"
#include "DNA_meshdata_types.h"
@@ -56,7 +55,6 @@ extern "C" {
#include "BLI_iterator.h"
#include "BLI_listbase.h"
#include "BLI_math.h"
-}
#include "DEG_depsgraph_query.h"
diff --git a/source/blender/freestyle/intern/blender_interface/FRS_freestyle.cpp b/source/blender/freestyle/intern/blender_interface/FRS_freestyle.cpp
index 26070a88e5d..51ac281e330 100644
--- a/source/blender/freestyle/intern/blender_interface/FRS_freestyle.cpp
+++ b/source/blender/freestyle/intern/blender_interface/FRS_freestyle.cpp
@@ -34,8 +34,6 @@ using namespace Freestyle;
#include "MEM_guardedalloc.h"
-extern "C" {
-
#include "DNA_camera_types.h"
#include "DNA_collection_types.h"
#include "DNA_freestyle_types.h"
@@ -65,6 +63,8 @@ extern "C" {
#include "FRS_freestyle.h"
+extern "C" {
+
#define DEFAULT_SPHERE_RADIUS 1.0f
#define DEFAULT_DKR_EPSILON 0.0f
diff --git a/source/blender/freestyle/intern/stroke/BasicStrokeShaders.cpp b/source/blender/freestyle/intern/stroke/BasicStrokeShaders.cpp
index d969e0e50a3..36234ad619c 100644
--- a/source/blender/freestyle/intern/stroke/BasicStrokeShaders.cpp
+++ b/source/blender/freestyle/intern/stroke/BasicStrokeShaders.cpp
@@ -37,10 +37,8 @@
#include "BKE_global.h"
-extern "C" {
#include "IMB_imbuf.h"
#include "IMB_imbuf_types.h"
-}
namespace Freestyle {
diff --git a/source/blender/freestyle/intern/system/PythonInterpreter.h b/source/blender/freestyle/intern/system/PythonInterpreter.h
index 4bc6ba9db38..8099ed63199 100644
--- a/source/blender/freestyle/intern/system/PythonInterpreter.h
+++ b/source/blender/freestyle/intern/system/PythonInterpreter.h
@@ -34,7 +34,6 @@ extern "C" {
#include "MEM_guardedalloc.h"
// soc
-extern "C" {
#include "DNA_text_types.h"
#include "BKE_context.h"
@@ -47,7 +46,6 @@ extern "C" {
#include "BPY_extern.h"
#include "bpy_capi_utils.h"
-}
namespace Freestyle {
diff --git a/source/blender/freestyle/intern/system/RenderMonitor.h b/source/blender/freestyle/intern/system/RenderMonitor.h
index 709df6c2d8e..eef4683328b 100644
--- a/source/blender/freestyle/intern/system/RenderMonitor.h
+++ b/source/blender/freestyle/intern/system/RenderMonitor.h
@@ -22,9 +22,7 @@
* \brief Classes defining the basic "Iterator" design pattern
*/
-extern "C" {
#include "render_types.h"
-}
#ifdef WITH_CXX_GUARDEDALLOC
# include "MEM_guardedalloc.h"
diff --git a/source/blender/freestyle/intern/system/StringUtils.h b/source/blender/freestyle/intern/system/StringUtils.h
index aeacddd64c8..fd97ca5b032 100644
--- a/source/blender/freestyle/intern/system/StringUtils.h
+++ b/source/blender/freestyle/intern/system/StringUtils.h
@@ -28,10 +28,8 @@
#include <string>
#include <vector>
-extern "C" {
#include "BLI_path_util.h"
#include "BLI_string.h"
-}
using namespace std;
diff --git a/source/blender/gpu/GPU_framebuffer.h b/source/blender/gpu/GPU_framebuffer.h
index 1a9fb1bad7a..0a43b2c58a0 100644
--- a/source/blender/gpu/GPU_framebuffer.h
+++ b/source/blender/gpu/GPU_framebuffer.h
@@ -24,12 +24,12 @@
#ifndef __GPU_FRAMEBUFFER_H__
#define __GPU_FRAMEBUFFER_H__
+#include "GPU_texture.h"
+
#ifdef __cplusplus
extern "C" {
#endif
-#include "GPU_texture.h"
-
typedef struct GPUAttachment {
struct GPUTexture *tex;
int mip, layer;
diff --git a/source/blender/gpu/GPU_texture.h b/source/blender/gpu/GPU_texture.h
index 813ee71eb22..100965d7076 100644
--- a/source/blender/gpu/GPU_texture.h
+++ b/source/blender/gpu/GPU_texture.h
@@ -24,12 +24,9 @@
#ifndef __GPU_TEXTURE_H__
#define __GPU_TEXTURE_H__
+#include "BLI_utildefines.h"
#include "GPU_state.h"
-#ifdef __cplusplus
-extern "C" {
-#endif
-
struct GPUVertBuf;
struct ImBuf;
struct Image;
@@ -60,6 +57,12 @@ typedef enum eGPUSamplerState {
GPU_SAMPLER_MAX = (1 << 8),
} eGPUSamplerState;
+ENUM_OPERATORS(eGPUSamplerState)
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#define GPU_SAMPLER_DEFAULT GPU_SAMPLER_FILTER
#define GPU_SAMPLER_REPEAT (GPU_SAMPLER_REPEAT_S | GPU_SAMPLER_REPEAT_T | GPU_SAMPLER_REPEAT_R)
diff --git a/source/blender/io/common/intern/hierarchy_context_order_test.cc b/source/blender/io/common/intern/hierarchy_context_order_test.cc
index 7273b92c479..f4e2b81b39b 100644
--- a/source/blender/io/common/intern/hierarchy_context_order_test.cc
+++ b/source/blender/io/common/intern/hierarchy_context_order_test.cc
@@ -20,9 +20,7 @@
#include "testing/testing.h"
-extern "C" {
#include "BLI_utildefines.h"
-}
namespace blender::io {
diff --git a/source/blender/makesdna/DNA_genfile.h b/source/blender/makesdna/DNA_genfile.h
index db65da6fa75..6366412f0cf 100644
--- a/source/blender/makesdna/DNA_genfile.h
+++ b/source/blender/makesdna/DNA_genfile.h
@@ -29,6 +29,10 @@
struct SDNA;
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/**
* DNAstr contains the prebuilt SDNA structure defining the layouts of the types
* used by this version of Blender. It is defined in a file dna.c, which is
@@ -134,4 +138,8 @@ bool DNA_struct_alias_elem_find(const struct SDNA *sdna,
const char *name);
void DNA_sdna_alias_data_ensure_structs_map(struct SDNA *sdna);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* __DNA_GENFILE_H__ */
diff --git a/source/blender/python/intern/bpy.h b/source/blender/python/intern/bpy.h
index 88d1db6f8bc..8f91c4e1208 100644
--- a/source/blender/python/intern/bpy.h
+++ b/source/blender/python/intern/bpy.h
@@ -21,6 +21,10 @@
#ifndef __BPY_H__
#define __BPY_H__
+#ifdef __cplusplus
+extern "C" {
+#endif
+
void BPy_init_modules(void);
extern PyObject *bpy_package_py;
@@ -31,4 +35,8 @@ void BPY_atexit_unregister(void);
extern struct CLG_LogRef *BPY_LOG_CONTEXT;
extern struct CLG_LogRef *BPY_LOG_RNA;
+#ifdef __cplusplus
+}
+#endif
+
#endif /* __BPY_H__ */
diff --git a/source/blender/python/intern/bpy_app.h b/source/blender/python/intern/bpy_app.h
index b46de025599..880686f3536 100644
--- a/source/blender/python/intern/bpy_app.h
+++ b/source/blender/python/intern/bpy_app.h
@@ -21,6 +21,14 @@
#ifndef __BPY_APP_H__
#define __BPY_APP_H__
+#ifdef __cplusplus
+extern "C" {
+#endif
+
PyObject *BPY_app_struct(void);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* __BPY_APP_H__ */
diff --git a/source/blender/python/intern/bpy_app_alembic.h b/source/blender/python/intern/bpy_app_alembic.h
index 4cc890ec64d..fcd93fb2b13 100644
--- a/source/blender/python/intern/bpy_app_alembic.h
+++ b/source/blender/python/intern/bpy_app_alembic.h
@@ -24,6 +24,14 @@
#ifndef __BPY_APP_ALEMBIC_H__
#define __BPY_APP_ALEMBIC_H__
+#ifdef __cplusplus
+extern "C" {
+#endif
+
PyObject *BPY_app_alembic_struct(void);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* __BPY_APP_ALEMBIC_H__ */
diff --git a/source/blender/python/intern/bpy_app_build_options.h b/source/blender/python/intern/bpy_app_build_options.h
index 52c2e57c12a..a10f42d53be 100644
--- a/source/blender/python/intern/bpy_app_build_options.h
+++ b/source/blender/python/intern/bpy_app_build_options.h
@@ -21,6 +21,14 @@
#ifndef __BPY_APP_BUILD_OPTIONS_H__
#define __BPY_APP_BUILD_OPTIONS_H__
+#ifdef __cplusplus
+extern "C" {
+#endif
+
PyObject *BPY_app_build_options_struct(void);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* __BPY_APP_BUILD_OPTIONS_H__ */
diff --git a/source/blender/python/intern/bpy_app_ffmpeg.h b/source/blender/python/intern/bpy_app_ffmpeg.h
index 63fff2b1b4b..4809288662b 100644
--- a/source/blender/python/intern/bpy_app_ffmpeg.h
+++ b/source/blender/python/intern/bpy_app_ffmpeg.h
@@ -21,6 +21,14 @@
#ifndef __BPY_APP_FFMPEG_H__
#define __BPY_APP_FFMPEG_H__
+#ifdef __cplusplus
+extern "C" {
+#endif
+
PyObject *BPY_app_ffmpeg_struct(void);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* __BPY_APP_FFMPEG_H__ */
diff --git a/source/blender/python/intern/bpy_app_handlers.h b/source/blender/python/intern/bpy_app_handlers.h
index 426fe376b55..9c9dd75dd18 100644
--- a/source/blender/python/intern/bpy_app_handlers.h
+++ b/source/blender/python/intern/bpy_app_handlers.h
@@ -21,6 +21,14 @@
#ifndef __BPY_APP_HANDLERS_H__
#define __BPY_APP_HANDLERS_H__
+#ifdef __cplusplus
+extern "C" {
+#endif
+
PyObject *BPY_app_handlers_struct(void);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* __BPY_APP_HANDLERS_H__ */
diff --git a/source/blender/python/intern/bpy_app_icons.h b/source/blender/python/intern/bpy_app_icons.h
index 2d7cb96aae7..2904dc06136 100644
--- a/source/blender/python/intern/bpy_app_icons.h
+++ b/source/blender/python/intern/bpy_app_icons.h
@@ -21,6 +21,14 @@
#ifndef __BPY_APP_ICONS_H__
#define __BPY_APP_ICONS_H__
+#ifdef __cplusplus
+extern "C" {
+#endif
+
PyObject *BPY_app_icons_module(void);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* __BPY_APP_ICONS_H__ */
diff --git a/source/blender/python/intern/bpy_app_ocio.h b/source/blender/python/intern/bpy_app_ocio.h
index 66fc03657c1..145cea1a9be 100644
--- a/source/blender/python/intern/bpy_app_ocio.h
+++ b/source/blender/python/intern/bpy_app_ocio.h
@@ -21,6 +21,14 @@
#ifndef __BPY_APP_OCIO_H__
#define __BPY_APP_OCIO_H__
+#ifdef __cplusplus
+extern "C" {
+#endif
+
PyObject *BPY_app_ocio_struct(void);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* __BPY_APP_OCIO_H__ */
diff --git a/source/blender/python/intern/bpy_app_oiio.h b/source/blender/python/intern/bpy_app_oiio.h
index 4b08652dff5..e106a9a055a 100644
--- a/source/blender/python/intern/bpy_app_oiio.h
+++ b/source/blender/python/intern/bpy_app_oiio.h
@@ -21,6 +21,14 @@
#ifndef __BPY_APP_OIIO_H__
#define __BPY_APP_OIIO_H__
+#ifdef __cplusplus
+extern "C" {
+#endif
+
PyObject *BPY_app_oiio_struct(void);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* __BPY_APP_OIIO_H__ */
diff --git a/source/blender/python/intern/bpy_app_opensubdiv.h b/source/blender/python/intern/bpy_app_opensubdiv.h
index f04fa6fb44d..f659e58c071 100644
--- a/source/blender/python/intern/bpy_app_opensubdiv.h
+++ b/source/blender/python/intern/bpy_app_opensubdiv.h
@@ -21,6 +21,14 @@
#ifndef __BPY_APP_OPENSUBDIV_H__
#define __BPY_APP_OPENSUBDIV_H__
+#ifdef __cplusplus
+extern "C" {
+#endif
+
PyObject *BPY_app_opensubdiv_struct(void);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* __BPY_APP_OPENSUBDIV_H__ */
diff --git a/source/blender/python/intern/bpy_app_openvdb.h b/source/blender/python/intern/bpy_app_openvdb.h
index 333d79142f7..60c2bbaa922 100644
--- a/source/blender/python/intern/bpy_app_openvdb.h
+++ b/source/blender/python/intern/bpy_app_openvdb.h
@@ -24,6 +24,14 @@
#ifndef __BPY_APP_OPENVDB_H__
#define __BPY_APP_OPENVDB_H__
+#ifdef __cplusplus
+extern "C" {
+#endif
+
PyObject *BPY_app_openvdb_struct(void);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* __BPY_APP_OPENVDB_H__ */
diff --git a/source/blender/python/intern/bpy_app_sdl.h b/source/blender/python/intern/bpy_app_sdl.h
index 453c1c0c1a3..dd21ece89c7 100644
--- a/source/blender/python/intern/bpy_app_sdl.h
+++ b/source/blender/python/intern/bpy_app_sdl.h
@@ -21,6 +21,14 @@
#ifndef __BPY_APP_SDL_H__
#define __BPY_APP_SDL_H__
+#ifdef __cplusplus
+extern "C" {
+#endif
+
PyObject *BPY_app_sdl_struct(void);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* __BPY_APP_SDL_H__ */
diff --git a/source/blender/python/intern/bpy_app_timers.h b/source/blender/python/intern/bpy_app_timers.h
index bc70e85ae12..6da92eb8b31 100644
--- a/source/blender/python/intern/bpy_app_timers.h
+++ b/source/blender/python/intern/bpy_app_timers.h
@@ -21,6 +21,14 @@
#ifndef __BPY_APP_TIMERS_H__
#define __BPY_APP_TIMERS_H__
+#ifdef __cplusplus
+extern "C" {
+#endif
+
PyObject *BPY_app_timers_module(void);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* __BPY_APP_TIMERS_H__ */
diff --git a/source/blender/python/intern/bpy_app_translations.h b/source/blender/python/intern/bpy_app_translations.h
index e1e82480b49..1e98c7d9aaa 100644
--- a/source/blender/python/intern/bpy_app_translations.h
+++ b/source/blender/python/intern/bpy_app_translations.h
@@ -21,7 +21,15 @@
#ifndef __BPY_APP_TRANSLATIONS_H__
#define __BPY_APP_TRANSLATIONS_H__
+#ifdef __cplusplus
+extern "C" {
+#endif
+
PyObject *BPY_app_translations_struct(void);
void BPY_app_translations_end(void);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* __BPY_APP_TRANSLATIONS_H__ */
diff --git a/source/blender/python/intern/bpy_app_usd.h b/source/blender/python/intern/bpy_app_usd.h
index e3e1d72b366..0482b10974d 100644
--- a/source/blender/python/intern/bpy_app_usd.h
+++ b/source/blender/python/intern/bpy_app_usd.h
@@ -24,6 +24,14 @@
#ifndef __BPY_APP_USD_H__
#define __BPY_APP_USD_H__
+#ifdef __cplusplus
+extern "C" {
+#endif
+
PyObject *BPY_app_usd_struct(void);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* __BPY_APP_USD_H__ */
diff --git a/source/blender/python/intern/bpy_capi_utils.h b/source/blender/python/intern/bpy_capi_utils.h
index 97344ce1326..46206f134ba 100644
--- a/source/blender/python/intern/bpy_capi_utils.h
+++ b/source/blender/python/intern/bpy_capi_utils.h
@@ -25,6 +25,10 @@
# error "Python 3.7 or greater is required, you'll need to update your Python."
#endif
+#ifdef __cplusplus
+extern "C" {
+#endif
+
struct EnumPropertyItem;
struct ReportList;
@@ -50,4 +54,8 @@ void BPy_SetContext(struct bContext *C);
extern void bpy_context_set(struct bContext *C, PyGILState_STATE *gilstate);
extern void bpy_context_clear(struct bContext *C, const PyGILState_STATE *gilstate);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* __BPY_CAPI_UTILS_H__ */
diff --git a/source/blender/python/intern/bpy_driver.h b/source/blender/python/intern/bpy_driver.h
index c77815c7e0e..84f3cbdbbb3 100644
--- a/source/blender/python/intern/bpy_driver.h
+++ b/source/blender/python/intern/bpy_driver.h
@@ -21,7 +21,15 @@
#ifndef __BPY_DRIVER_H__
#define __BPY_DRIVER_H__
+#ifdef __cplusplus
+extern "C" {
+#endif
+
int bpy_pydriver_create_dict(void);
extern PyObject *bpy_pydriver_Dict;
+#ifdef __cplusplus
+}
+#endif
+
#endif /* __BPY_DRIVER_H__ */
diff --git a/source/blender/python/intern/bpy_gizmo_wrap.h b/source/blender/python/intern/bpy_gizmo_wrap.h
index d9031282c40..3a46dd5d78b 100644
--- a/source/blender/python/intern/bpy_gizmo_wrap.h
+++ b/source/blender/python/intern/bpy_gizmo_wrap.h
@@ -24,8 +24,16 @@
struct wmGizmoGroupType;
struct wmGizmoType;
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* exposed to rna/wm api */
void BPY_RNA_gizmo_wrapper(struct wmGizmoType *gzt, void *userdata);
void BPY_RNA_gizmogroup_wrapper(struct wmGizmoGroupType *gzgt, void *userdata);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* __BPY_GIZMO_WRAP_H__ */
diff --git a/source/blender/python/intern/bpy_intern_string.h b/source/blender/python/intern/bpy_intern_string.h
index 14f9607f3b4..f87a43e6bf6 100644
--- a/source/blender/python/intern/bpy_intern_string.h
+++ b/source/blender/python/intern/bpy_intern_string.h
@@ -21,6 +21,10 @@
* \ingroup pythonintern
*/
+#ifdef __cplusplus
+extern "C" {
+#endif
+
void bpy_intern_string_init(void);
void bpy_intern_string_exit(void);
@@ -41,4 +45,8 @@ extern PyObject *bpy_intern_str_register;
extern PyObject *bpy_intern_str_self;
extern PyObject *bpy_intern_str_unregister;
+#ifdef __cplusplus
+}
+#endif
+
#endif /* __BPY_INTERN_STRING_H__ */
diff --git a/source/blender/python/intern/bpy_library.h b/source/blender/python/intern/bpy_library.h
index 6840807d2b0..aca4ae94d6e 100644
--- a/source/blender/python/intern/bpy_library.h
+++ b/source/blender/python/intern/bpy_library.h
@@ -21,9 +21,17 @@
#ifndef __BPY_LIBRARY_H__
#define __BPY_LIBRARY_H__
+#ifdef __cplusplus
+extern "C" {
+#endif
+
int BPY_library_load_type_ready(void);
extern PyMethodDef BPY_library_load_method_def;
extern PyMethodDef BPY_library_write_method_def;
+#ifdef __cplusplus
+}
+#endif
+
#endif /* __BPY_LIBRARY_H__ */
diff --git a/source/blender/python/intern/bpy_msgbus.h b/source/blender/python/intern/bpy_msgbus.h
index 2b3cc4cfaf4..9a797218832 100644
--- a/source/blender/python/intern/bpy_msgbus.h
+++ b/source/blender/python/intern/bpy_msgbus.h
@@ -21,6 +21,14 @@
#ifndef __BPY_MSGBUS_H__
#define __BPY_MSGBUS_H__
+#ifdef __cplusplus
+extern "C" {
+#endif
+
PyObject *BPY_msgbus_module(void);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* __BPY_MSGBUS_H__ */
diff --git a/source/blender/python/intern/bpy_operator.h b/source/blender/python/intern/bpy_operator.h
index 37f6b90fbdb..37a6acfe822 100644
--- a/source/blender/python/intern/bpy_operator.h
+++ b/source/blender/python/intern/bpy_operator.h
@@ -21,6 +21,10 @@
#ifndef __BPY_OPERATOR_H__
#define __BPY_OPERATOR_H__
+#ifdef __cplusplus
+extern "C" {
+#endif
+
extern PyTypeObject pyop_base_Type;
#define BPy_OperatorBase_Check(v) (PyObject_TypeCheck(v, &pyop_base_Type))
@@ -31,4 +35,8 @@ typedef struct {
PyObject *BPY_operator_module(void);
+#ifdef __cplusplus
+}
+#endif
+
#endif
diff --git a/source/blender/python/intern/bpy_operator_wrap.h b/source/blender/python/intern/bpy_operator_wrap.h
index 5bb087540cc..942f9dbea39 100644
--- a/source/blender/python/intern/bpy_operator_wrap.h
+++ b/source/blender/python/intern/bpy_operator_wrap.h
@@ -23,6 +23,10 @@
struct wmOperatorType;
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* these are used for operator methods, used by bpy_operator.c */
PyObject *PYOP_wrap_macro_define(PyObject *self, PyObject *args);
@@ -30,4 +34,8 @@ PyObject *PYOP_wrap_macro_define(PyObject *self, PyObject *args);
void BPY_RNA_operator_wrapper(struct wmOperatorType *ot, void *userdata);
void BPY_RNA_operator_macro_wrapper(struct wmOperatorType *ot, void *userdata);
+#ifdef __cplusplus
+}
+#endif
+
#endif
diff --git a/source/blender/python/intern/bpy_path.h b/source/blender/python/intern/bpy_path.h
index 3f102ae2bb9..0da9e610b53 100644
--- a/source/blender/python/intern/bpy_path.h
+++ b/source/blender/python/intern/bpy_path.h
@@ -21,6 +21,14 @@
#ifndef __BPY_PATH_H__
#define __BPY_PATH_H__
+#ifdef __cplusplus
+extern "C" {
+#endif
+
PyObject *BPyInit__bpy_path(void);
+#ifdef __cplusplus
+}
+#endif
+
#endif
diff --git a/source/blender/python/intern/bpy_props.h b/source/blender/python/intern/bpy_props.h
index d559a3493b4..9bcfe8e263a 100644
--- a/source/blender/python/intern/bpy_props.h
+++ b/source/blender/python/intern/bpy_props.h
@@ -21,6 +21,10 @@
#ifndef __BPY_PROPS_H__
#define __BPY_PROPS_H__
+#ifdef __cplusplus
+extern "C" {
+#endif
+
PyObject *BPY_rna_props(void);
PyObject *BPy_PointerProperty(PyObject *self, PyObject *args, PyObject *kw);
@@ -29,4 +33,8 @@ StructRNA *pointer_type_from_py(PyObject *value, const char *error_prefix);
#define PYRNA_STACK_ARRAY RNA_STACK_ARRAY
+#ifdef __cplusplus
+}
+#endif
+
#endif
diff --git a/source/blender/python/intern/bpy_rna.h b/source/blender/python/intern/bpy_rna.h
index 652d65fe64c..fadda9a8002 100644
--- a/source/blender/python/intern/bpy_rna.h
+++ b/source/blender/python/intern/bpy_rna.h
@@ -67,6 +67,10 @@
struct ID;
+#ifdef __cplusplus
+extern "C" {
+#endif
+
extern PyTypeObject pyrna_struct_meta_idprop_Type;
extern PyTypeObject pyrna_struct_Type;
extern PyTypeObject pyrna_prop_Type;
@@ -265,4 +269,8 @@ extern PyMethodDef meth_bpy_owner_id_get;
extern BPy_StructRNA *bpy_context_module;
+#ifdef __cplusplus
+}
+#endif
+
#endif
diff --git a/source/blender/python/intern/bpy_rna_anim.h b/source/blender/python/intern/bpy_rna_anim.h
index 7630c268bbe..88537778dde 100644
--- a/source/blender/python/intern/bpy_rna_anim.h
+++ b/source/blender/python/intern/bpy_rna_anim.h
@@ -21,6 +21,10 @@
* \ingroup pythonintern
*/
+#ifdef __cplusplus
+extern "C" {
+#endif
+
extern char pyrna_struct_keyframe_insert_doc[];
extern char pyrna_struct_keyframe_delete_doc[];
extern char pyrna_struct_driver_add_doc[];
@@ -31,4 +35,8 @@ PyObject *pyrna_struct_keyframe_delete(BPy_StructRNA *self, PyObject *args, PyOb
PyObject *pyrna_struct_driver_add(BPy_StructRNA *self, PyObject *args);
PyObject *pyrna_struct_driver_remove(BPy_StructRNA *self, PyObject *args);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* __BPY_RNA_ANIM_H__ */
diff --git a/source/blender/python/intern/bpy_rna_callback.h b/source/blender/python/intern/bpy_rna_callback.h
index 71e1f71f8af..67392b60995 100644
--- a/source/blender/python/intern/bpy_rna_callback.h
+++ b/source/blender/python/intern/bpy_rna_callback.h
@@ -24,6 +24,10 @@
struct BPy_StructRNA;
struct PyObject;
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#if 0
PyObject *pyrna_callback_add(BPy_StructRNA *self, PyObject *args);
PyObject *pyrna_callback_remove(BPy_StructRNA *self, PyObject *args);
@@ -32,4 +36,8 @@ PyObject *pyrna_callback_remove(BPy_StructRNA *self, PyObject *args);
PyObject *pyrna_callback_classmethod_add(PyObject *cls, PyObject *args);
PyObject *pyrna_callback_classmethod_remove(PyObject *cls, PyObject *args);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* __BPY_RNA_CALLBACK_H__ */
diff --git a/source/blender/python/intern/bpy_rna_driver.h b/source/blender/python/intern/bpy_rna_driver.h
index 36160d7c867..a534f770732 100644
--- a/source/blender/python/intern/bpy_rna_driver.h
+++ b/source/blender/python/intern/bpy_rna_driver.h
@@ -25,10 +25,18 @@ struct ChannelDriver;
struct DriverTarget;
struct PathResolvedRNA;
+#ifdef __cplusplus
+extern "C" {
+#endif
+
PyObject *pyrna_driver_get_variable_value(struct ChannelDriver *driver, struct DriverTarget *dtar);
PyObject *pyrna_driver_self_from_anim_rna(struct PathResolvedRNA *anim_rna);
bool pyrna_driver_is_equal_anim_rna(const struct PathResolvedRNA *anim_rna,
const PyObject *py_anim_rna);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* __BPY_RNA_DRIVER_H__ */
diff --git a/source/blender/python/intern/bpy_rna_gizmo.h b/source/blender/python/intern/bpy_rna_gizmo.h
index 293ab38a6ab..b209dbf4a26 100644
--- a/source/blender/python/intern/bpy_rna_gizmo.h
+++ b/source/blender/python/intern/bpy_rna_gizmo.h
@@ -21,6 +21,14 @@
#ifndef __BPY_RNA_GIZMO_H__
#define __BPY_RNA_GIZMO_H__
+#ifdef __cplusplus
+extern "C" {
+#endif
+
int BPY_rna_gizmo_module(PyObject *);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* __BPY_RNA_GIZMO_H__ */
diff --git a/source/blender/python/intern/bpy_rna_id_collection.h b/source/blender/python/intern/bpy_rna_id_collection.h
index ee8f4c666a8..223ae126323 100644
--- a/source/blender/python/intern/bpy_rna_id_collection.h
+++ b/source/blender/python/intern/bpy_rna_id_collection.h
@@ -21,8 +21,16 @@
#ifndef __BPY_RNA_ID_COLLECTION_H__
#define __BPY_RNA_ID_COLLECTION_H__
+#ifdef __cplusplus
+extern "C" {
+#endif
+
extern PyMethodDef BPY_rna_id_collection_user_map_method_def;
extern PyMethodDef BPY_rna_id_collection_batch_remove_method_def;
extern PyMethodDef BPY_rna_id_collection_orphans_purge_method_def;
+#ifdef __cplusplus
+}
+#endif
+
#endif /* __BPY_RNA_ID_COLLECTION_H__ */
diff --git a/source/blender/python/intern/bpy_rna_types_capi.h b/source/blender/python/intern/bpy_rna_types_capi.h
index 1049122e468..402dc2c7936 100644
--- a/source/blender/python/intern/bpy_rna_types_capi.h
+++ b/source/blender/python/intern/bpy_rna_types_capi.h
@@ -21,6 +21,14 @@
#ifndef __BPY_RNA_TYPES_CAPI_H__
#define __BPY_RNA_TYPES_CAPI_H__
+#ifdef __cplusplus
+extern "C" {
+#endif
+
void BPY_rna_types_extend_capi(void);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* __BPY_RNA_TYPES_CAPI_H__ */
diff --git a/source/blender/python/intern/bpy_traceback.h b/source/blender/python/intern/bpy_traceback.h
index 11295706240..cb23dd23c9b 100644
--- a/source/blender/python/intern/bpy_traceback.h
+++ b/source/blender/python/intern/bpy_traceback.h
@@ -21,6 +21,14 @@
#ifndef __BPY_TRACEBACK_H__
#define __BPY_TRACEBACK_H__
+#ifdef __cplusplus
+extern "C" {
+#endif
+
void python_script_error_jump(const char *filepath, int *lineno, int *offset);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* __BPY_TRACEBACK_H__ */
diff --git a/source/blender/python/intern/bpy_utils_previews.h b/source/blender/python/intern/bpy_utils_previews.h
index e9de8876068..23fd0216668 100644
--- a/source/blender/python/intern/bpy_utils_previews.h
+++ b/source/blender/python/intern/bpy_utils_previews.h
@@ -21,6 +21,14 @@
#ifndef __BPY_UTILS_PREVIEWS_H__
#define __BPY_UTILS_PREVIEWS_H__
+#ifdef __cplusplus
+extern "C" {
+#endif
+
PyObject *BPY_utils_previews_module(void);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* __BPY_UTILS_PREVIEWS_H__ */
diff --git a/source/blender/python/intern/bpy_utils_units.h b/source/blender/python/intern/bpy_utils_units.h
index 5a30c1c3dae..add766d0d93 100644
--- a/source/blender/python/intern/bpy_utils_units.h
+++ b/source/blender/python/intern/bpy_utils_units.h
@@ -21,6 +21,14 @@
#ifndef __BPY_UTILS_UNITS_H__
#define __BPY_UTILS_UNITS_H__
+#ifdef __cplusplus
+extern "C" {
+#endif
+
PyObject *BPY_utils_units(void);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* __BPY_UTILS_UNITS_H__ */
diff --git a/source/blender/render/extern/include/RE_bake.h b/source/blender/render/extern/include/RE_bake.h
index 3bab9179f84..6bb241b83ed 100644
--- a/source/blender/render/extern/include/RE_bake.h
+++ b/source/blender/render/extern/include/RE_bake.h
@@ -29,6 +29,10 @@ struct ImBuf;
struct Mesh;
struct Render;
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef struct BakeImage {
struct Image *image;
int width;
@@ -120,4 +124,8 @@ void RE_bake_normal_world_to_world(const BakePixel pixel_array[],
void RE_bake_ibuf_clear(struct Image *image, const bool is_tangent);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* __RE_BAKE_H__ */
diff --git a/source/blender/render/extern/include/RE_engine.h b/source/blender/render/extern/include/RE_engine.h
index 51eb290b0b8..49d312923e7 100644
--- a/source/blender/render/extern/include/RE_engine.h
+++ b/source/blender/render/extern/include/RE_engine.h
@@ -48,6 +48,10 @@ struct ViewLayer;
struct bNode;
struct bNodeTree;
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* External Engine */
/* RenderEngineType.flag */
@@ -237,4 +241,8 @@ void RE_bake_engine_set_engine_parameters(struct Render *re,
void RE_engine_free_blender_memory(struct RenderEngine *engine);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* __RE_ENGINE_H__ */
diff --git a/source/blender/render/extern/include/RE_multires_bake.h b/source/blender/render/extern/include/RE_multires_bake.h
index 6abd9be6608..7698ff7d59c 100644
--- a/source/blender/render/extern/include/RE_multires_bake.h
+++ b/source/blender/render/extern/include/RE_multires_bake.h
@@ -27,6 +27,10 @@
struct MultiresBakeRender;
struct Scene;
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef struct MultiresBakeRender {
Scene *scene;
DerivedMesh *lores_dm, *hires_dm;
@@ -63,4 +67,8 @@ typedef struct MultiresBakeRender {
void RE_multires_bake_images(struct MultiresBakeRender *bkr);
+#ifdef __cplusplus
+}
+#endif
+
#endif
diff --git a/source/blender/render/extern/include/RE_render_ext.h b/source/blender/render/extern/include/RE_render_ext.h
index bdf81354b8d..7dfba8f668f 100644
--- a/source/blender/render/extern/include/RE_render_ext.h
+++ b/source/blender/render/extern/include/RE_render_ext.h
@@ -32,6 +32,10 @@ struct Depsgraph;
struct ImagePool;
struct MTex;
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* render_texture.c */
bool RE_texture_evaluate(const struct MTex *mtex,
const float vec[3],
@@ -72,4 +76,8 @@ void RE_point_density_free(struct PointDensity *pd);
void RE_point_density_fix_linking(void);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* __RE_RENDER_EXT_H__ */
diff --git a/source/blender/render/intern/include/initrender.h b/source/blender/render/intern/include/initrender.h
index 99282a8e703..ae78ac1dc1b 100644
--- a/source/blender/render/intern/include/initrender.h
+++ b/source/blender/render/intern/include/initrender.h
@@ -24,10 +24,18 @@
#ifndef __INITRENDER_H__
#define __INITRENDER_H__
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* Functions */
void RE_parts_init(Render *re);
void RE_parts_free(Render *re);
void RE_parts_clamp(Render *re);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* __INITRENDER_H__ */
diff --git a/source/blender/render/intern/include/render_result.h b/source/blender/render/intern/include/render_result.h
index 0ed8871b224..70b358ec5b4 100644
--- a/source/blender/render/intern/include/render_result.h
+++ b/source/blender/render/intern/include/render_result.h
@@ -44,6 +44,10 @@ struct RenderResult;
struct Scene;
struct rcti;
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* New */
struct RenderResult *render_result_new(struct Render *re,
@@ -148,4 +152,8 @@ bool render_result_has_views(struct RenderResult *rr);
} \
((void)0)
+#ifdef __cplusplus
+}
+#endif
+
#endif /* __RENDER_RESULT_H__ */
diff --git a/source/blender/render/intern/include/render_types.h b/source/blender/render/intern/include/render_types.h
index 3ae4b9c0b90..14893c9bd1a 100644
--- a/source/blender/render/intern/include/render_types.h
+++ b/source/blender/render/intern/include/render_types.h
@@ -43,6 +43,10 @@ struct Object;
struct RenderEngine;
struct ReportList;
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* this is handed over to threaded hiding/passes/shading engine */
typedef struct RenderPart {
struct RenderPart *next, *prev;
@@ -160,4 +164,8 @@ struct Render {
/* R.flag */
#define R_ANIMATION 1
+#ifdef __cplusplus
+}
+#endif
+
#endif /* __RENDER_TYPES_H__ */
diff --git a/source/blender/render/intern/include/renderpipeline.h b/source/blender/render/intern/include/renderpipeline.h
index 12b231ef55f..3e8864fe56d 100644
--- a/source/blender/render/intern/include/renderpipeline.h
+++ b/source/blender/render/intern/include/renderpipeline.h
@@ -30,10 +30,18 @@ struct RenderData;
struct RenderLayer;
struct RenderResult;
+#ifdef __cplusplus
+extern "C" {
+#endif
+
struct RenderLayer *render_get_active_layer(struct Render *re, struct RenderResult *rr);
void render_update_anim_renderdata(struct Render *re,
struct RenderData *rd,
struct ListBase *render_layers);
void render_copy_renderdata(struct RenderData *to, struct RenderData *from);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* __RENDERPIPELINE_H__ */
diff --git a/source/blender/render/intern/include/texture.h b/source/blender/render/intern/include/texture.h
index f051d3ed318..1c66cb3f04d 100644
--- a/source/blender/render/intern/include/texture.h
+++ b/source/blender/render/intern/include/texture.h
@@ -24,6 +24,10 @@
#ifndef __TEXTURE_H__
#define __TEXTURE_H__
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#define BRICONT \
texres->tin = (texres->tin - 0.5f) * tex->contrast + tex->bright - 0.5f; \
if (!(tex->flag & TEX_NO_CLAMP)) { \
@@ -95,4 +99,8 @@ void image_sample(struct Image *ima,
float result[4],
struct ImagePool *pool);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* __TEXTURE_H__ */
diff --git a/source/blender/render/intern/include/zbuf.h b/source/blender/render/intern/include/zbuf.h
index bc6addd6c5f..d03f997c8f2 100644
--- a/source/blender/render/intern/include/zbuf.h
+++ b/source/blender/render/intern/include/zbuf.h
@@ -21,6 +21,10 @@
#ifndef __ZBUF_H__
#define __ZBUF_H__
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* span fill in method, is also used to localize data for zbuffering */
typedef struct ZSpan {
int rectx, recty; /* range for clipping */
@@ -40,4 +44,8 @@ void zspan_scanconvert(struct ZSpan *zpan,
float *v3,
void (*func)(void *, int, int, float, float));
+#ifdef __cplusplus
+}
+#endif
+
#endif
diff --git a/source/blender/windowmanager/gizmo/WM_gizmo_api.h b/source/blender/windowmanager/gizmo/WM_gizmo_api.h
index 07a3f0445bb..1066f009214 100644
--- a/source/blender/windowmanager/gizmo/WM_gizmo_api.h
+++ b/source/blender/windowmanager/gizmo/WM_gizmo_api.h
@@ -52,6 +52,10 @@ struct wmWindowManager;
#include "wm_gizmo_fn.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* -------------------------------------------------------------------- */
/* wmGizmo */
@@ -396,4 +400,8 @@ void WM_gizmo_group_tag_remove(struct wmGizmoGroup *gzgroup);
bool WM_gizmo_group_type_poll(const struct bContext *C, const struct wmGizmoGroupType *gzgt);
void WM_gizmo_group_refresh(const struct bContext *C, struct wmGizmoGroup *gzgroup);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* __WM_GIZMO_API_H__ */
diff --git a/source/blender/windowmanager/gizmo/WM_gizmo_types.h b/source/blender/windowmanager/gizmo/WM_gizmo_types.h
index 3863e3bd797..5def7f8d2f9 100644
--- a/source/blender/windowmanager/gizmo/WM_gizmo_types.h
+++ b/source/blender/windowmanager/gizmo/WM_gizmo_types.h
@@ -40,6 +40,10 @@ struct wmKeyConfig;
#include "DNA_listBase.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* -------------------------------------------------------------------- */
/* Enum Typedef's */
@@ -506,4 +510,8 @@ typedef enum eWM_GizmoFlagMapDrawStep {
} eWM_GizmoFlagMapDrawStep;
#define WM_GIZMOMAP_DRAWSTEP_MAX 2
+#ifdef __cplusplus
+}
+#endif
+
#endif /* __WM_GIZMO_TYPES_H__ */
diff --git a/source/blender/windowmanager/gizmo/wm_gizmo_fn.h b/source/blender/windowmanager/gizmo/wm_gizmo_fn.h
index 58b58fa01d0..00a3f476bac 100644
--- a/source/blender/windowmanager/gizmo/wm_gizmo_fn.h
+++ b/source/blender/windowmanager/gizmo/wm_gizmo_fn.h
@@ -27,6 +27,10 @@
struct wmMsgBus;
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* wmGizmoGroup */
typedef bool (*wmGizmoGroupFnPoll)(const struct bContext *,
struct wmGizmoGroupType *) ATTR_WARN_UNUSED_RESULT;
@@ -85,4 +89,8 @@ typedef struct wmGizmoPropertyFnParams {
void *user_data;
} wmGizmoPropertyFnParams;
+#ifdef __cplusplus
+}
+#endif
+
#endif /* __WM_GIZMO_FN_H__ */
diff --git a/source/blender/windowmanager/gizmo/wm_gizmo_wmapi.h b/source/blender/windowmanager/gizmo/wm_gizmo_wmapi.h
index cc9ccc5f4bb..edded4c7620 100644
--- a/source/blender/windowmanager/gizmo/wm_gizmo_wmapi.h
+++ b/source/blender/windowmanager/gizmo/wm_gizmo_wmapi.h
@@ -36,6 +36,10 @@ struct wmEventHandler_Op;
struct wmGizmoMap;
struct wmOperatorType;
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* -------------------------------------------------------------------- */
/* wmGizmo */
@@ -92,4 +96,8 @@ struct ListBase *wm_gizmomap_groups_get(wmGizmoMap *gzmap);
void wm_gizmomaptypes_free(void);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* __WM_GIZMO_WMAPI_H__ */
diff --git a/source/blender/windowmanager/message_bus/wm_message_bus.h b/source/blender/windowmanager/message_bus/wm_message_bus.h
index 8020be3017a..74472386a39 100644
--- a/source/blender/windowmanager/message_bus/wm_message_bus.h
+++ b/source/blender/windowmanager/message_bus/wm_message_bus.h
@@ -34,6 +34,10 @@ struct wmMsgSubscribeKey;
struct wmMsgSubscribeValue;
struct wmMsgSubscribeValueLink;
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef void (*wmMsgNotifyFn)(struct bContext *C,
struct wmMsgSubscribeKey *msg_key,
struct wmMsgSubscribeValue *msg_val);
@@ -287,4 +291,8 @@ void WM_msg_publish_ID(struct wmMsgBus *mbus, struct ID *id);
} \
((void)0)
+#ifdef __cplusplus
+}
+#endif
+
#endif /* __WM_MESSAGE_BUS_H__ */
diff --git a/source/blender/windowmanager/wm.h b/source/blender/windowmanager/wm.h
index 16aa5cb44db..2b59e047f23 100644
--- a/source/blender/windowmanager/wm.h
+++ b/source/blender/windowmanager/wm.h
@@ -30,6 +30,10 @@ struct wmWindow;
#include "gizmo/wm_gizmo_wmapi.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef struct wmPaintCursor {
struct wmPaintCursor *next, *prev;
@@ -97,4 +101,8 @@ void wm_stereo3d_set_cancel(bContext *C, wmOperator *op);
void wm_open_init_load_ui(wmOperator *op, bool use_prefs);
void wm_open_init_use_scripts(wmOperator *op, bool use_prefs);
+#ifdef __cplusplus
+}
+#endif
+
#endif
diff --git a/source/blender/windowmanager/wm_cursors.h b/source/blender/windowmanager/wm_cursors.h
index 7a28aeb3c70..cdd6b325063 100644
--- a/source/blender/windowmanager/wm_cursors.h
+++ b/source/blender/windowmanager/wm_cursors.h
@@ -27,6 +27,10 @@
struct wmEvent;
struct wmWindow;
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef enum WMCursorType {
WM_CURSOR_DEFAULT = 1,
WM_CURSOR_TEXT_EDIT,
@@ -77,4 +81,8 @@ typedef enum WMCursorType {
void wm_init_cursor_data(void);
bool wm_cursor_arrow_move(struct wmWindow *win, const struct wmEvent *event);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* __WM_CURSORS_H__ */
diff --git a/source/blender/windowmanager/wm_draw.h b/source/blender/windowmanager/wm_draw.h
index ff2fc25333a..a675647f57a 100644
--- a/source/blender/windowmanager/wm_draw.h
+++ b/source/blender/windowmanager/wm_draw.h
@@ -30,6 +30,10 @@ struct GPUOffScreen;
struct GPUTexture;
struct GPUViewport;
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef struct wmDrawBuffer {
struct GPUOffScreen *offscreen;
struct GPUViewport *viewport;
@@ -50,4 +54,8 @@ void wm_draw_region_test(struct bContext *C, struct ScrArea *area, struct ARegio
struct GPUTexture *wm_draw_region_texture(struct ARegion *region, int view);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* __WM_DRAW_H__ */
diff --git a/source/blender/windowmanager/wm_event_system.h b/source/blender/windowmanager/wm_event_system.h
index efcf40d03eb..c61ba61f55d 100644
--- a/source/blender/windowmanager/wm_event_system.h
+++ b/source/blender/windowmanager/wm_event_system.h
@@ -34,6 +34,10 @@ struct ARegion;
struct GHOST_TabletData;
struct ScrArea;
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* wmKeyMap is in DNA_windowmanager.h, it's saveable */
/** Custom types for handlers, for signaling, freeing */
@@ -165,4 +169,8 @@ void wm_dropbox_free(void);
void wm_drags_check_ops(bContext *C, const wmEvent *event);
void wm_drags_draw(bContext *C, wmWindow *win, rcti *rect);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* __WM_EVENT_SYSTEM_H__ */
diff --git a/source/blender/windowmanager/wm_event_types.h b/source/blender/windowmanager/wm_event_types.h
index ffed86abfe7..16b872c3c9c 100644
--- a/source/blender/windowmanager/wm_event_types.h
+++ b/source/blender/windowmanager/wm_event_types.h
@@ -26,6 +26,10 @@
#ifndef __WM_EVENT_TYPES_H__
#define __WM_EVENT_TYPES_H__
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* customdata type */
enum {
EVT_DATA_TIMER = 2,
@@ -489,4 +493,8 @@ enum {
GESTURE_MODAL_CIRCLE_SIZE = 11,
};
+#ifdef __cplusplus
+}
+#endif
+
#endif /* __WM_EVENT_TYPES_H__ */
diff --git a/source/blender/windowmanager/wm_files.h b/source/blender/windowmanager/wm_files.h
index 42eab35cdb9..d7f8c3fc583 100644
--- a/source/blender/windowmanager/wm_files.h
+++ b/source/blender/windowmanager/wm_files.h
@@ -28,6 +28,10 @@ struct Main;
struct wmGenericCallback;
struct wmOperatorType;
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* wm_files.c */
void wm_history_file_read(void);
void wm_homefile_read(struct bContext *C,
@@ -68,4 +72,8 @@ void WM_OT_append(struct wmOperatorType *ot);
void WM_OT_lib_relocate(struct wmOperatorType *ot);
void WM_OT_lib_reload(struct wmOperatorType *ot);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* __WM_FILES_H__ */
diff --git a/source/blender/windowmanager/wm_surface.h b/source/blender/windowmanager/wm_surface.h
index bc1cc825e4b..8ab6301e8c9 100644
--- a/source/blender/windowmanager/wm_surface.h
+++ b/source/blender/windowmanager/wm_surface.h
@@ -27,6 +27,10 @@
struct bContext;
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef struct wmSurface {
struct wmSurface *next, *prev;
@@ -59,4 +63,8 @@ void wm_surface_clear_drawable(void);
void wm_surface_set_drawable(wmSurface *surface, bool activate);
void wm_surface_reset_drawable(void);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* __WM_SURFACE_H__ */
diff --git a/source/blender/windowmanager/wm_window.h b/source/blender/windowmanager/wm_window.h
index 5ca5711b4f2..e3e8abae531 100644
--- a/source/blender/windowmanager/wm_window.h
+++ b/source/blender/windowmanager/wm_window.h
@@ -26,6 +26,10 @@
struct wmOperator;
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* *************** internal api ************** */
void wm_ghost_init(bContext *C);
void wm_ghost_exit(void);
@@ -85,4 +89,8 @@ int wm_window_new_main_exec(bContext *C, struct wmOperator *op);
void wm_test_autorun_warning(bContext *C);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* __WM_WINDOW_H__ */
diff --git a/tests/gtests/alembic/abc_export_test.cc b/tests/gtests/alembic/abc_export_test.cc
index cdc98178550..5c2b505958e 100644
--- a/tests/gtests/alembic/abc_export_test.cc
+++ b/tests/gtests/alembic/abc_export_test.cc
@@ -4,13 +4,11 @@
#include "exporter/abc_archive.h"
#include "intern/abc_util.h"
-extern "C" {
#include "BKE_main.h"
#include "BLI_fileops.h"
#include "BLI_math.h"
#include "BLI_utildefines.h"
#include "DNA_scene_types.h"
-}
#include "DEG_depsgraph.h"
diff --git a/tests/gtests/alembic/abc_matrix_test.cc b/tests/gtests/alembic/abc_matrix_test.cc
index fe0635ea7ab..b58e989b1a1 100644
--- a/tests/gtests/alembic/abc_matrix_test.cc
+++ b/tests/gtests/alembic/abc_matrix_test.cc
@@ -3,10 +3,8 @@
// Keep first since utildefines defines AT which conflicts with STL
#include "intern/abc_axis_conversion.h"
-extern "C" {
#include "BLI_math.h"
#include "BLI_utildefines.h"
-}
namespace blender {
namespace io {
diff --git a/tests/gtests/blenlib/BLI_array_store_test.cc b/tests/gtests/blenlib/BLI_array_store_test.cc
index 5e8548911a2..a1ec8ec7bb3 100644
--- a/tests/gtests/blenlib/BLI_array_store_test.cc
+++ b/tests/gtests/blenlib/BLI_array_store_test.cc
@@ -4,7 +4,6 @@
#include "MEM_guardedalloc.h"
-extern "C" {
#include "BLI_array_store.h"
#include "BLI_array_utils.h"
#include "BLI_listbase.h"
@@ -13,7 +12,6 @@ extern "C" {
#include "BLI_string.h"
#include "BLI_sys_types.h"
#include "BLI_utildefines.h"
-}
/* print memory savings */
// #define DEBUG_PRINT
diff --git a/tests/gtests/blenlib/BLI_array_utils_test.cc b/tests/gtests/blenlib/BLI_array_utils_test.cc
index d6da9787768..33b4cd35d52 100644
--- a/tests/gtests/blenlib/BLI_array_utils_test.cc
+++ b/tests/gtests/blenlib/BLI_array_utils_test.cc
@@ -2,11 +2,9 @@
#include "testing/testing.h"
-extern "C" {
#include "BLI_array_utils.h"
#include "BLI_utildefines.h"
#include "BLI_utildefines_stack.h"
-}
/* -------------------------------------------------------------------- */
/* tests */
diff --git a/tests/gtests/blenlib/BLI_delaunay_2d_test.cc b/tests/gtests/blenlib/BLI_delaunay_2d_test.cc
index 6065ccc4e57..8d62b111e12 100644
--- a/tests/gtests/blenlib/BLI_delaunay_2d_test.cc
+++ b/tests/gtests/blenlib/BLI_delaunay_2d_test.cc
@@ -4,13 +4,11 @@
#include "MEM_guardedalloc.h"
-extern "C" {
#include "BLI_math.h"
#include "BLI_rand.h"
#include "PIL_time.h"
#include "BLI_delaunay_2d.h"
-}
#include <fstream>
#include <iostream>
diff --git a/tests/gtests/blenlib/BLI_expr_pylike_eval_test.cc b/tests/gtests/blenlib/BLI_expr_pylike_eval_test.cc
index 1b17e6d839e..aad21ae4ad4 100644
--- a/tests/gtests/blenlib/BLI_expr_pylike_eval_test.cc
+++ b/tests/gtests/blenlib/BLI_expr_pylike_eval_test.cc
@@ -4,10 +4,8 @@
#include <string.h>
-extern "C" {
#include "BLI_expr_pylike_eval.h"
#include "BLI_math.h"
-};
#define TRUE_VAL 1.0
#define FALSE_VAL 0.0
diff --git a/tests/gtests/blenlib/BLI_ghash_performance_test.cc b/tests/gtests/blenlib/BLI_ghash_performance_test.cc
index 201598869e8..afabbcaae80 100644
--- a/tests/gtests/blenlib/BLI_ghash_performance_test.cc
+++ b/tests/gtests/blenlib/BLI_ghash_performance_test.cc
@@ -7,13 +7,11 @@
#include "MEM_guardedalloc.h"
-extern "C" {
#include "BLI_ghash.h"
#include "BLI_rand.h"
#include "BLI_string.h"
#include "BLI_utildefines.h"
#include "PIL_time_utildefines.h"
-}
/* Using http://corpora.uni-leipzig.de/downloads/eng_wikipedia_2010_1M-text.tar.gz
* (1 million of words, about 122MB of text) from
diff --git a/tests/gtests/blenlib/BLI_ghash_test.cc b/tests/gtests/blenlib/BLI_ghash_test.cc
index a4b727e82aa..fcc0512cb9e 100644
--- a/tests/gtests/blenlib/BLI_ghash_test.cc
+++ b/tests/gtests/blenlib/BLI_ghash_test.cc
@@ -4,11 +4,9 @@
#define GHASH_INTERNAL_API
-extern "C" {
#include "BLI_ghash.h"
#include "BLI_rand.h"
#include "BLI_utildefines.h"
-}
#define TESTCASE_SIZE 10000
diff --git a/tests/gtests/blenlib/BLI_hash_mm2a_test.cc b/tests/gtests/blenlib/BLI_hash_mm2a_test.cc
index 4f6570d93ad..c7bea8e15de 100644
--- a/tests/gtests/blenlib/BLI_hash_mm2a_test.cc
+++ b/tests/gtests/blenlib/BLI_hash_mm2a_test.cc
@@ -2,9 +2,7 @@
#include "testing/testing.h"
-extern "C" {
#include "BLI_hash_mm2a.h"
-}
/* Note: Reference results are taken from reference implementation
* (cpp code, CMurmurHash2A variant):
diff --git a/tests/gtests/blenlib/BLI_heap_simple_test.cc b/tests/gtests/blenlib/BLI_heap_simple_test.cc
index f4d614def9e..e717a6e2653 100644
--- a/tests/gtests/blenlib/BLI_heap_simple_test.cc
+++ b/tests/gtests/blenlib/BLI_heap_simple_test.cc
@@ -5,13 +5,11 @@
#include "MEM_guardedalloc.h"
-extern "C" {
#include "BLI_compiler_attrs.h"
#include "BLI_heap_simple.h"
#include "BLI_rand.h"
#include "BLI_sys_types.h"
#include "BLI_utildefines.h"
-};
#define SIZE 1024
diff --git a/tests/gtests/blenlib/BLI_heap_test.cc b/tests/gtests/blenlib/BLI_heap_test.cc
index cda13e62bb8..87e68c175a2 100644
--- a/tests/gtests/blenlib/BLI_heap_test.cc
+++ b/tests/gtests/blenlib/BLI_heap_test.cc
@@ -5,12 +5,10 @@
#include "MEM_guardedalloc.h"
-extern "C" {
#include "BLI_compiler_attrs.h"
#include "BLI_heap.h"
#include "BLI_rand.h"
#include "BLI_utildefines.h"
-};
#define SIZE 1024
diff --git a/tests/gtests/blenlib/BLI_kdopbvh_test.cc b/tests/gtests/blenlib/BLI_kdopbvh_test.cc
index 333f7ffbf44..f8a4fc1290a 100644
--- a/tests/gtests/blenlib/BLI_kdopbvh_test.cc
+++ b/tests/gtests/blenlib/BLI_kdopbvh_test.cc
@@ -6,12 +6,10 @@
#include "MEM_guardedalloc.h"
-extern "C" {
#include "BLI_compiler_attrs.h"
#include "BLI_kdopbvh.h"
#include "BLI_math_vector.h"
#include "BLI_rand.h"
-}
#include "stubs/bf_intern_eigen_stubs.h"
diff --git a/tests/gtests/blenlib/BLI_listbase_test.cc b/tests/gtests/blenlib/BLI_listbase_test.cc
index 32dbd49c8fc..e5b504a0040 100644
--- a/tests/gtests/blenlib/BLI_listbase_test.cc
+++ b/tests/gtests/blenlib/BLI_listbase_test.cc
@@ -4,13 +4,11 @@
#include "MEM_guardedalloc.h"
-extern "C" {
#include "BLI_array_utils.h"
#include "BLI_listbase.h"
#include "BLI_path_util.h"
#include "BLI_ressource_strings.h"
#include "BLI_string.h"
-}
/* local validation function */
static bool listbase_is_valid(const ListBase *listbase)
diff --git a/tests/gtests/blenlib/BLI_memiter_test.cc b/tests/gtests/blenlib/BLI_memiter_test.cc
index 05602dcc1c8..3cc86630005 100644
--- a/tests/gtests/blenlib/BLI_memiter_test.cc
+++ b/tests/gtests/blenlib/BLI_memiter_test.cc
@@ -4,13 +4,11 @@
#include "MEM_guardedalloc.h"
-extern "C" {
#include "BLI_array_utils.h"
#include "BLI_memiter.h"
#include "BLI_ressource_strings.h"
#include "BLI_string.h"
-}
TEST(memiter, Nop)
{
diff --git a/tests/gtests/blenlib/BLI_path_util_test.cc b/tests/gtests/blenlib/BLI_path_util_test.cc
index 734bbc2b31e..c9e6f3357ff 100644
--- a/tests/gtests/blenlib/BLI_path_util_test.cc
+++ b/tests/gtests/blenlib/BLI_path_util_test.cc
@@ -2,7 +2,6 @@
#include "testing/testing.h"
-extern "C" {
#include "../../../source/blender/imbuf/IMB_imbuf.h"
#include "BLI_fileops.h"
#include "BLI_path_util.h"
@@ -11,7 +10,6 @@ extern "C" {
#ifdef _WIN32
# include "../../../source/blender/blenkernel/BKE_global.h"
#endif
-}
/* -------------------------------------------------------------------- */
/* stubs */
diff --git a/tests/gtests/blenlib/BLI_polyfill_2d_test.cc b/tests/gtests/blenlib/BLI_polyfill_2d_test.cc
index 911137bb83b..527a23ac3a8 100644
--- a/tests/gtests/blenlib/BLI_polyfill_2d_test.cc
+++ b/tests/gtests/blenlib/BLI_polyfill_2d_test.cc
@@ -11,7 +11,6 @@
#include "MEM_guardedalloc.h"
-extern "C" {
#include "BLI_array_utils.h"
#include "BLI_edgehash.h"
#include "BLI_math.h"
@@ -27,7 +26,6 @@ extern "C" {
# include "BLI_memarena.h"
# include "BLI_polyfill_2d_beautify.h"
#endif
-}
#include "stubs/bf_intern_eigen_stubs.h"
diff --git a/tests/gtests/blenlib/BLI_stack_test.cc b/tests/gtests/blenlib/BLI_stack_test.cc
index 359e61c6f47..211916e3193 100644
--- a/tests/gtests/blenlib/BLI_stack_test.cc
+++ b/tests/gtests/blenlib/BLI_stack_test.cc
@@ -3,11 +3,9 @@
#include "testing/testing.h"
#include <string.h>
-extern "C" {
#include "BLI_array.h"
#include "BLI_stack.h"
#include "BLI_utildefines.h"
-};
#define SIZE 1024
diff --git a/tests/gtests/blenlib/BLI_string_test.cc b/tests/gtests/blenlib/BLI_string_test.cc
index aae0c12c8b2..0358a1611f2 100644
--- a/tests/gtests/blenlib/BLI_string_test.cc
+++ b/tests/gtests/blenlib/BLI_string_test.cc
@@ -9,12 +9,10 @@
#include <utility>
#include <vector>
-extern "C" {
#include "BLI_string.h"
#include "BLI_string_utf8.h"
#include "BLI_string_utils.h"
#include "BLI_utildefines.h"
-}
using std::initializer_list;
using std::pair;
diff --git a/tests/gtests/blenlib/BLI_string_utf8_test.cc b/tests/gtests/blenlib/BLI_string_utf8_test.cc
index 3e2ade40019..c496f918dc0 100644
--- a/tests/gtests/blenlib/BLI_string_utf8_test.cc
+++ b/tests/gtests/blenlib/BLI_string_utf8_test.cc
@@ -2,11 +2,9 @@
#include "testing/testing.h"
-extern "C" {
#include "BLI_string.h"
#include "BLI_string_utf8.h"
#include "BLI_utildefines.h"
-}
/* Note that 'common' utf-8 variants of string functions (like copy, etc.) are tested in
* BLI_string_test.cc However, tests below are specific utf-8 conformance ones, and since they eat
diff --git a/tests/gtests/blenlib/BLI_task_performance_test.cc b/tests/gtests/blenlib/BLI_task_performance_test.cc
index 06e832bdb5e..208f168b599 100644
--- a/tests/gtests/blenlib/BLI_task_performance_test.cc
+++ b/tests/gtests/blenlib/BLI_task_performance_test.cc
@@ -9,7 +9,6 @@
#include "MEM_guardedalloc.h"
-extern "C" {
#include "BLI_utildefines.h"
#include "BLI_listbase.h"
@@ -17,7 +16,6 @@ extern "C" {
#include "BLI_task.h"
#include "PIL_time.h"
-}
#define NUM_RUN_AVERAGED 100
diff --git a/tests/gtests/blenlib/BLI_task_test.cc b/tests/gtests/blenlib/BLI_task_test.cc
index ed300b3f238..3abaf6a6c0b 100644
--- a/tests/gtests/blenlib/BLI_task_test.cc
+++ b/tests/gtests/blenlib/BLI_task_test.cc
@@ -7,13 +7,11 @@
#include "MEM_guardedalloc.h"
-extern "C" {
#include "BLI_utildefines.h"
#include "BLI_listbase.h"
#include "BLI_mempool.h"
#include "BLI_task.h"
-};
#define NUM_ITEMS 10000
diff --git a/tests/gtests/blenloader/blendfile_loading_base_test.cc b/tests/gtests/blenloader/blendfile_loading_base_test.cc
index 1f3a312de5d..d74bab4b31c 100644
--- a/tests/gtests/blenloader/blendfile_loading_base_test.cc
+++ b/tests/gtests/blenloader/blendfile_loading_base_test.cc
@@ -19,7 +19,6 @@
#include "MEM_guardedalloc.h"
-extern "C" {
#include "BKE_appdir.h"
#include "BKE_blender.h"
#include "BKE_context.h"
@@ -48,7 +47,6 @@ extern "C" {
#include "WM_api.h"
#include "wm.h"
-}
BlendfileLoadingBaseTest::~BlendfileLoadingBaseTest()
{
diff --git a/tests/gtests/guardedalloc/guardedalloc_alignment_test.cc b/tests/gtests/guardedalloc/guardedalloc_alignment_test.cc
index 4866ac44e3c..4c676c6cc76 100644
--- a/tests/gtests/guardedalloc/guardedalloc_alignment_test.cc
+++ b/tests/gtests/guardedalloc/guardedalloc_alignment_test.cc
@@ -2,9 +2,7 @@
#include "testing/testing.h"
-extern "C" {
#include "BLI_utildefines.h"
-}
#include "MEM_guardedalloc.h"