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: issues with recent doprnt-related changes Date: Wed, 04 May 2011 07:56:43 -0700 Organization: UCLA Computer Science Department Message-ID: <4DC1692B.1090101@cs.ucla.edu> References: <4DB50AB9.6060100@cs.ucla.edu> <83tydmaeo3.fsf@gnu.org> <4DB65FF1.5010003@cs.ucla.edu> <83aafb8p4a.fsf@gnu.org> <4DB8ABEA.3080503@cs.ucla.edu> <4DB9146D.2040702@cs.ucla.edu> <4DB9E5FF.9020506@cs.ucla.edu> <83d3k571ee.fsf@gnu.org> <4DC10012.8020809@cs.ucla.edu> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1304521026 23622 80.91.229.12 (4 May 2011 14:57:06 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 4 May 2011 14:57:06 +0000 (UTC) Cc: 8545@debbugs.gnu.org, Emacs Development To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed May 04 16:57:01 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QHdVd-000587-IW for ged-emacs-devel@m.gmane.org; Wed, 04 May 2011 16:57:01 +0200 Original-Received: from localhost ([::1]:36300 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QHdVc-0006ov-A9 for ged-emacs-devel@m.gmane.org; Wed, 04 May 2011 10:57:00 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:51635) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QHdVZ-0006od-47 for emacs-devel@gnu.org; Wed, 04 May 2011 10:56:58 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QHdVY-0006ju-1t for emacs-devel@gnu.org; Wed, 04 May 2011 10:56:57 -0400 Original-Received: from smtp.cs.ucla.edu ([131.179.128.62]:34911) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QHdVW-0006iO-Hc; Wed, 04 May 2011 10:56:54 -0400 Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id ED3E339E8108; Wed, 4 May 2011 07:56:45 -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 Zv8K4bRud9SX; Wed, 4 May 2011 07:56:44 -0700 (PDT) Original-Received: from [192.168.1.10] (pool-71-189-109-235.lsanca.fios.verizon.net [71.189.109.235]) by smtp.cs.ucla.edu (Postfix) with ESMTPSA id 7C2D239E80FA; Wed, 4 May 2011 07:56:44 -0700 (PDT) User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.14) Gecko/20110223 Thunderbird/3.1.8 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:139106 Archived-At: On 05/04/11 02:52, Eli Zaretskii wrote: >> It seems from that discussion that strings can contain MOST_POSITIVE_FIXNUM bytes. > I think the conclusion was that it can contain MOST_POSITIVE_FIXNUM > _including_the_terminating_null_. Hmm, that's not how I read . I understood the argument to be that a buffer must contain at most MOST_POSITIVE_FIXNUM - 1 bytes due to other reasons, but it's OK to have "a string whose length is MOST_POSITIVE_FIXNUM", i.e., (= (length STRING) most-positive-fixnum), because we already check buffer sizes before inserting strings. If you count the trailing byte, the length of the underlying C character array would be MOST_POSITIVE_FIXNUM + 1. I'll CC: this to emacs-devel just in case I misinterpreted that.