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: Aidan Kehoe
Subject: Re: [PATCH] Unicode Lisp reader escapes
Date: Tue, 9 May 2006 09:04:50 +0200

 Ar an t-ochtú lá de mí Bealtaine, scríobh Stefan Monnier: 

 > > Fread is intended to be called from Lisp (it’s a subr).  Functions 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.
 > 
 > s/called/callable/

The two are not mutually exclusive :-) . 

 > Are you sure we have such a convention?

That in particular is not really a convention, it’s part of the semantics of
the Lisp implementation. Objects visible to Lisp are visible to the garbage
collector, except in the very specific case where they’re only visible from
weak hash tables. 

 > > C code that calls functions intended to be called from Lisp is optimistic
 > > at best if, without having checked, it relies on the assumption that that
 > > the arguments to those functions will be GCPROed.
 > 
 > As far as I know, the GCPRO convention for arguments is mostly the
 > following:
 > 
 > GCPRO args you pass to functions iff those functions can GC and you need
 > to use the arg after the function returns.

Okay. Do you know of any document detailing that? No-one followed up to my
reference to what Ben Wing writes on the subject. 

-- 
Aidan Kehoe, http://www.parhasard.net/




reply via email to

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