[foreign-jextract] Missing getters/setters for pointers within generated classes
sundararajan.athijegannathan at oracle.com
sundararajan.athijegannathan at oracle.com
Mon Jun 22 10:59:29 UTC 2020
Hi Filip,
I tried with a simple struct with one pointer type field. As you
mentioned, getters/setters are not generated for pointer fields. Thanks
for reporting the issue.
Thanks
-Sundar
On 22/06/20 3:46 pm, Filip Krakowski wrote:
> Hi,
>
> I am currently experimenting with Project Panama and using jextract to
> generate bindings for the ibverbs library. I just noticed that within
> the generated classes pointers are skipped since no getter/setters are
> created for them. The header file parsed by jextract can be found here :
>
> https://github.com/linux-rdma/rdma-core/blob/55b51135cab1c0a7f28516a636d5790c2cfca225/libibverbs/verbs.h
>
>
> As an example you can look at the struct ibv_mw :
>
> https://github.com/linux-rdma/rdma-core/blob/55b51135cab1c0a7f28516a636d5790c2cfca225/libibverbs/verbs.h#L646-L652
>
>
> The generated class Cibv_mw contains getters and setters for rkey,
> handle and type but is missing them for context and pd. In some places
> the ibverbs API requires setting pointers within structs. Are these
> missing methods the normal behavior or am I doing something wrong here?
>
> Best regards,
> Filip
More information about the panama-dev
mailing list