Skip to content

Commit

Permalink
Add duckdb patch signature_capi
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
carlopi committed Nov 12, 2024
1 parent bd23a5a commit e13d096
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions patches/duckdb/signature_capi.patch
Original file line number Diff line number Diff line change
@@ -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);

0 comments on commit e13d096

Please sign in to comment.