<div dir="ltr"><div>Now I think about it, renaming the invoker may be necessary after all. </div><div>The setter would be useful for applications to fill struct with Java upcalls to implement callbacks. eg implementing COM api, rather than using one.</div><div><br></div><div>Duncan</div></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Thu, 24 Jul 2025 at 16:05, Maurizio Cimadamore <<a href="mailto:mcimadamore@openjdk.org">mcimadamore@openjdk.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Thu, 24 Jul 2025 13:52:05 GMT, Duncan Gittins <<a href="mailto:duncan.gittins@gmail.com" target="_blank">duncan.gittins@gmail.com</a>> wrote:<br>
<br>
> Will the use of ",functional" be the intended way to trigger this<br>
> enhancement? I wonder whether last error capture could be built in with<br>
> "--include-function funcname,erro" or "--include-function<br>
> funcname,GetLastError"<br>
<br>
Nice connection -- we do in fact have plans (at least in theory) to use this same mechanism for errno -- and maybe even to declare "disjoint enums" (e.g. enums that can be modelled as plain Java enums because you swear not to rely on low-level bitmask operation -- which is often the case if the enum you are modelling is just a "tag")<br>
<br>
> This proposal makes it nicer to handle invokers. I generated my code with<br>
> this change but as you'vr noted it does indeed lead to clashes using the<br>
> proposed naming convention.<br>
<br>
I think the issue is that the changes in this PR generate both setter and invoker -- and we should only emit the invoker.<br>
<br>
-------------<br>
<br>
PR Comment: <a href="https://git.openjdk.org/jextract/pull/287#issuecomment-3113817281" rel="noreferrer" target="_blank">https://git.openjdk.org/jextract/pull/287#issuecomment-3113817281</a><br>
PR Comment: <a href="https://git.openjdk.org/jextract/pull/287#issuecomment-3113821975" rel="noreferrer" target="_blank">https://git.openjdk.org/jextract/pull/287#issuecomment-3113821975</a><br>
</blockquote></div>