|
From: | Dmitry Antipov |
Subject: | ptrdiff_t misuse [was :Re: (empty)] |
Date: | Fri, 29 Jun 2012 18:18:59 +0400 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120614 Thunderbird/13.0.1 |
On 06/29/2012 05:20 PM, Eli Zaretskii wrote:
Dmitry, could you please explain the reason(s) for the change below? Vertical positions in a window can never be large enough to justify using ptrdiff_t (on platforms where that is wider than a 32-bit 'int'). These are pixel positions on the Emacs display, so they cannot be too large. The type of 'first_vpos' looks especially strange, since it is explicitly set to 1 at most. I'm not aware of a platform where an 'int' is not wide enough for a value 1 ;-)
Argh, I misuse them against window_end_pos and window_end_bytepos, which are positions in a buffer and so ptrdiff_t :-(. This should be reverted. Dmitry
[Prev in Thread] | Current Thread | [Next in Thread] |