emacs-devel
[Top][All Lists]
Advanced

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

Re: Preview: portable dumper


From: Paul Eggert
Subject: Re: Preview: portable dumper
Date: Tue, 20 Feb 2018 13:51:16 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0

On 02/19/2018 02:23 PM, Andy Moreton wrote:
Comments mentioning MAX_RW_COUNT show that somebody checked an invariant
when writing the comment, but they do not guarantee that the invariant
will continue to be maintained in future versions of emacs. A check that
can be enforced by the compiler is preferable.

That "somebody" was me. That is, I looked at all the callers of these functions and checked that none of them go above MAX_RW_COUNT. That being said, it doesn't hurt to put in an eassert to check this as well (thanks, Eli). It would be a pain to check all the callers at compile-time, alas.

Is there a gnulib replacement for read() that works for emacs, so that
we could use the proper prototype even on Windows ?

There is. However, the Gnulib 'read' does some stuff that the Emacs 'read' doesn't (and vice versa). Nobody has taken the time to try to unify them, and it's possible that unifying them would not be a good idea overall.



reply via email to

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