From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kevin Rodgers Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] Unicode Lisp reader escapes Date: Wed, 03 May 2006 11:21:05 -0600 Organization: IHS Message-ID: References: <17491.34779.959316.484740@parhasard.net> <17495.932.70900.796282@parhasard.net> <17495.57895.90438.848865@parhasard.net> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Trace: sea.gmane.org 1146677025 18025 80.91.229.2 (3 May 2006 17:23:45 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 3 May 2006 17:23:45 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed May 03 19:23:41 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FbL3l-0003Na-2Z for ged-emacs-devel@m.gmane.org; Wed, 03 May 2006 19:22:45 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FbL3k-00084y-8k for ged-emacs-devel@m.gmane.org; Wed, 03 May 2006 13:22:44 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FbL3X-00084Z-J9 for emacs-devel@gnu.org; Wed, 03 May 2006 13:22:31 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FbL3V-00083Y-RA for emacs-devel@gnu.org; Wed, 03 May 2006 13:22:31 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FbL3V-00083P-Kj for emacs-devel@gnu.org; Wed, 03 May 2006 13:22:29 -0400 Original-Received: from [80.91.229.2] (helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1FbL3v-0002iV-6N for emacs-devel@gnu.org; Wed, 03 May 2006 13:22:55 -0400 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1FbL2q-0003F9-Sh for emacs-devel@gnu.org; Wed, 03 May 2006 19:21:48 +0200 Original-Received: from 207.167.42.206 ([207.167.42.206]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 03 May 2006 19:21:48 +0200 Original-Received: from ihs_4664 by 207.167.42.206 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 03 May 2006 19:21:48 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-To: emacs-devel@gnu.org Original-Lines: 31 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: 207.167.42.206 User-Agent: Thunderbird 1.5.0.2 (Windows/20060308) In-Reply-To: <17495.57895.90438.848865@parhasard.net> X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:53860 Archived-At: Aidan Kehoe wrote: > Ar an dara lá de mí Bealtaine, scríobh Kenichi Handa: > > > > Yay, a technical objection. > > > > > If it isn’t safe to call a Lisp program in read_escape, then the > > > function is full of bugs already. It’s called with three arguments, a > > > Lisp_Object readcharfun, an integer, and a pointer to an integer. If > > > readcharfun is a Lisp function (it may not be, it may be a buffer, a > > > marker, or a string), then that Lisp function is called on line 348. > > > Cf. the documentation of `read', which describes that the input may be > > > from a function. > > > > What I concern is the case that readcharfun is a string or a buffer. In > > that case, of course, the current code doesn't call Lisp in read_escape. > > So, there's no need of GCPRO readcharfun. > > > > But, if Lisp is called even if readcharfun is a string, I think we should > > GCPRO it. Is it already done? (Sorry, I don't have a time to check > > lread.c by myself) > > I’m reasonably sure it’s already done in the callers of read1, but I don’t > have graphing software to hand, and the English for the reasoning I’ve > written out is unreadably tedious. So, sure, GCPROing seems worth the time. > Do you mean to GCPRO independent of what type readcharfun is? readcharfun is declared as a Lisp_Object in read1, so it should be possible to check it's type and only GCPRO when necessary. -- Kevin