Skip to content

Commit

Permalink
Update plugify
Browse files Browse the repository at this point in the history
  • Loading branch information
qubka committed Jul 14, 2024
1 parent 88e9fb5 commit 64b871e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/module.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ LoadResult GoLanguageModule::OnPluginLoad(PluginRef plugin) {
return ErrorData{ std::format("Not found {} function(s)", funcs) };
}

std::vector<MethodRef> exportedMethods = plugin.GetDescriptor().GetExportedMethods();
std::span<const MethodRef> exportedMethods = plugin.GetDescriptor().GetExportedMethods();
std::vector<MethodData> methods;
methods.reserve(exportedMethods.size());

Expand Down Expand Up @@ -382,7 +382,7 @@ void GoLanguageModule::InternalCall(MethodRef method, MemAddr addr, const Parame

PropertyRef retProp = method.GetReturnType();
ValueType retType = retProp.GetType();
std::vector<PropertyRef> paramProps = method.GetParamTypes();
std::span<const PropertyRef> paramProps = method.GetParamTypes();

size_t argsCount = static_cast<size_t>(std::count_if(paramProps.begin(), paramProps.end(), [](const PropertyRef& param) {
return ValueUtils::IsObject(param.GetType());
Expand Down Expand Up @@ -1058,7 +1058,7 @@ const char* GetPluginBaseDir(PluginRef plugin) {
}

const char** GetPluginDependencies(PluginRef plugin) {
std::vector<PluginReferenceDescriptorRef> dependencies = plugin.GetDescriptor().GetDependencies();
std::span<const PluginReferenceDescriptorRef> dependencies = plugin.GetDescriptor().GetDependencies();
auto* deps = new const char*[dependencies.size()];
for (size_t i = 0; i < dependencies.size(); ++i) {
deps[i] = dependencies[i].GetName().data();
Expand Down

0 comments on commit 64b871e

Please sign in to comment.