GP-5248 fix calling convention checking and handling

This commit is contained in:
dev747368 2025-01-09 00:28:58 +00:00
parent 0d3451c0c0
commit 05506d5210
2 changed files with 4 additions and 2 deletions

View file

@ -189,7 +189,8 @@ public class FunctionDefinitionDataType extends GenericDataType implements Funct
if (GenericCallingConvention if (GenericCallingConvention
.getGenericCallingConvention(conventionName) == GenericCallingConvention.unknown && .getGenericCallingConvention(conventionName) == GenericCallingConvention.unknown &&
(dataMgr == null || !dataMgr.getKnownCallingConventionNames().contains(name))) { (dataMgr == null ||
!dataMgr.getKnownCallingConventionNames().contains(conventionName))) {
throw new InvalidInputException("Unknown calling convention name: " + conventionName); throw new InvalidInputException("Unknown calling convention name: " + conventionName);
} }

View file

@ -703,7 +703,8 @@ public class HighFunctionDBUtil {
throws InvalidInputException { throws InvalidInputException {
ParameterDefinition[] params = sig.getArguments(); ParameterDefinition[] params = sig.getArguments();
FunctionDefinitionDataType fsig = new FunctionDefinitionDataType("tmpname"); // Empty datatype, will get renamed later FunctionDefinitionDataType fsig =
new FunctionDefinitionDataType("tmpname", function.getProgram().getDataTypeManager()); // Empty datatype, will get renamed later
fsig.setCallingConvention(sig.getCallingConventionName()); fsig.setCallingConvention(sig.getCallingConventionName());
fsig.setArguments(params); fsig.setArguments(params);
fsig.setReturnType(sig.getReturnType()); fsig.setReturnType(sig.getReturnType());