guile-devel
[Top][All Lists]
Advanced

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

Re: scm_remember


From: Michael Livshin
Subject: Re: scm_remember
Date: 01 Nov 2000 11:30:21 +0200
User-agent: Gnus/5.0807 (Gnus v5.8.7) XEmacs/21.1 (20 Minutes to Nikko)

Dirk Herrmann <address@hidden> writes:

> Currently, scm_remember
> expects a scm* as its parameter.  However, for the sake of keeping the
> value alive it would suffice to pass the SCM value:
> 
>   chars = SCM_STRING_CHARS (str);
>   some_syscall (chars);
>   scm_remember (str);

I don't think so.  if `scm_remember' takes an SCM, then the compiler
has all the rights to reuse the register (or the stack word) that held 
`str'.

but if you pass a pointer to `str', then the compiler has (or at least
it can be hoped that it has) to make sure that the pointer really
points to a valid location that contains `str', and at least for the
life expectancy of `str'.

-- 
The only thing better than TV with the sound off is Radio with the sound
off.
                -- Dave Moon




reply via email to

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