From b29cb918c8c8ade5d59d4c06fc04538434209dd0 Mon Sep 17 00:00:00 2001 From: Keno Fischer Date: Thu, 25 Sep 2014 12:17:38 -0400 Subject: [PATCH] Slight cleanup of staged function code --- src/gf.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/gf.c b/src/gf.c index a2ae90d84a055..5e22b4b821312 100644 --- a/src/gf.c +++ b/src/gf.c @@ -961,7 +961,8 @@ DLLEXPORT jl_function_t *jl_instantiate_staged(jl_methlist_t *m, jl_tuple_t *tt) } } jl_cellset(ex->args, 1, jl_apply(m->func, tt->data, jl_tuple_len(tt))); - func = (jl_function_t*)jl_toplevel_eval(jl_expand((jl_value_t*)ex)); + code = jl_expand((jl_value_t*)ex); + func = (jl_function_t*)jl_toplevel_eval(code); JL_GC_POP(); return func; } @@ -972,7 +973,8 @@ static jl_function_t *jl_mt_assoc_by_type(jl_methtable_t *mt, jl_tuple_t *tt, in size_t nargs = jl_tuple_len(tt); size_t i; jl_value_t *ti=(jl_value_t*)jl_bottom_type; - jl_tuple_t *newsig=NULL, *env = jl_null, *func = NULL; + jl_tuple_t *newsig=NULL, *env = jl_null; + jl_function_t *func = NULL; JL_GC_PUSH3(&env, &newsig, &func); while (m != JL_NULL) {