[Top][All Lists]

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

Re: Updating alists (was: Tenuto marking too close to note)

From: Lukas-Fabian Moser
Subject: Re: Updating alists (was: Tenuto marking too close to note)
Date: Thu, 30 Dec 2021 23:04:27 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0

Hi Jean,

Both of these cases seem to work the same as in
current versions if I do


 assq_tail (SCM key, SCM alist, SCM based_on = SCM_EOL)
-  for (SCM p = alist; !scm_is_eq (p, based_on); p = scm_cdr (p))
+  for (SCM p = alist; scm_is_pair (p) && scm_is_pair (scm_car (p)) && !scm_is_eq (p, based_on); p = scm_cdr (p))
       if (scm_is_eq (scm_caar (p), key))
         return p;

Thanks! This seems to be a sensible precaution anyway, as it only changes a certain crash into returning #f. So it might be sensible to make this change anyway?

But I really don't have deep enough an insight on this code
to judge, sorry.

I'm a bit surprised about the remark in the code stating that the choice not to coalesce multiple override's was made to save the cost of detecting them, as it does not seem to be a code path used heavily at all.


reply via email to

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