[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])).
- Lisp watchpoints (Was: [Emacs-diffs] master 19e09cf: Ensure redisplay after evaluation), Noam Postavsky, 2015/11/15
- Re: Lisp watchpoints, Stefan Monnier, 2015/11/16
- Re: Lisp watchpoints, Noam Postavsky, 2015/11/22
- Re: Lisp watchpoints, Noam Postavsky, 2015/11/22
- Re: Lisp watchpoints, Noam Postavsky, 2015/11/28
- Re: Lisp watchpoints, Stefan Monnier, 2015/11/28
- Re: Lisp watchpoints,
Noam Postavsky <=
- Re: Lisp watchpoints, Andreas Schwab, 2015/11/29
- Re: Lisp watchpoints, Noam Postavsky, 2015/11/29
- Re: Lisp watchpoints, Stefan Monnier, 2015/11/29
- Re: Lisp watchpoints, Eli Zaretskii, 2015/11/29
- Re: Lisp watchpoints, Noam Postavsky, 2015/11/29
- Re: Lisp watchpoints, Stefan Monnier, 2015/11/29
- Re: Lisp watchpoints, Eli Zaretskii, 2015/11/30
- Re: Lisp watchpoints, Andreas Schwab, 2015/11/29
- Re: Lisp watchpoints, Stefan Monnier, 2015/11/29
- Re: Lisp watchpoints, Eli Zaretskii, 2015/11/29