Lukas-Fabian Moser <l...@gmx.de> writes: > Hi Jean, > >> >> Both of these cases seem to work the same as in >> current versions if I do >> >> [...] >> >> SCM >> 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?
Uh what? assq_tail is exclusively used on internal data structures. There is no "certain crash" without internal data structures being corrupted and it seems counterproductive to expend additional performance in order to hide that internal data structures have been corrupted. > 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. Overrides of subproperties are used pretty extensively in some newer code. Maybe it would make sense to check where code is being used before trying to change it? -- David Kastrup