From 4b565e6955601b60b8176328126d35b5c23bd3f5 Mon Sep 17 00:00:00 2001 From: Juan Jose Garcia Ripoll Date: Thu, 15 Dec 2011 00:07:45 +0100 Subject: [PATCH] Better explanation of why the keys get duplicated in _ecl_standard_dispatch(). --- src/c/gfun.d | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/c/gfun.d b/src/c/gfun.d index a143a5ec6..726141489 100644 --- a/src/c/gfun.d +++ b/src/c/gfun.d @@ -177,11 +177,13 @@ _ecl_standard_dispatch(cl_object frame, cl_object gf) if (e->key != OBJNULL) { func = e->value; } else { + /* The keys and the cache may change while we + * compute the applicable methods. We must save + * the keys and recompute the cache location if + * it was filled. */ cl_object keys = cl_copy_seq(vector); func = compute_applicable_method(frame, gf); if (e->key != OBJNULL) { - /* The cache might have changed while we - * computed applicable methods */ e = ecl_search_cache(cache); } e->key = keys;