fix naming issue

This commit is contained in:
Booklordofthedings 2024-05-24 11:10:59 +02:00
parent cf1fc0e042
commit ee4741cb90
3 changed files with 3 additions and 959 deletions

View file

@ -21,12 +21,14 @@ class BindingFunction
}
}
public String LitName ~ delete _;
public String Name ~ delete _;
public BindingType Output ~ delete _;
public List<BindingFunctionArgument> Args = new .() ~ DeleteContainerAndItems!(_);
public this(StringView pName, CXType pOutput)
{
LitName = new .(pName);
Name = new .(pName);
Output = new .(pOutput);
@ -36,7 +38,7 @@ class BindingFunction
public void ToBeef(String pBuffer)
{
pBuffer.Append("[CLink]\n");
pBuffer.Append(scope $"[CLink, LinkName(\"{LitName}\")]\n");
pBuffer.Append(scope $"public static extern {Output.TypeName} {Name}(");
for(var i in Args)
pBuffer.Append(scope $"{@i.Index != 0 ? ',' : ' '} {i.Type.TypeName} {i.Name != String.Empty ? i.Name : scope String(scope $"bf_arg{@i.Index}")}");

View file

@ -60,7 +60,6 @@ class Program
return -1;
}
Console.Read();
return 0;
}