emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Unicode Lisp reader escapes


From: Kevin Rodgers
Subject: Re: [PATCH] Unicode Lisp reader escapes
Date: Wed, 03 May 2006 11:21:05 -0600
User-agent: Thunderbird 1.5.0.2 (Windows/20060308)

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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]