-
Notifications
You must be signed in to change notification settings - Fork 1.6k
c-api: component-model: Lookup function from an instance #10675
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
c-api: component-model: Lookup function from an instance #10675
Conversation
|
Thanks! This has triggered some further thoughts which are both preexisting and related to this PR as well:
|
|
Er, sent too soon:
Yeah sounds good! One other slightly orthogonal thing, I think it'd be nice to help clean up the C tests a bit. If you'd like I think it'd be reasonable to export the C API implementation pointer from C++ structures, that way you could sort of intermix C++ and C where the C++ APIs could be used to handle auto-destruction and such. That might also make it easier to bind optional errors and assert that errors don't happen. Otherwise could the |
f4a7766 to
1814837
Compare
|
Next up values, which are required for function invocation? |
|
Yeah that seems reasonable. I'll be honest though in that I don't really know how to do values. Everything I've thought of historically is either extremely chatty over the C API boundary or extremely allocation-heavy, neither of which I feel is great... If you've got ideas though please dive in! |
Only
get_func()as of now, should #9812 (comment) come in a later PR?One thing of note, if name isn't UTF-8, it returns false instead of returning an error, is that fine?