1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-30 11:50:28 +02:00

Fix scm_weak_table_refq for undefined default

* libguile/weak-table.c (scm_weak_table_refq): No need to default weak
  table result to #f; just use whatever was passed in.
This commit is contained in:
Andy Wingo 2016-11-26 16:07:30 +01:00
parent 0dcca77754
commit 5a3bc32c99

View file

@ -912,9 +912,6 @@ assq_predicate (SCM x, SCM y, void *closure)
SCM SCM
scm_weak_table_refq (SCM table, SCM key, SCM dflt) scm_weak_table_refq (SCM table, SCM key, SCM dflt)
{ {
if (SCM_UNBNDP (dflt))
dflt = SCM_BOOL_F;
return scm_c_weak_table_ref (table, scm_ihashq (key, -1), return scm_c_weak_table_ref (table, scm_ihashq (key, -1),
assq_predicate, SCM_UNPACK_POINTER (key), assq_predicate, SCM_UNPACK_POINTER (key),
dflt); dflt);