CppAst.CodeGen
CppAst.CodeGen copied to clipboard
delegate* support for function pointer type.
I have traveled the code in this repo and I want to add delegate* support.
typedef int (*fnAdd)(int,int);
struct S{
fnAdd pfnAdd;
};
generates
struct S
{
delegate* unmanaged[Cdelc]<int,int,int> pfnAdd;
}
I found that there is already an implementation of delegate pointers here, but it is not for function pointers, but for functions. And it doesn't seem to be used. Any tips on implementing this?
Commit ad07b2887883b9b9ba52c8c3fa15e35572d8b700 is introducing support for LibraryImport and function pointers instead of raw delegates. Still a few things to test on my own projects before I will publish a new package.