[Top][All Lists]

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

Re: Lisp watchpoints

From: Noam Postavsky
Subject: Re: Lisp watchpoints
Date: Sun, 29 Nov 2015 00:12:16 -0500

On Sat, Nov 28, 2015 at 11:44 PM, Stefan Monnier
<address@hidden> wrote:
>> +  while (!NILP (watchers))
>> +    {
>> +      Lisp_Object watcher = XCAR (watchers);
> This will lead to a segmentation fault after something like (put <var>
> 'watchers [1]).  While very unlikely, it's very easy to avoid this
> problem: just use CONSP instead of !NILP.
>> +      else if (FUNCTIONP (watcher))
>> +        CALLN (Ffuncall, watcher, operation, where, symbol, newval);
> I don't think you need to test "FUNCTIONP (watcher)".

Isn't the FUNCTIONP test needed for basically the same reason as using
CONSP over !NILP? i.e. to avoid segfault in case of (put <var>
'watchers '([1])).

reply via email to

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