From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Aidan Kehoe Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] Unicode Lisp reader escapes Date: Tue, 9 May 2006 09:04:50 +0200 Message-ID: <17504.16146.57393.970540@parhasard.net> References: <17491.34779.959316.484740@parhasard.net> <17495.932.70900.796282@parhasard.net> <17495.57895.90438.848865@parhasard.net> <17498.28361.392872.954484@parhasard.net> <17503.21672.395920.94783@parhasard.net> <17503.29740.778178.932671@parhasard.net> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1147158327 5423 80.91.229.2 (9 May 2006 07:05:27 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 9 May 2006 07:05:27 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue May 09 09:05:24 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 1FdMHY-0006E9-RN for ged-emacs-devel@m.gmane.org; Tue, 09 May 2006 09:05:21 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FdMHY-0007AK-Co for ged-emacs-devel@m.gmane.org; Tue, 09 May 2006 03:05:20 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FdMHA-00076V-Aa for emacs-devel@gnu.org; Tue, 09 May 2006 03:04:56 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FdMH8-00075r-Gm for emacs-devel@gnu.org; Tue, 09 May 2006 03:04:55 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FdMH8-00075l-B8 for emacs-devel@gnu.org; Tue, 09 May 2006 03:04:54 -0400 Original-Received: from [66.111.49.30] (helo=icarus.asclepian.ie) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FdMI8-0004P0-LD for emacs-devel@gnu.org; Tue, 09 May 2006 03:05:56 -0400 Original-Received: by icarus.asclepian.ie (Postfix, from userid 1003) id 3A17B8008C; Tue, 9 May 2006 08:04:50 +0100 (IST) Original-To: Stefan Monnier In-Reply-To: X-Mailer: VM 7.17 under 21.5 (beta25) "eggplant" (+CVS-20060325) XEmacs Lucid X-Echelon-distraction: SIGS 2600 Magazine H&K SAMU M-x spook eternity server 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:54133 Archived-At: Ar an t-ocht=C3=BA l=C3=A1 de m=C3=AD Bealtaine, scr=C3=ADobh Stefan Mon= nier:=20 > > Fread is intended to be called from Lisp (it=E2=80=99s a subr). Fun= ctions called > > from Lisp do not need to GCPRO their arguments, because the garbage > > collector knows about the arguments, as it knows about all objects > > allocated in Lisp. >=20 > s/called/callable/ The two are not mutually exclusive :-) .=20 > Are you sure we have such a convention? That in particular is not really a convention, it=E2=80=99s part of the s= emantics of the Lisp implementation. Objects visible to Lisp are visible to the garba= ge collector, except in the very specific case where they=E2=80=99re only vi= sible from weak hash tables.=20 > > C code that calls functions intended to be called from=C2=A0Lisp is = optimistic > > at best if, without having checked, it relies on the assumption that= that > > the arguments to those functions will be GCPROed. >=20 > As far as I know, the GCPRO convention for arguments is mostly the > following: >=20 > GCPRO args you pass to functions iff those functions can GC and you ne= ed > to use the arg after the function returns. Okay. Do you know of any document detailing that? No-one followed up to m= y reference to what Ben Wing writes on the subject.=20 --=20 Aidan Kehoe, http://www.parhasard.net/