Skip to content

Commit

Permalink
Downport optional parameter fix to 4.3 (#316)
Browse files Browse the repository at this point in the history
see #315
  • Loading branch information
fw2568 authored Nov 19, 2024
1 parent 27295b3 commit 2803d0e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/YaNco.Core/Internal/Api.cs
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ public static RfcRc AddFunctionParameter(FunctionDescriptionHandle descriptionHa
Name = parameterDescription.Name,
Type = parameterDescription.Type,
Direction = parameterDescription.Direction,
Optional = parameterDescription.Optional ? 'X' : '\0',
Optional = parameterDescription.Optional ? '1' : '0',
Decimals = parameterDescription.Decimals,
NucLength = parameterDescription.NucLength,
UcLength = parameterDescription.UcLength,
Expand Down Expand Up @@ -158,7 +158,7 @@ public static RfcRc GetFunctionParameterDescription(FunctionDescriptionHandle de
{
var rc = Interopt.RfcGetParameterDescByName(descriptionHandle.Ptr, name.ToUpperInvariant(), out var parameterDescr, out errorInfo);
parameterInfo = new RfcParameterInfo(
parameterDescr.Name, parameterDescr.Type, parameterDescr.Direction, parameterDescr.NucLength, parameterDescr.UcLength, parameterDescr.Decimals, parameterDescr.DefaultValue, parameterDescr.ParameterText, parameterDescr.Optional == 'X');
parameterDescr.Name, parameterDescr.Type, parameterDescr.Direction, parameterDescr.NucLength, parameterDescr.UcLength, parameterDescr.Decimals, parameterDescr.DefaultValue, parameterDescr.ParameterText, parameterDescr.Optional == 1);
return rc;

}
Expand All @@ -168,7 +168,7 @@ public static RfcRc GetFunctionParameterDescription(FunctionDescriptionHandle de
{
var rc = Interopt.RfcGetParameterDescByIndex(descriptionHandle.Ptr, (uint)index, out var parameterDescr, out errorInfo);
parameterInfo = new RfcParameterInfo(
parameterDescr.Name, parameterDescr.Type, parameterDescr.Direction, parameterDescr.NucLength, parameterDescr.UcLength, parameterDescr.Decimals, parameterDescr.DefaultValue, parameterDescr.ParameterText, parameterDescr.Optional == 'X');
parameterDescr.Name, parameterDescr.Type, parameterDescr.Direction, parameterDescr.NucLength, parameterDescr.UcLength, parameterDescr.Decimals, parameterDescr.DefaultValue, parameterDescr.ParameterText, parameterDescr.Optional == 1);
return rc;

}
Expand Down

0 comments on commit 2803d0e

Please sign in to comment.