type Void is not supported

Maurizio Cimadamore maurizio.cimadamore at oracle.com
Mon Jul 22 09:33:04 UTC 2024


We should tweak jextract not to warn in this case, as there's not much 
jextract (or the user) can do with this info.


Maurizio


On 22/07/2024 06:02, Sundararajan Athijegannathan wrote:
> Hi,
>
> void* as return type is supported. But, as you found, that header 
> typedefs void as a type and then returns pointer to that.
>
> Minimal code of that pattern is as follows:
>
> typedef void Foo;
> Foo* func(int);
>
> jextract generates MemorySegment as return type for "func" method 
> correctly.  jextract's typedef handling code that prints the warning. 
> Nothing is generated for "Foo" itself (as Foo is "void" type and so 
> there is no equivalent java layout can be defined for it). You can 
> ignore that meaning and the generated binding will work as expected.
>
> Source info (line number etc) are not retained in jextract's 
> representation of clang CXCursor and CXType objects. As of now, it is 
> not possible to print source locations post parsing. While parsing 
> clang diagnostics, if any, are printed with source info.
>
> Thanks
> Sundar
>
> ------------------------------------------------------------------------
> *From:* jextract-dev <jextract-dev-retn at openjdk.org> on behalf of 
> Adrian Trapletti <a.trapletti at ustermetrics.com>
> *Sent:* 21 July 2024 02:36
> *To:* jextract-dev at openjdk.org <jextract-dev at openjdk.org>
> *Subject:* Re: type Void is not supported
> Hi,
>
> The reason for the warnings seem to be
> https://github.com/oxfordcontrol/Clarabel.cpp/blob/main/include%2Fc%2FDefaultSolver.h#L17-L24
>
> Otherwise the generated bindings look good.
>
> Maybe a nice to have would be that jextract prints the line number 
> that is responsible for a warning together with the warning?
>
> Thanks and best regards,
> Adrian
>
> Dr. Adrian Trapletti
> CEO
>
> Uster Metrics GmbH
> Steinstrasse 9b
> 8610 Uster, Switzerland
>
> P +41 32 512 83 63
> M +41 79 103 71 31
>
> a.trapletti at ustermetrics.com
> www.ustermetrics.com <http://www.ustermetrics.com>
>
> This email message including any attachments is confidential and 
> may be privileged. It is intended solely for the use of the individual 
> or entity named on this message. It is provided for informational 
> purposes only and does not constitute an offer or invitation to 
> subscribe for or purchase any services or products. Any form of 
> disclosure, copying, modification or distribution is unauthorized. If 
> you are not the intended recipient, you are requested to please notify 
> the sender immediately and delete the message including any 
> attachments from your computer system network. Email transmission 
> cannot be guaranteed to be secure or error free as information could 
> be modified. We therefore do not accept responsibility or liability as 
> to the completeness or accuracy of the information contained in this 
> message or any attachments.
>
> On Sat, Jul 20, 2024, 19:12 Adrian Trapletti 
> <a.trapletti at ustermetrics.com> wrote:
>
>     Hi,
>
>     I am trying to generate bindings for
>     https://github.com/oxfordcontrol/Clarabel.cpp/blob/main/include/Clarabel.h
>
>     Jextract issues the following warnings
>
>     WARNING: Skipping ClarabelDefaultSolver_f64 (type Void is not
>     supported)
>     WARNING: Skipping ClarabelDefaultSolver_f32 (type Void is not
>     supported)
>     WARNING: Skipping ClarabelDefaultSolver (type Void is not supported)
>
>     For me it seems that the returned void pointer is not supported
>     https://github.com/oxfordcontrol/Clarabel.cpp/blob/main/include/c/DefaultSolver.h#L29
>
>     Is this a known issue? Is there a workaround?
>
>     Thank you and best regards
>     Adrian
>
>     *Dr. Adrian Trapletti*
>     CEO
>
>     *Uster Metrics GmbH *|  Steinstrasse 9b, 8610 Uster, Switzerland
>     P +41 32 512 83 63  | M +41 79 103 71 31
>     a.trapletti at ustermetrics.com  | www.ustermetrics.com
>     <http://www.ustermetrics.com>
>
>
>     This email message including any attachments is confidential and
>     may be privileged. It is intended solely for the use of the
>     individual or entity named on this message. It is provided for
>     informational purposes only and does not constitute an offer or
>     invitation to subscribe for or purchase any services or products.
>     Any form of disclosure, copying, modification or distribution is
>     unauthorized. If you are not the intended recipient, you are
>     requested to please notify the sender immediately and delete the
>     message including any attachments from your computer system
>     network. Email transmission cannot be guaranteed to be secure or
>     error free as information could be modified. We therefore do not
>     accept responsibility or liability as to the completeness or
>     accuracy of the information contained in this message or any
>     attachments.
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/jextract-dev/attachments/20240722/593db2ac/attachment-0001.htm>


More information about the jextract-dev mailing list