From d0bbd208cc1ffd4549f210412d2e3052edf07803 Mon Sep 17 00:00:00 2001 From: Carlo Piovesan Date: Tue, 12 Nov 2024 14:07:20 +0100 Subject: [PATCH] Add duckdb patch signature_capi Signature of capi extensions changed from returning void to returning a boolean, mismatch on native targets is fine, since result is just ignored, but flagged problems in wasm validation. Given capi extensions are still experimental, and more so in duckdb-wasm, I would propose taking this liberty from DuckDB source code to allow more simpler exploration on this matter. --- patches/duckdb/signature_capi.patch | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 patches/duckdb/signature_capi.patch diff --git a/patches/duckdb/signature_capi.patch b/patches/duckdb/signature_capi.patch new file mode 100644 index 000000000..995ce4599 --- /dev/null +++ b/patches/duckdb/signature_capi.patch @@ -0,0 +1,13 @@ +diff --git a/src/main/extension/extension_load.cpp b/src/main/extension/extension_load.cpp +index 59fc4e8cd9..b0282a7103 100644 +--- a/src/main/extension/extension_load.cpp ++++ b/src/main/extension/extension_load.cpp +@@ -119,7 +119,7 @@ struct ExtensionAccess { + // The C++ init function + typedef void (*ext_init_fun_t)(DatabaseInstance &); + // The C init function +-typedef void (*ext_init_c_api_fun_t)(duckdb_extension_info info, duckdb_extension_access *access); ++typedef bool (*ext_init_c_api_fun_t)(duckdb_extension_info info, duckdb_extension_access *access); + typedef const char *(*ext_version_fun_t)(void); + typedef bool (*ext_is_storage_t)(void); +