Skip to content

Commit

Permalink
Adapt for C-API extension
Browse files Browse the repository at this point in the history
  • Loading branch information
carlopi committed Dec 14, 2024
1 parent bab2604 commit f613197
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion patches/duckdb/extension_install_rework.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ index 2a6fffa994..f4ef687ddd 100644
@@ -96,6 +96,10 @@ private:
shared_ptr<DatabaseCacheEntry> db_cache_entry;

duckdb_ext_api_v0 (*create_api_v0)();
duckdb_ext_api_v1 (*create_api_v1)();
+public:
+ static void SetPreferredRepository(const string& extension, const string &repository);
+ static string GetPreferredRepository(const string& extension);
Expand Down
13 changes: 13 additions & 0 deletions patches/duckdb/hardcode_abi_type.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 a7a7c62fef..d560a3b3b3 100644
--- a/src/main/extension/extension_load.cpp
+++ b/src/main/extension/extension_load.cpp
@@ -451,7 +451,7 @@ bool ExtensionHelper::TryInitialLoad(DatabaseInstance &db, FileSystem &fs, const
result.filebase = lowercase_extension_name;
result.filename = filename;
result.lib_hdl = lib_hdl;
- result.abi_type = parsed_metadata.abi_type;
+ result.abi_type = ExtensionABIType::CPP;

if (!direct_load) {
auto info_file_name = filename + ".info";

0 comments on commit f613197

Please sign in to comment.