From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.devel Subject: Re: Proposal: immediate strings Date: Thu, 24 May 2012 09:35:50 -0700 Organization: UCLA Computer Science Department Message-ID: <4FBE6366.8060306@cs.ucla.edu> References: <4FBB51E7.6080601@yandex.ru> <4FBDD04F.9010203@cs.ucla.edu> <4FBDE8BB.5020309@cs.ucla.edu> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1337877369 16457 80.91.229.3 (24 May 2012 16:36:09 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 24 May 2012 16:36:09 +0000 (UTC) Cc: Dmitry Antipov , emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu May 24 18:36:07 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 1SXb19-0004pP-6a for ged-emacs-devel@m.gmane.org; Thu, 24 May 2012 18:36:03 +0200 Original-Received: from localhost ([::1]:56846 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SXb18-0001NC-Nu for ged-emacs-devel@m.gmane.org; Thu, 24 May 2012 12:36:02 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:47332) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SXb11-0001K6-HP for emacs-devel@gnu.org; Thu, 24 May 2012 12:36:01 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SXb0z-0006KT-J9 for emacs-devel@gnu.org; Thu, 24 May 2012 12:35:55 -0400 Original-Received: from smtp.cs.ucla.edu ([131.179.128.62]:33419) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SXb0z-0006J9-DF for emacs-devel@gnu.org; Thu, 24 May 2012 12:35:53 -0400 Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id 5FE98A60001; Thu, 24 May 2012 09:35:51 -0700 (PDT) X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu Original-Received: from smtp.cs.ucla.edu ([127.0.0.1]) by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 4db1znLvZqcy; Thu, 24 May 2012 09:35:51 -0700 (PDT) Original-Received: from penguin.cs.ucla.edu (Penguin.CS.UCLA.EDU [131.179.64.200]) by smtp.cs.ucla.edu (Postfix) with ESMTPSA id ED9C039E8006; Thu, 24 May 2012 09:35:50 -0700 (PDT) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:12.0) Gecko/20120430 Thunderbird/12.0.1 In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 131.179.128.62 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:150636 Archived-At: On 05/24/2012 05:51 AM, Stefan Monnier wrote: >>> we could just grab a second bit from `size' >>> >> for the `immbit'. >> > Only if MOST_POSITIVE_FIXNUM <= min (SIZE_MAX, PTRDIFF_MAX) / 2. > Why? > This would be true if `size' were changed to ptrdiff_t (which would make > sense, indeed), but it's currently EMACS_INT, Ah, sorry, I was assuming the integer-overflow patch (for bug#9874). That patch indeed changes 'size' to ptrdiff_t. Any changes for immediate strings should assume that this patch has been applied. I haven't applied that patch only because the trunk has been frozen against big changes since God knows when.