On Fri, 2 Jun 2023 22:00:48 GMT, Naoto Sato <na...@openjdk.org> wrote:

>> I don't think so if `chars` is `char *` and `strchars` is `jchar*` as I 
>> think `char` is 8 bits and `jchar` is 16 bits.
>
> I just wonder if jchar is UTF-16 and char is platform encoding, would it work 
> by simply casting the low 8bit to char?

Probably not. This is only intended to cover the constrained case of this test. 
Something like the macro `WITH_PLATFORM_STRING` in `libjava/io_util.h` would be 
needed for the general case, but I thought that that might be overdoing it for 
here. I could of course be mistaken.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/14276#discussion_r1214895770

Reply via email to