emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: `message' not outputting the newline "atomically"


From: Eli Zaretskii
Subject: Re: `message' not outputting the newline "atomically"
Date: Tue, 25 Jun 2019 19:03:34 +0300

> From: Lars Ingebrigtsen <address@hidden>
> Date: Tue, 25 Jun 2019 00:47:12 +0200
> Cc: Daniele Nicolodi <address@hidden>, address@hidden
> 
> I'm pushing the current version I have now, so we can tinker with it
> more collaboratively.

There was no reason to rush this to the repository.  Paul raises valid
concerns, some of which I had as well.  Also, the commit message
describes something that is very different from the code that was
actually pushed.

I think a version with a fixed-size automatic buffer and a loop using
it to write the message in chunks, would be a much cleaner solution
than allocating the buffer off the heap.

There's also a possibility to use the null byte that we
always/normally have in strings after the last byte.  'fwrite' doesn't
need it, so we could replace it with a newline, write the message,
then replace the newline back with the null byte.  This is somewhat
hacky, but it eliminates the need for a buffer and a loop.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]