Re: RFR: 8309216: Cast from jchar* to char* in test java/io/GetXSpace.java [v2]

2023-06-02 Thread Brian Burkhalter
On Fri, 2 Jun 2023 22:23:12 GMT, Naoto Sato wrote: >> 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

Re: RFR: 8309216: Cast from jchar* to char* in test java/io/GetXSpace.java [v2]

2023-06-02 Thread Naoto Sato
On Fri, 2 Jun 2023 22:18:45 GMT, Brian Burkhalter wrote: >> 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 `WI

Re: RFR: 8309216: Cast from jchar* to char* in test java/io/GetXSpace.java [v3]

2023-06-02 Thread Naoto Sato
On Fri, 2 Jun 2023 19:23:10 GMT, Brian Burkhalter wrote: >> For Unix, copy the `jchar`s into an allocated `char` array. > > Brian Burkhalter has updated the pull request incrementally with one > additional commit since the last revision: > > 8309216: Move string release into common flow (win)

Re: RFR: 8309216: Cast from jchar* to char* in test java/io/GetXSpace.java [v2]

2023-06-02 Thread Brian Burkhalter
On Fri, 2 Jun 2023 22:00:48 GMT, Naoto Sato 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 c

Re: RFR: 8309216: Cast from jchar* to char* in test java/io/GetXSpace.java [v2]

2023-06-02 Thread Naoto Sato
On Fri, 2 Jun 2023 18:36:56 GMT, Brian Burkhalter wrote: >> test/jdk/java/io/File/libGetXSpace.c line 142: >> >>> 140: for (int i = 0; i < len; i++) { >>> 141: chars[i] = (char)strchars[i]; >>> 142: } >> >> Is this `memcpy(chars, strchars, len);` > > I don't think so if `chars`

Re: RFR: 8309216: Cast from jchar* to char* in test java/io/GetXSpace.java [v3]

2023-06-02 Thread Roger Riggs
On Fri, 2 Jun 2023 19:23:10 GMT, Brian Burkhalter wrote: >> For Unix, copy the `jchar`s into an allocated `char` array. > > Brian Burkhalter has updated the pull request incrementally with one > additional commit since the last revision: > > 8309216: Move string release into common flow (win)

Re: RFR: 8309216: Cast from jchar* to char* in test java/io/GetXSpace.java [v2]

2023-06-02 Thread Brian Burkhalter
On Fri, 2 Jun 2023 18:37:27 GMT, Brian Burkhalter wrote: >> test/jdk/java/io/File/libGetXSpace.c line 85: >> >>> 83: // use GetDiskSpaceInformationW >>> 84: DISK_SPACE_INFORMATION diskSpaceInfo; >>> 85: BOOL hres = pfnGetDiskSpaceInformation(path, &diskSpaceInfo); >> >>

Re: RFR: 8309216: Cast from jchar* to char* in test java/io/GetXSpace.java [v3]

2023-06-02 Thread Brian Burkhalter
> For Unix, copy the `jchar`s into an allocated `char` array. Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision: 8309216: Move string release into common flow (win) - Changes: - all: https://git.openjdk.org/jdk/pull/1

Re: RFR: 8309216: Cast from jchar* to char* in test java/io/GetXSpace.java [v2]

2023-06-02 Thread Brian Burkhalter
On Fri, 2 Jun 2023 18:26:33 GMT, Roger Riggs wrote: >> Brian Burkhalter has updated the pull request incrementally with one >> additional commit since the last revision: >> >> 8309216: Reformat malloc size calculation > > test/jdk/java/io/File/libGetXSpace.c line 85: > >> 83: // use

Re: RFR: 8309216: Cast from jchar* to char* in test java/io/GetXSpace.java [v2]

2023-06-02 Thread Roger Riggs
On Fri, 2 Jun 2023 15:57:31 GMT, Brian Burkhalter wrote: >> For Unix, copy the `jchar`s into an allocated `char` array. > > Brian Burkhalter has updated the pull request incrementally with one > additional commit since the last revision: > > 8309216: Reformat malloc size calculation test/jdk

Re: RFR: 8309216: Cast from jchar* to char* in test java/io/GetXSpace.java [v2]

2023-06-02 Thread Brian Burkhalter
> For Unix, copy the `jchar`s into an allocated `char` array. Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision: 8309216: Reformat malloc size calculation - Changes: - all: https://git.openjdk.org/jdk/pull/14276/files

RFR: 8309216: Cast from jchar* to char* in test java/io/GetXSpace.java

2023-06-01 Thread Brian Burkhalter
For Unix, copy the `jchar`s into an allocated `char` array. - Commit messages: - 8309216: Cast from jchar* to char* in test java/io/GetXSpace.java Changes: https://git.openjdk.org/jdk/pull/14276/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=14276&range=00 Issue: https://

Re: RFR: 8309216: Cast from jchar* to char* in test java/io/GetXSpace.java

2023-06-01 Thread Brian Burkhalter
On Fri, 2 Jun 2023 00:00:07 GMT, Brian Burkhalter wrote: > For Unix, copy the `jchar`s into an allocated `char` array. Preliminary test run passes. - PR Comment: https://git.openjdk.org/jdk/pull/14276#issuecomment-1572936688