emacs-devel
[Top][All Lists]
Advanced

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

Re: oops? read/write vs type of length parameter


From: Eli Zaretskii
Subject: Re: oops? read/write vs type of length parameter
Date: Tue, 12 Apr 2011 19:56:11 +0300

> Date: Tue, 12 Apr 2011 08:53:37 -0700
> From: Paul Eggert <address@hidden>
> CC: address@hidden, address@hidden
> 
> If the code is well-defended against passing negative sizes,
> then we can remove the checks entirely; they're not needed.

My experience is that you can never be well defended against mixing
signed with unsigned.

Stefan and Chong, please voice your opinions about this.  I'm strongly
opposed to having the last argument of emacs_read and emacs_write be
of unsigned data type, but if you are okay with that, I'll get over
it.

> I'm sorry if there are hurt feelings about this, but size_t is
> clearly the better choice for buffer sizes; it's the universal
> standard in the C API.

Those hurt feeling would have been avoided if you waited until the
discussion is over and decision is made.



reply via email to

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