diff --git a/source/blender/makesrna/intern/rna_wm.cc b/source/blender/makesrna/intern/rna_wm.cc index 6300629b048..2bd5c837657 100644 --- a/source/blender/makesrna/intern/rna_wm.cc +++ b/source/blender/makesrna/intern/rna_wm.cc @@ -1610,8 +1610,8 @@ static bool rna_Operator_unregister(Main *bmain, StructRNA *type); /* `bpy_operator_wrap.cc` */ -extern "C" void BPY_RNA_operator_wrapper(wmOperatorType *ot, void *userdata); -extern "C" void BPY_RNA_operator_macro_wrapper(wmOperatorType *ot, void *userdata); +extern void BPY_RNA_operator_wrapper(wmOperatorType *ot, void *userdata); +extern void BPY_RNA_operator_macro_wrapper(wmOperatorType *ot, void *userdata); static StructRNA *rna_Operator_register(Main *bmain, ReportList *reports, diff --git a/source/blender/makesrna/intern/rna_wm_gizmo.cc b/source/blender/makesrna/intern/rna_wm_gizmo.cc index 71f679fcad2..7fc6299f0b2 100644 --- a/source/blender/makesrna/intern/rna_wm_gizmo.cc +++ b/source/blender/makesrna/intern/rna_wm_gizmo.cc @@ -412,7 +412,7 @@ static PointerRNA rna_Gizmo_group_get(PointerRNA *ptr) # ifdef WITH_PYTHON static bool rna_Gizmo_unregister(Main *bmain, StructRNA *type); -extern "C" void BPY_RNA_gizmo_wrapper(wmGizmoType *gzgt, void *userdata); +extern void BPY_RNA_gizmo_wrapper(wmGizmoType *gzgt, void *userdata); static StructRNA *rna_Gizmo_register(Main *bmain, ReportList *reports, @@ -787,7 +787,7 @@ static void rna_gizmogroup_invoke_prepare_cb(const bContext *C, RNA_parameter_list_free(&list); } -extern "C" void BPY_RNA_gizmogroup_wrapper(wmGizmoGroupType *gzgt, void *userdata); +extern void BPY_RNA_gizmogroup_wrapper(wmGizmoGroupType *gzgt, void *userdata); static bool rna_GizmoGroup_unregister(Main *bmain, StructRNA *type); static StructRNA *rna_GizmoGroup_register(Main *bmain, diff --git a/source/blender/python/intern/CMakeLists.txt b/source/blender/python/intern/CMakeLists.txt index b4a1620fc26..ceaae60d74a 100644 --- a/source/blender/python/intern/CMakeLists.txt +++ b/source/blender/python/intern/CMakeLists.txt @@ -72,7 +72,7 @@ set(SRC bpy_utils_units.cc stubs.cc - bpy.h + bpy.hh bpy_app.hh bpy_app_alembic.hh bpy_app_build_options.hh @@ -88,16 +88,16 @@ set(SRC bpy_app_translations.hh bpy_app_usd.hh bpy_capi_utils.h - bpy_cli_command.h - bpy_driver.h - bpy_gizmo_wrap.h - bpy_intern_string.h - bpy_library.h - bpy_msgbus.h - bpy_operator.h - bpy_operator_wrap.h - bpy_path.h - bpy_props.h + bpy_cli_command.hh + bpy_driver.hh + bpy_gizmo_wrap.hh + bpy_intern_string.hh + bpy_library.hh + bpy_msgbus.hh + bpy_operator.hh + bpy_operator_wrap.hh + bpy_path.hh + bpy_props.hh bpy_rna.hh bpy_rna_anim.hh bpy_rna_callback.hh @@ -110,9 +110,9 @@ set(SRC bpy_rna_text.hh bpy_rna_types_capi.hh bpy_rna_ui.hh - bpy_traceback.h - bpy_utils_previews.h - bpy_utils_units.h + bpy_traceback.hh + bpy_utils_previews.hh + bpy_utils_units.hh ../BPY_extern.h ../BPY_extern_clog.h ../BPY_extern_python.h diff --git a/source/blender/python/intern/bpy.cc b/source/blender/python/intern/bpy.cc index ea56b55d993..dee0fffdc03 100644 --- a/source/blender/python/intern/bpy.cc +++ b/source/blender/python/intern/bpy.cc @@ -32,19 +32,19 @@ #include "WM_api.hh" /* For #WM_ghost_backend */ -#include "bpy.h" +#include "bpy.hh" #include "bpy_app.hh" -#include "bpy_cli_command.h" -#include "bpy_driver.h" -#include "bpy_library.h" -#include "bpy_operator.h" -#include "bpy_props.h" +#include "bpy_cli_command.hh" +#include "bpy_driver.hh" +#include "bpy_library.hh" +#include "bpy_operator.hh" +#include "bpy_props.hh" #include "bpy_rna.hh" #include "bpy_rna_data.hh" #include "bpy_rna_gizmo.hh" #include "bpy_rna_types_capi.hh" -#include "bpy_utils_previews.h" -#include "bpy_utils_units.h" +#include "bpy_utils_previews.hh" +#include "bpy_utils_units.hh" #include "../generic/py_capi_utils.h" #include "../generic/python_compat.h" @@ -53,7 +53,7 @@ /* external util modules */ #include "../generic/idprop_py_api.h" #include "../generic/idprop_py_ui_api.h" -#include "bpy_msgbus.h" +#include "bpy_msgbus.hh" #ifdef WITH_FREESTYLE # include "BPy_Freestyle.h" diff --git a/source/blender/python/intern/bpy.h b/source/blender/python/intern/bpy.hh similarity index 71% rename from source/blender/python/intern/bpy.h rename to source/blender/python/intern/bpy.hh index cf38995b9e3..e70a1cbad45 100644 --- a/source/blender/python/intern/bpy.h +++ b/source/blender/python/intern/bpy.hh @@ -8,26 +8,18 @@ #pragma once -#ifdef __cplusplus -extern "C" { -#endif - struct bContext; /** Creates the `bpy` module and adds it to `sys.modules` for importing. */ -void BPy_init_modules(struct bContext *C); +void BPy_init_modules(bContext *C); extern PyObject *bpy_package_py; /* `bpy_interface_atexit.cc` */ -void BPY_atexit_register(void); -void BPY_atexit_unregister(void); +void BPY_atexit_register(); +void BPY_atexit_unregister(); extern struct CLG_LogRef *BPY_LOG_CONTEXT; extern struct CLG_LogRef *BPY_LOG_RNA; extern struct CLG_LogRef *BPY_LOG_INTERFACE; - -#ifdef __cplusplus -} -#endif diff --git a/source/blender/python/intern/bpy_app.cc b/source/blender/python/intern/bpy_app.cc index 6b2c3b0a49e..278004f8959 100644 --- a/source/blender/python/intern/bpy_app.cc +++ b/source/blender/python/intern/bpy_app.cc @@ -27,7 +27,7 @@ #include "bpy_app_translations.hh" #include "bpy_app_handlers.hh" -#include "bpy_driver.h" +#include "bpy_driver.hh" #include "BPY_extern_python.h" /* For #BPY_python_app_help_text_fn. */ diff --git a/source/blender/python/intern/bpy_cli_command.cc b/source/blender/python/intern/bpy_cli_command.cc index 2cf29730baa..5610a174308 100644 --- a/source/blender/python/intern/bpy_cli_command.cc +++ b/source/blender/python/intern/bpy_cli_command.cc @@ -21,7 +21,7 @@ #include "../generic/python_compat.h" #include "../generic/python_utildefines.h" -#include "bpy_cli_command.h" /* Own include. */ +#include "bpy_cli_command.hh" /* Own include. */ static const char *bpy_cli_command_capsule_name = "bpy_cli_command"; static const char *bpy_cli_command_capsule_name_invalid = "bpy_cli_command"; diff --git a/source/blender/python/intern/bpy_cli_command.h b/source/blender/python/intern/bpy_cli_command.hh similarity index 78% rename from source/blender/python/intern/bpy_cli_command.h rename to source/blender/python/intern/bpy_cli_command.hh index b7dac5ed068..7f5db8859cd 100644 --- a/source/blender/python/intern/bpy_cli_command.h +++ b/source/blender/python/intern/bpy_cli_command.hh @@ -8,13 +8,5 @@ #pragma once -#ifdef __cplusplus -extern "C" { -#endif - extern PyMethodDef BPY_cli_command_register_def; extern PyMethodDef BPY_cli_command_unregister_def; - -#ifdef __cplusplus -} -#endif diff --git a/source/blender/python/intern/bpy_driver.cc b/source/blender/python/intern/bpy_driver.cc index 077125c8382..57180424872 100644 --- a/source/blender/python/intern/bpy_driver.cc +++ b/source/blender/python/intern/bpy_driver.cc @@ -28,9 +28,9 @@ #include "bpy_rna_driver.hh" /* For #pyrna_driver_get_variable_value. */ -#include "bpy_intern_string.h" +#include "bpy_intern_string.hh" -#include "bpy_driver.h" +#include "bpy_driver.hh" #include "bpy_rna.hh" #include "BPY_extern.h" diff --git a/source/blender/python/intern/bpy_driver.h b/source/blender/python/intern/bpy_driver.hh similarity index 89% rename from source/blender/python/intern/bpy_driver.h rename to source/blender/python/intern/bpy_driver.hh index cc3c17fb6af..b4c9f5bf4d2 100644 --- a/source/blender/python/intern/bpy_driver.h +++ b/source/blender/python/intern/bpy_driver.hh @@ -8,17 +8,13 @@ #pragma once -#ifdef __cplusplus -extern "C" { -#endif - #include /** * For faster execution we keep a special dictionary for py-drivers, with * the needed modules and aliases. */ -int bpy_pydriver_create_dict(void); +int bpy_pydriver_create_dict(); /** * For PyDrivers * (drivers using one-line Python expressions to express relationships between targets). @@ -32,7 +28,3 @@ extern bool BPY_driver_secure_bytecode_test_ex(PyObject *expr_code, extern bool BPY_driver_secure_bytecode_test(PyObject *expr_code, PyObject *py_namespace, const bool verbose); - -#ifdef __cplusplus -} -#endif diff --git a/source/blender/python/intern/bpy_gizmo_wrap.cc b/source/blender/python/intern/bpy_gizmo_wrap.cc index 1d624e474d6..8e3051cca64 100644 --- a/source/blender/python/intern/bpy_gizmo_wrap.cc +++ b/source/blender/python/intern/bpy_gizmo_wrap.cc @@ -24,8 +24,8 @@ #include "RNA_define.hh" #include "RNA_enum_types.hh" -#include "bpy_gizmo_wrap.h" /* own include */ -#include "bpy_intern_string.h" +#include "bpy_gizmo_wrap.hh" /* own include */ +#include "bpy_intern_string.hh" #include "bpy_rna.hh" #include "../generic/py_capi_rna.h" diff --git a/source/blender/python/intern/bpy_gizmo_wrap.h b/source/blender/python/intern/bpy_gizmo_wrap.hh similarity index 51% rename from source/blender/python/intern/bpy_gizmo_wrap.h rename to source/blender/python/intern/bpy_gizmo_wrap.hh index cd686ac32a1..87e1156044d 100644 --- a/source/blender/python/intern/bpy_gizmo_wrap.h +++ b/source/blender/python/intern/bpy_gizmo_wrap.hh @@ -11,14 +11,6 @@ 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 +void BPY_RNA_gizmo_wrapper(wmGizmoType *gzt, void *userdata); +void BPY_RNA_gizmogroup_wrapper(wmGizmoGroupType *gzgt, void *userdata); diff --git a/source/blender/python/intern/bpy_interface.cc b/source/blender/python/intern/bpy_interface.cc index 0fe63be9a2f..d93dd205028 100644 --- a/source/blender/python/intern/bpy_interface.cc +++ b/source/blender/python/intern/bpy_interface.cc @@ -33,13 +33,13 @@ #include "RNA_types.hh" -#include "bpy.h" +#include "bpy.hh" #include "bpy_capi_utils.h" -#include "bpy_intern_string.h" -#include "bpy_path.h" -#include "bpy_props.h" +#include "bpy_intern_string.hh" +#include "bpy_path.hh" +#include "bpy_props.hh" #include "bpy_rna.hh" -#include "bpy_traceback.h" +#include "bpy_traceback.hh" #include "bpy_app_translations.hh" diff --git a/source/blender/python/intern/bpy_interface_atexit.cc b/source/blender/python/intern/bpy_interface_atexit.cc index ee49380a91b..e2a196c5ad2 100644 --- a/source/blender/python/intern/bpy_interface_atexit.cc +++ b/source/blender/python/intern/bpy_interface_atexit.cc @@ -14,7 +14,7 @@ #include "BLI_utildefines.h" -#include "bpy.h" /* own include */ +#include "bpy.hh" /* own include */ #include "bpy_capi_utils.h" #include "WM_api.hh" diff --git a/source/blender/python/intern/bpy_interface_run.cc b/source/blender/python/intern/bpy_interface_run.cc index 3d61c7532d8..58d5d96d473 100644 --- a/source/blender/python/intern/bpy_interface_run.cc +++ b/source/blender/python/intern/bpy_interface_run.cc @@ -27,8 +27,8 @@ #include "BPY_extern_run.h" #include "bpy_capi_utils.h" -#include "bpy_intern_string.h" -#include "bpy_traceback.h" +#include "bpy_intern_string.hh" +#include "bpy_traceback.hh" #include "../generic/py_capi_utils.h" diff --git a/source/blender/python/intern/bpy_intern_string.cc b/source/blender/python/intern/bpy_intern_string.cc index 4b4c2aad566..c5009f84207 100644 --- a/source/blender/python/intern/bpy_intern_string.cc +++ b/source/blender/python/intern/bpy_intern_string.cc @@ -12,7 +12,7 @@ #include -#include "bpy_intern_string.h" +#include "bpy_intern_string.hh" #include "BLI_utildefines.h" diff --git a/source/blender/python/intern/bpy_intern_string.h b/source/blender/python/intern/bpy_intern_string.hh similarity index 86% rename from source/blender/python/intern/bpy_intern_string.h rename to source/blender/python/intern/bpy_intern_string.hh index a1f57c7e1ad..533a52db381 100644 --- a/source/blender/python/intern/bpy_intern_string.h +++ b/source/blender/python/intern/bpy_intern_string.hh @@ -8,12 +8,8 @@ * \ingroup pythonintern */ -#ifdef __cplusplus -extern "C" { -#endif - -void bpy_intern_string_init(void); -void bpy_intern_string_exit(void); +void bpy_intern_string_init(); +void bpy_intern_string_exit(); extern PyObject *bpy_intern_str___annotations__; extern PyObject *bpy_intern_str___doc__; @@ -32,7 +28,3 @@ extern PyObject *bpy_intern_str_register; extern PyObject *bpy_intern_str_self; extern PyObject *bpy_intern_str_depsgraph; extern PyObject *bpy_intern_str_unregister; - -#ifdef __cplusplus -} -#endif diff --git a/source/blender/python/intern/bpy_library.h b/source/blender/python/intern/bpy_library.hh similarity index 70% rename from source/blender/python/intern/bpy_library.h rename to source/blender/python/intern/bpy_library.hh index 73b2167f2ae..a24ca789712 100644 --- a/source/blender/python/intern/bpy_library.h +++ b/source/blender/python/intern/bpy_library.hh @@ -8,15 +8,7 @@ #pragma once -#ifdef __cplusplus -extern "C" { -#endif +int BPY_library_load_type_ready(); -int BPY_library_load_type_ready(void); extern PyMethodDef BPY_library_load_method_def; - extern PyMethodDef BPY_library_write_method_def; - -#ifdef __cplusplus -} -#endif diff --git a/source/blender/python/intern/bpy_library_load.cc b/source/blender/python/intern/bpy_library_load.cc index 49bdd2eb621..52b881fdf38 100644 --- a/source/blender/python/intern/bpy_library_load.cc +++ b/source/blender/python/intern/bpy_library_load.cc @@ -35,7 +35,7 @@ #include "MEM_guardedalloc.h" #include "bpy_capi_utils.h" -#include "bpy_library.h" +#include "bpy_library.hh" #include "../generic/py_capi_utils.h" #include "../generic/python_compat.h" diff --git a/source/blender/python/intern/bpy_library_write.cc b/source/blender/python/intern/bpy_library_write.cc index 706927744fc..fab7c9f1aaa 100644 --- a/source/blender/python/intern/bpy_library_write.cc +++ b/source/blender/python/intern/bpy_library_write.cc @@ -29,7 +29,7 @@ #include "RNA_types.hh" #include "bpy_capi_utils.h" -#include "bpy_library.h" /* Declaration for #BPY_library_load_method_def */ +#include "bpy_library.hh" /* Declaration for #BPY_library_load_method_def */ #include "bpy_rna.hh" #include "../generic/py_capi_utils.h" diff --git a/source/blender/python/intern/bpy_msgbus.cc b/source/blender/python/intern/bpy_msgbus.cc index 2db4da40e5a..36726cf1598 100644 --- a/source/blender/python/intern/bpy_msgbus.cc +++ b/source/blender/python/intern/bpy_msgbus.cc @@ -27,7 +27,7 @@ #include "bpy_capi_utils.h" #include "bpy_rna.hh" -#include "bpy_msgbus.h" /* own include */ +#include "bpy_msgbus.hh" /* own include */ /* -------------------------------------------------------------------- */ /** \name Internal Utils diff --git a/source/blender/python/intern/bpy_utils_units.h b/source/blender/python/intern/bpy_msgbus.hh similarity index 60% rename from source/blender/python/intern/bpy_utils_units.h rename to source/blender/python/intern/bpy_msgbus.hh index 1533f2c25ea..a6de5780d94 100644 --- a/source/blender/python/intern/bpy_utils_units.h +++ b/source/blender/python/intern/bpy_msgbus.hh @@ -8,12 +8,4 @@ #pragma once -#ifdef __cplusplus -extern "C" { -#endif - -PyObject *BPY_utils_units(void); - -#ifdef __cplusplus -} -#endif +PyObject *BPY_msgbus_module(); diff --git a/source/blender/python/intern/bpy_operator.cc b/source/blender/python/intern/bpy_operator.cc index ea933a9692d..940530481e5 100644 --- a/source/blender/python/intern/bpy_operator.cc +++ b/source/blender/python/intern/bpy_operator.cc @@ -27,8 +27,8 @@ #include "BPY_extern.h" #include "bpy_capi_utils.h" -#include "bpy_operator.h" -#include "bpy_operator_wrap.h" +#include "bpy_operator.hh" +#include "bpy_operator_wrap.hh" #include "bpy_rna.hh" /* for setting argument properties & type method `get_rna_type`. */ #include "RNA_access.hh" diff --git a/source/blender/python/intern/bpy_operator.h b/source/blender/python/intern/bpy_operator.hh similarity index 68% rename from source/blender/python/intern/bpy_operator.h rename to source/blender/python/intern/bpy_operator.hh index 61b53511a4e..bfcd86b7789 100644 --- a/source/blender/python/intern/bpy_operator.h +++ b/source/blender/python/intern/bpy_operator.hh @@ -8,20 +8,12 @@ #pragma once -#ifdef __cplusplus -extern "C" { -#endif - extern PyTypeObject pyop_base_Type; #define BPy_OperatorBase_Check(v) (PyObject_TypeCheck(v, &pyop_base_Type)) -typedef struct { +struct BPy_OperatorBase { PyObject_HEAD /* Required Python macro. */ -} BPy_OperatorBase; +}; -PyObject *BPY_operator_module(void); - -#ifdef __cplusplus -} -#endif +PyObject *BPY_operator_module(); diff --git a/source/blender/python/intern/bpy_operator_wrap.cc b/source/blender/python/intern/bpy_operator_wrap.cc index 9d4b8ffdc90..b77c9c4d08f 100644 --- a/source/blender/python/intern/bpy_operator_wrap.cc +++ b/source/blender/python/intern/bpy_operator_wrap.cc @@ -22,8 +22,8 @@ #include "RNA_define.hh" #include "RNA_prototypes.hh" -#include "bpy_intern_string.h" -#include "bpy_operator_wrap.h" /* own include */ +#include "bpy_intern_string.hh" +#include "bpy_operator_wrap.hh" /* own include */ #include "bpy_rna.hh" static void operator_properties_init(wmOperatorType *ot) diff --git a/source/blender/python/intern/bpy_operator_wrap.h b/source/blender/python/intern/bpy_operator_wrap.hh similarity index 77% rename from source/blender/python/intern/bpy_operator_wrap.h rename to source/blender/python/intern/bpy_operator_wrap.hh index 3df24160794..30dd961baef 100644 --- a/source/blender/python/intern/bpy_operator_wrap.h +++ b/source/blender/python/intern/bpy_operator_wrap.hh @@ -10,10 +10,6 @@ struct wmOperatorType; -#ifdef __cplusplus -extern "C" { -#endif - /** * These are used for operator methods, used by `bpy_operator.cc`. * @@ -27,13 +23,9 @@ PyObject *PYOP_wrap_macro_define(PyObject *self, PyObject *args); * Generic function used by all Python defined operators * it's passed as an argument to #WM_operatortype_append_ptr in for operator registration. */ -void BPY_RNA_operator_wrapper(struct wmOperatorType *ot, void *userdata); +void BPY_RNA_operator_wrapper(wmOperatorType *ot, void *userdata); /** * Generic function used by all Python defined macro-operators * it's passed as an argument to #WM_operatortype_append_ptr in for operator registration. */ -void BPY_RNA_operator_macro_wrapper(struct wmOperatorType *ot, void *userdata); - -#ifdef __cplusplus -} -#endif +void BPY_RNA_operator_macro_wrapper(wmOperatorType *ot, void *userdata); diff --git a/source/blender/python/intern/bpy_path.cc b/source/blender/python/intern/bpy_path.cc index d4338f5196f..f2106351e2b 100644 --- a/source/blender/python/intern/bpy_path.cc +++ b/source/blender/python/intern/bpy_path.cc @@ -12,7 +12,7 @@ #include "BLI_utildefines.h" -#include "bpy_path.h" +#include "bpy_path.hh" #include "../generic/py_capi_utils.h" diff --git a/source/blender/python/intern/bpy_msgbus.h b/source/blender/python/intern/bpy_path.hh similarity index 59% rename from source/blender/python/intern/bpy_msgbus.h rename to source/blender/python/intern/bpy_path.hh index 30490fce41e..620d81f32a7 100644 --- a/source/blender/python/intern/bpy_msgbus.h +++ b/source/blender/python/intern/bpy_path.hh @@ -8,12 +8,4 @@ #pragma once -#ifdef __cplusplus -extern "C" { -#endif - -PyObject *BPY_msgbus_module(void); - -#ifdef __cplusplus -} -#endif +PyObject *BPyInit__bpy_path(); diff --git a/source/blender/python/intern/bpy_props.cc b/source/blender/python/intern/bpy_props.cc index b2bef2ba352..8a641ff7e50 100644 --- a/source/blender/python/intern/bpy_props.cc +++ b/source/blender/python/intern/bpy_props.cc @@ -24,7 +24,7 @@ #include "BLI_utildefines.h" #include "bpy_capi_utils.h" -#include "bpy_props.h" +#include "bpy_props.hh" #include "bpy_rna.hh" #include "RNA_access.hh" diff --git a/source/blender/python/intern/bpy_props.h b/source/blender/python/intern/bpy_props.hh similarity index 83% rename from source/blender/python/intern/bpy_props.h rename to source/blender/python/intern/bpy_props.hh index af3e8b7705f..d0628a53c95 100644 --- a/source/blender/python/intern/bpy_props.h +++ b/source/blender/python/intern/bpy_props.hh @@ -8,22 +8,18 @@ #pragma once -#ifdef __cplusplus -extern "C" { -#endif - -PyObject *BPY_rna_props(void); +PyObject *BPY_rna_props(); /** * Run this on exit, clearing all Python callback users and disable the RNA callback, * as it would be called after Python has already finished. */ -void BPY_rna_props_clear_all(void); +void BPY_rna_props_clear_all(); PyObject *BPy_PointerProperty(PyObject *self, PyObject *args, PyObject *kw); PyObject *BPy_CollectionProperty(PyObject *self, PyObject *args, PyObject *kw); StructRNA *pointer_type_from_py(PyObject *value, const char *error_prefix); -typedef struct { +struct BPy_PropDeferred { PyObject_HEAD /** * Internally a #PyCFunctionObject type. @@ -31,13 +27,9 @@ typedef struct { */ void *fn; PyObject *kw; -} BPy_PropDeferred; +}; extern PyTypeObject bpy_prop_deferred_Type; #define BPy_PropDeferred_CheckTypeExact(v) (Py_TYPE(v) == &bpy_prop_deferred_Type) #define PYRNA_STACK_ARRAY RNA_STACK_ARRAY - -#ifdef __cplusplus -} -#endif diff --git a/source/blender/python/intern/bpy_rna.cc b/source/blender/python/intern/bpy_rna.cc index 68bfe029cc3..0a65039879c 100644 --- a/source/blender/python/intern/bpy_rna.cc +++ b/source/blender/python/intern/bpy_rna.cc @@ -31,8 +31,8 @@ #include "BPY_extern_clog.h" #include "bpy_capi_utils.h" -#include "bpy_intern_string.h" -#include "bpy_props.h" +#include "bpy_intern_string.hh" +#include "bpy_props.hh" #include "bpy_rna.hh" #include "bpy_rna_anim.hh" #include "bpy_rna_callback.hh" diff --git a/source/blender/python/intern/bpy_rna_types_capi.cc b/source/blender/python/intern/bpy_rna_types_capi.cc index 3fe52a686af..e6571f9bd7b 100644 --- a/source/blender/python/intern/bpy_rna_types_capi.cc +++ b/source/blender/python/intern/bpy_rna_types_capi.cc @@ -21,7 +21,7 @@ #include "BLI_utildefines.h" -#include "bpy_library.h" +#include "bpy_library.hh" #include "bpy_rna.hh" #include "bpy_rna_callback.hh" #include "bpy_rna_context.hh" diff --git a/source/blender/python/intern/bpy_traceback.cc b/source/blender/python/intern/bpy_traceback.cc index 685baf6826d..577259681b6 100644 --- a/source/blender/python/intern/bpy_traceback.cc +++ b/source/blender/python/intern/bpy_traceback.cc @@ -18,7 +18,7 @@ # include "BLI_string.h" /* BLI_strcasecmp */ #endif -#include "bpy_traceback.h" +#include "bpy_traceback.hh" #define MAKE_PY_IDENTIFIER_EX(varname, value) static _Py_Identifier varname{value, -1}; #define MAKE_PY_IDENTIFIER(varname) MAKE_PY_IDENTIFIER_EX(PyId_##varname, #varname) diff --git a/source/blender/python/intern/bpy_traceback.h b/source/blender/python/intern/bpy_traceback.hh similarity index 80% rename from source/blender/python/intern/bpy_traceback.h rename to source/blender/python/intern/bpy_traceback.hh index dcfcaa04a21..0342ffa1717 100644 --- a/source/blender/python/intern/bpy_traceback.h +++ b/source/blender/python/intern/bpy_traceback.hh @@ -8,13 +8,5 @@ #pragma once -#ifdef __cplusplus -extern "C" { -#endif - bool python_script_error_jump( const char *filepath, int *r_lineno, int *r_offset, int *r_lineno_end, int *r_offset_end); - -#ifdef __cplusplus -} -#endif diff --git a/source/blender/python/intern/bpy_utils_previews.cc b/source/blender/python/intern/bpy_utils_previews.cc index 811a8bdfea4..95f0d298e6c 100644 --- a/source/blender/python/intern/bpy_utils_previews.cc +++ b/source/blender/python/intern/bpy_utils_previews.cc @@ -20,7 +20,7 @@ #include "RNA_prototypes.hh" #include "bpy_rna.hh" -#include "bpy_utils_previews.h" +#include "bpy_utils_previews.hh" #include "../generic/py_capi_utils.h" diff --git a/source/blender/python/intern/bpy_path.h b/source/blender/python/intern/bpy_utils_previews.hh similarity index 59% rename from source/blender/python/intern/bpy_path.h rename to source/blender/python/intern/bpy_utils_previews.hh index 29111d5981f..a23a159be13 100644 --- a/source/blender/python/intern/bpy_path.h +++ b/source/blender/python/intern/bpy_utils_previews.hh @@ -8,12 +8,4 @@ #pragma once -#ifdef __cplusplus -extern "C" { -#endif - -PyObject *BPyInit__bpy_path(void); - -#ifdef __cplusplus -} -#endif +PyObject *BPY_utils_previews_module(); diff --git a/source/blender/python/intern/bpy_utils_units.cc b/source/blender/python/intern/bpy_utils_units.cc index 66c89a69160..dbbf45a584f 100644 --- a/source/blender/python/intern/bpy_utils_units.cc +++ b/source/blender/python/intern/bpy_utils_units.cc @@ -18,7 +18,7 @@ #include "BLI_string.h" #include "BLI_utildefines.h" -#include "bpy_utils_units.h" +#include "bpy_utils_units.hh" #include "../generic/py_capi_utils.h" #include "../generic/python_compat.h" diff --git a/source/blender/python/intern/bpy_utils_previews.h b/source/blender/python/intern/bpy_utils_units.hh similarity index 57% rename from source/blender/python/intern/bpy_utils_previews.h rename to source/blender/python/intern/bpy_utils_units.hh index 5c486eba499..75cfa39254b 100644 --- a/source/blender/python/intern/bpy_utils_previews.h +++ b/source/blender/python/intern/bpy_utils_units.hh @@ -8,12 +8,4 @@ #pragma once -#ifdef __cplusplus -extern "C" { -#endif - -PyObject *BPY_utils_previews_module(void); - -#ifdef __cplusplus -} -#endif +PyObject *BPY_utils_units();