RFR: 7903755: multi header support and special syntax for header file
Maurizio Cimadamore
mcimadamore at openjdk.org
Wed Jun 19 16:04:22 UTC 2024
On Wed, 19 Jun 2024 10:01:08 GMT, Athijegannathan Sundararajan <sundar at openjdk.org> wrote:
> jextract currently supports only one header file. If the user wants to extract more than one header file, s/he has to create a containing header that includes multiple headers and jextract the containing header.
>
> With the current change, jextract supports more than one header file in the command line.
> When multiple headers are specified in command line, --header-class-name option is mandatory and it is enforced.
>
> In addition to normal file names for header file names, a special syntax such as "<stdio.h>" is also supported. With this, user does not have to write long file name including directories such as /usr/include/stdio.h.
>
> jextract generates multiple headers by generating a temporary header file. If the command line argument is of the form "<stdio.h>" then jextract generates "#include <stdio.h>" in the auto-generated containing header. If the header specified in of the normal/existing form (say foo.h), then containing header will have #include "foo.h" line.
doc/GUIDE.md line 994:
> 992: 1. simple header file name like "foo.h" or header file path like "bar/foo.h"
> 993:
> 994: 2. Special header file path or file name like "<stdio.h>", "<GLUT/glut.h>".
Suggestion:
2. Special header file path or file name like `<stdio.h>`, `<GLUT/glut.h>`.
doc/GUIDE.md line 995:
> 993:
> 994: 2. Special header file path or file name like "<stdio.h>", "<GLUT/glut.h>".
> 995: With this syntax, the header full or relative path is not required. The usual C compiler
I think we should say something like:
With this syntax, the header path is considered to be relative to one of the paths in the C compiler include path.
doc/GUIDE.md line 997:
> 995: With this syntax, the header full or relative path is not required. The usual C compiler
> 996: include path search is used in this case. This simplifies the extraction of header files
> 997: from standard include paths and include paths specified by -I options.
Suggestion:
from standard include paths and include paths specified by `-I` options.
doc/GUIDE.md line 1000:
> 998:
> 999: Note that '>' and '<' are special characters in OS Shells and therefore those
> 1000: need to be escaped appropriately. On Unix platforms, simple quoting like "<stdio.h>"
Suggestion:
need to be escaped appropriately. On Unix platforms, simple quoting like `"<stdio.h>"`
-------------
PR Review Comment: https://git.openjdk.org/jextract/pull/249#discussion_r1646461940
PR Review Comment: https://git.openjdk.org/jextract/pull/249#discussion_r1646460308
PR Review Comment: https://git.openjdk.org/jextract/pull/249#discussion_r1646460673
PR Review Comment: https://git.openjdk.org/jextract/pull/249#discussion_r1646461392
More information about the jextract-dev
mailing list