Pass mgp_memory to custom Module.main_fn

Summary: Depends on D2495

Reviewers: mferencevic, dsantl

Reviewed By: mferencevic

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D2496
This commit is contained in:
Teon Banek
2019-10-17 10:52:14 +02:00
parent 2e1063bbdb
commit 469102aa5e
2 changed files with 5 additions and 3 deletions

View File

@@ -22,8 +22,8 @@ std::optional<Module> LoadModuleFromSharedLibrary(std::filesystem::path path) {
return std::nullopt;
}
// Get required mgp_main
module.main_fn = reinterpret_cast<void (*)(const mgp_list *,
const mgp_graph *, mgp_result *)>(
module.main_fn = reinterpret_cast<void (*)(
const mgp_list *, const mgp_graph *, mgp_result *, mgp_memory *)>(
dlsym(module.handle, "mgp_main"));
const char *error = dlerror();
if (!module.main_fn || error) {