RFR: 7903357: add a jextract sample that uses pcre2 library

Jorn Vernee jvernee at openjdk.org
Fri Oct 14 16:21:16 UTC 2022


On Fri, 14 Oct 2022 14:32:57 GMT, Athijegannathan Sundararajan <sundar at openjdk.org> wrote:

> Simple sample that checks a given string for matches against the given regex

Looks mostly good

samples/pcre2/Pcre.h line 32:

> 30:  */
> 31: 
> 32: #define PCRE2_CODE_UNIT_WIDTH 8

Couldn't this be done with `-DPCRE2_CODE_UNIT_WIDTH=8` as well?

samples/pcre2/PcreCheck.java line 63:

> 61:         System.err.printf("regex compilation failed: %s\n",
> 62:             buffer.getUtf8String(0));
> 63:         pcre2_code_free_8(re);

Does this free do anything? `re` seems to be `NULL` here.

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

Marked as reviewed by jvernee (no project role).

PR: https://git.openjdk.org/jextract/pull/88


More information about the jextract-dev mailing list