From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kenichi Handa Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] Unicode Lisp reader escapes Date: Tue, 02 May 2006 20:33:44 +0900 Message-ID: References: <17491.34779.959316.484740@parhasard.net> <17495.932.70900.796282@parhasard.net> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 (generated by SEMI 1.14.3 - "Ushinoya") Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1146569654 16712 80.91.229.2 (2 May 2006 11:34:14 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 2 May 2006 11:34:14 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue May 02 13:34:13 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 1Fat8o-0001Gq-Vt for ged-emacs-devel@m.gmane.org; Tue, 02 May 2006 13:34:07 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Fat8o-0002GG-HT for ged-emacs-devel@m.gmane.org; Tue, 02 May 2006 07:34:06 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Fat8Y-0002FN-VN for emacs-devel@gnu.org; Tue, 02 May 2006 07:33:51 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Fat8W-0002D0-HU for emacs-devel@gnu.org; Tue, 02 May 2006 07:33:50 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Fat8W-0002Cb-9G for emacs-devel@gnu.org; Tue, 02 May 2006 07:33:48 -0400 Original-Received: from [192.47.44.130] (helo=tsukuba.m17n.org) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1Fat8e-0007NZ-PE for emacs-devel@gnu.org; Tue, 02 May 2006 07:33:57 -0400 Original-Received: from nfs.m17n.org (nfs.m17n.org [192.47.44.7]) by tsukuba.m17n.org (8.13.4/8.13.4/Debian-3sarge1) with ESMTP id k42BXjgp017394; Tue, 2 May 2006 20:33:45 +0900 Original-Received: from etlken (etlken.m17n.org [192.47.44.125]) by nfs.m17n.org (8.13.4/8.13.4/Debian-3sarge1) with ESMTP id k42BXjv4004270; Tue, 2 May 2006 20:33:45 +0900 Original-Received: from handa by etlken with local (Exim 3.36 #1 (Debian)) id 1Fat8S-0000d3-00; Tue, 02 May 2006 20:33:44 +0900 Original-To: Aidan Kehoe In-reply-to: <17495.932.70900.796282@parhasard.net> (message from Aidan Kehoe on Tue, 2 May 2006 09:00:52 +0200) User-Agent: SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.2 Emacs/22.0.50 (i686-pc-linux-gnu) MULE/5.0 (SAKAKI) 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:53785 Archived-At: In article <17495.932.70900.796282@parhasard.net>, Aidan Kehoe writes: >> First of all, is it safe to call Lisp program in read_escape? Don't we >> have to care about GC and buffer/string-data relocation? > Yay, a technical objection.=20 > If it isn=E2=80=99t safe to call a Lisp program in read_escape, then the = function is > full of bugs already. It=E2=80=99s called with three arguments, a Lisp_Ob= ject > 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.=20 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) --- Kenichi Handa handa@m17n.org