From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dmitry Antipov Newsgroups: gmane.emacs.devel Subject: ptrdiff_t misuse [was :Re: (empty)] Date: Fri, 29 Jun 2012 18:18:59 +0400 Message-ID: <4FEDB953.1010800@yandex.ru> References: <83lij66yq9.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1340979428 7623 80.91.229.3 (29 Jun 2012 14:17:08 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 29 Jun 2012 14:17:08 +0000 (UTC) Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jun 29 16:17:08 2012 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Skc0R-0003Fb-Os for ged-emacs-devel@m.gmane.org; Fri, 29 Jun 2012 16:17:07 +0200 Original-Received: from localhost ([::1]:53855 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Skc0R-0005QW-Jt for ged-emacs-devel@m.gmane.org; Fri, 29 Jun 2012 10:17:07 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:46238) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Skc0J-0005Ps-Q0 for emacs-devel@gnu.org; Fri, 29 Jun 2012 10:17:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Skc0F-0003tT-5u for emacs-devel@gnu.org; Fri, 29 Jun 2012 10:16:59 -0400 Original-Received: from forward11.mail.yandex.net ([95.108.130.93]:43401) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Skc04-0003qL-4k; Fri, 29 Jun 2012 10:16:44 -0400 Original-Received: from smtp13.mail.yandex.net (smtp13.mail.yandex.net [95.108.130.68]) by forward11.mail.yandex.net (Yandex) with ESMTP id CED8DE82468; Fri, 29 Jun 2012 18:16:39 +0400 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1340979399; bh=+LvmYfpLPh4hVLlwj2W33jBEakLbAqKkAck5bmdaZMg=; h=Message-ID:Date:From:MIME-Version:To:CC:Subject:References: In-Reply-To:Content-Type:Content-Transfer-Encoding; b=LW8lw5Osiyxr8qwomVU4kDcnVMXCNIlzp8vGUcdd3pOKSmrMejxC+/wll9eR2fThl Wqoi8tcweK5if93SIkadb/WeRVg2UAeHfpK2MnRjW8mFs6PF6ML9A+bMjRsc6H0IV6 vKdILqxHOTzMfNWbo5feKaJ2vedSUidV+vo95Y0Q= Original-Received: from smtp13.mail.yandex.net (localhost [127.0.0.1]) by smtp13.mail.yandex.net (Yandex) with ESMTP id AFE26E40214; Fri, 29 Jun 2012 18:16:39 +0400 (MSK) Original-Received: from 184.gprs.mts.ru (184.gprs.mts.ru [213.87.132.184]) by smtp13.mail.yandex.net (nwsmtp/Yandex) with ESMTP id Gb9uoTsK-Gc9KlSjr; Fri, 29 Jun 2012 18:16:39 +0400 X-Yandex-Rcpt-Suid: eliz@gnu.org X-Yandex-Rcpt-Suid: emacs-devel@gnu.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1340979399; bh=+LvmYfpLPh4hVLlwj2W33jBEakLbAqKkAck5bmdaZMg=; h=Message-ID:Date:From:User-Agent:MIME-Version:To:CC:Subject: References:In-Reply-To:Content-Type:Content-Transfer-Encoding; b=Ez/0lqvLyRBqHeX3FDSHfNZCuxezFLqFupV2B4epmxAPRnTFML8UI5uQjC0NJ+GiE dzXewOJCgeUWnQ7407WAGNd0MICZV+3q3NnY1MA0Otdr5ENCOXl5atPIzxZkNGPSy8 qRr3bZNChYJGIVqdqvJSrluWmAS8Bm3oBp1GeRv0= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120614 Thunderbird/13.0.1 In-Reply-To: <83lij66yq9.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 95.108.130.93 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:151288 Archived-At: 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