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 /source/blender/python
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.
Diffstat (limited to 'source/blender/python')
-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
35 files changed, 280 insertions, 0 deletions
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__ */