diff --git a/bindgen/src/bindings/cpp/templates/scaffolding.hpp b/bindgen/src/bindings/cpp/templates/scaffolding.hpp index c6b4175..97c1fba 100644 --- a/bindgen/src/bindings/cpp/templates/scaffolding.hpp +++ b/bindgen/src/bindings/cpp/templates/scaffolding.hpp @@ -6,6 +6,8 @@ extern "C" { #endif +#ifndef UNIFFI_CPP_INTERNALSTRUCTS +#define UNIFFI_CPP_INTERNALSTRUCTS struct ForeignBytes { int32_t len; uint8_t *data; @@ -22,6 +24,8 @@ struct RustCallStatus { RustBuffer error_buf; }; +#endif + typedef int ForeignCallback(uint64_t handle, uint32_t method, uint8_t *args_data, int32_t args_len, RustBuffer *buf_ptr); {% for func in ci.iter_ffi_function_definitions() %}