diff options
author | Marius Vollmer <mvo@zagadka.de> | 2004-08-11 19:38:58 +0000 |
---|---|---|
committer | Marius Vollmer <mvo@zagadka.de> | 2004-08-11 19:38:58 +0000 |
commit | 82c76fd357e059f7bc662b29c8d6abcd557f94b4 (patch) | |
tree | 155d0da87ee6c7445abb7b93720abb692387e08d /libguile/procprop.c | |
parent | 35da08ee37b4d68075c3461d5658b6c9a43c3dff (diff) | |
download | guile-82c76fd357e059f7bc662b29c8d6abcd557f94b4.tar.gz |
(scm_init_storage, scm_stand_in_procs, scm_stand_in_proc): Use a
hastable for scm_stand_in_procs instead of an alist. Thanks to
Matthias Koeppe!
Diffstat (limited to 'libguile/procprop.c')
-rw-r--r-- | libguile/procprop.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/libguile/procprop.c b/libguile/procprop.c index d91c72904..03043890d 100644 --- a/libguile/procprop.c +++ b/libguile/procprop.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995,1996,1998,2000,2001, 2003 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,1998,2000,2001,2003,2004 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -28,6 +28,7 @@ #include "libguile/smob.h" #include "libguile/root.h" #include "libguile/vectors.h" +#include "libguile/hashtab.h" #include "libguile/validate.h" #include "libguile/procprop.h" @@ -136,15 +137,15 @@ scm_i_procedure_arity (SCM proc) static SCM scm_stand_in_scm_proc(SCM proc) { - SCM answer; - answer = scm_assq (proc, scm_stand_in_procs); - if (scm_is_false (answer)) + SCM handle, answer; + handle = scm_hashq_get_handle (scm_stand_in_procs, proc); + if (scm_is_false (handle)) { answer = scm_closure (scm_list_2 (SCM_EOL, SCM_BOOL_F), SCM_EOL); - scm_stand_in_procs = scm_acons (proc, answer, scm_stand_in_procs); + scm_hashq_set_x (scm_stand_in_procs, proc, answer); } else - answer = SCM_CDR (answer); + answer = SCM_CDR (handle); return answer; } |