Relax take it ezzzzzzzsy Le mer. 9 août 2023, 08:57, David Holmes <dhol...@openjdk.org> a écrit :
> On Tue, 8 Aug 2023 19:52:08 GMT, Thomas Stuefe <stu...@openjdk.org> wrote: > > >> I just checked and the value of the sentinel is ultimately the prvalue > 88. I don't know if we'd want to replace all the weird char usages here > with explicit values of 0 (and 88 for the sentinel). Maybe future reviews > can help with that > > > > I wrote this code ages ago. I'm not sure what's weird or suspicious > about it, though. The comment at the file's beginning explains this code's > motivation. > > > > The buffer was never thought to be used for something different than > HANDLEs or characters, where the assignment of integer literals work. I > often use char constants for sentinels as debugging aid. As for `'\0'`, > that indicates to the casual code reader that this is a termination of a > string, better than had I used a plain 0. > > Because there is nothing to state what T may be, I found assigning > character literals to be odd. If T is char and the buffer is meant to be a > C string then it makes more sense. But for non-char T it just raised > questions for me. > > ------------- > > PR Review Comment: > https://git.openjdk.org/jdk/pull/15096#discussion_r1288029698 >