CppAst.CodeGen icon indicating copy to clipboard operation
CppAst.CodeGen copied to clipboard

delegate* support for function pointer type.

Open anchurcn opened this issue 10 months ago • 1 comments

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?

anchurcn avatar Apr 10 '24 13:04 anchurcn

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.

xoofx avatar Apr 30 '24 07:04 xoofx