RFR: 7903947: Access to function pointers in structs could be streamlined
Maurizio Cimadamore
mcimadamore at openjdk.org
Thu Jul 24 15:05:16 UTC 2025
On Thu, 24 Jul 2025 13:52:05 GMT, Duncan Gittins <duncan.gittins at gmail.com> wrote:
> Will the use of ",functional" be the intended way to trigger this
> enhancement? I wonder whether last error capture could be built in with
> "--include-function funcname,erro" or "--include-function
> funcname,GetLastError"
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")
> This proposal makes it nicer to handle invokers. I generated my code with
> this change but as you'vr noted it does indeed lead to clashes using the
> proposed naming convention.
I think the issue is that the changes in this PR generate both setter and invoker -- and we should only emit the invoker.
-------------
PR Comment: https://git.openjdk.org/jextract/pull/287#issuecomment-3113817281
PR Comment: https://git.openjdk.org/jextract/pull/287#issuecomment-3113821975
More information about the jextract-dev
mailing list