From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#8545: issues with recent doprnt-related changes Date: Fri, 06 May 2011 10:33:21 -0300 Message-ID: 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> <4DC1692B.1090101@cs.ucla.edu> <83ei4cnau6.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1304688853 19921 80.91.229.12 (6 May 2011 13:34:13 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 6 May 2011 13:34:13 +0000 (UTC) Cc: 8545@debbugs.gnu.org, Paul Eggert , emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri May 06 15:34:08 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1QILAV-0007xc-HB for geb-bug-gnu-emacs@m.gmane.org; Fri, 06 May 2011 15:34:07 +0200 Original-Received: from localhost ([::1]:55986 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QILAU-0000YI-W9 for geb-bug-gnu-emacs@m.gmane.org; Fri, 06 May 2011 09:34:06 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:55383) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QILAR-0000Xu-Be for bug-gnu-emacs@gnu.org; Fri, 06 May 2011 09:34:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QILAQ-0001sm-DI for bug-gnu-emacs@gnu.org; Fri, 06 May 2011 09:34:03 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:45177) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QILAQ-0001sZ-6n for bug-gnu-emacs@gnu.org; Fri, 06 May 2011 09:34:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1QILAP-0003iJ-Pf; Fri, 06 May 2011 09:34:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 06 May 2011 13:34:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 8545 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 8545-submit@debbugs.gnu.org id=B8545.130468881414241 (code B ref 8545); Fri, 06 May 2011 13:34:01 +0000 Original-Received: (at 8545) by debbugs.gnu.org; 6 May 2011 13:33:34 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QIL9y-0003he-EA for submit@debbugs.gnu.org; Fri, 06 May 2011 09:33:34 -0400 Original-Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QIL9v-0003hN-0v for 8545@debbugs.gnu.org; Fri, 06 May 2011 09:33:32 -0400 Original-Received: from 121-249-126-200.fibertel.com.ar ([200.126.249.121]:40224 helo=ceviche.home) by fencepost.gnu.org with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1QIL9o-0005ql-OI; Fri, 06 May 2011 09:33:24 -0400 Original-Received: by ceviche.home (Postfix, from userid 20848) id 1D9F866168; Fri, 6 May 2011 10:33:21 -0300 (ART) In-Reply-To: <83ei4cnau6.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 05 May 2011 23:36:49 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Fri, 06 May 2011 09:34:01 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:46268 Archived-At: >> >> 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. > Stefan, could you please chime in? I'm not sure I understand the details more than you do. AFAIK the MOST_POSITIVE_FIXNUM limit only comes into play when the number goes through Lisp_Object somewhere. And we never show "length, including terminating nul-byte" to Elisp, so the nul-byte shouldn't matter: while the C array will have size MOST_POSITIVE_FIXNUM + 1, this will only be represented in EMACS_INT which can accommodate it just fine. Stefan