New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bind delegates with higher-level managed types #511
Comments
@tritao How to generate 'delegate' from the function 'Callback'.. I tried to recreate it but the function ended up as another function in managed code. |
Sorry for posting duplicates. Blame me! I'm presenting an update to the current situation:
|
Imagine a callback in native code:
void Callback(Class& c);
When bound in managed it ends up as:
delegate void Callback(IntPtr c);
And we need to do later:
var c = Class.__CreateInstance(c)
Not pretty.
I think we could improve this on the generator to generate a lower-level (same as what we already generate) and higher-level proxy delegate:
delegate void Callback(Class c);
The text was updated successfully, but these errors were encountered: