mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-16 08:40:19 +02:00
* Replaced a lot of calls to SCM_C[AD]R with more appropriate macros.
* Minor cleanups to hashtable implementation. * Minor code beautifications.
This commit is contained in:
parent
8715ff1703
commit
22a52da14d
23 changed files with 218 additions and 220 deletions
|
@ -504,11 +504,10 @@ SCM_REGISTER_PROC (s_reverse_lookup, "reverse-lookup", 2, 0, 0, scm_reverse_look
|
|||
SCM
|
||||
scm_reverse_lookup (SCM env, SCM data)
|
||||
{
|
||||
SCM names, values;
|
||||
while (SCM_NIMP (env) && SCM_SLOPPY_CONSP (SCM_CAR (env)))
|
||||
while (SCM_CONSP (env) && SCM_CONSP (SCM_CAR (env)))
|
||||
{
|
||||
names = SCM_CAAR (env);
|
||||
values = SCM_CDAR (env);
|
||||
SCM names = SCM_CAAR (env);
|
||||
SCM values = SCM_CDAR (env);
|
||||
while (SCM_CONSP (names))
|
||||
{
|
||||
if (SCM_EQ_P (SCM_CAR (values), data))
|
||||
|
@ -516,7 +515,7 @@ scm_reverse_lookup (SCM env, SCM data)
|
|||
names = SCM_CDR (names);
|
||||
values = SCM_CDR (values);
|
||||
}
|
||||
if (! SCM_NULLP (names) && SCM_EQ_P (values, data))
|
||||
if (!SCM_NULLP (names) && SCM_EQ_P (values, data))
|
||||
return names;
|
||||
env = SCM_CDR (env);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue