[foreign-jextract] [Rev 01] RFR: 8246693: Restricted native operations should be spelled out clearly

Maurizio Cimadamore mcimadamore at openjdk.java.net
Mon Jun 8 12:33:41 UTC 2020


On Mon, 8 Jun 2020 11:39:44 GMT, Athijegannathan Sundararajan <sundar at openjdk.org> wrote:

>> APIs renamed as suggested in bug report.
>
> Athijegannathan Sundararajan has updated the pull request incrementally with one additional commit since the last
> revision:
>   Updated samples for toJavaStringRestricted.

Looks good

src/jdk.incubator.jextract/share/classes/jdk/incubator/jextract/tool/resources/Cstring.java.template line 78:

> 77:     public static String toJavaString(MemoryAddress addr) {
> 78:         if (addr.segment() == null) {
> 79:             throw new IllegalArgumentException("no underlying segment for the address");

Just a note - if you don't insert the check here, I think a meaningful error should be printed anyway... up to you.

-------------

Marked as reviewed by mcimadamore (Committer).

PR: https://git.openjdk.java.net/panama-foreign/pull/197


More information about the panama-dev mailing list