From d9b76963fcacea3958728d527132f123d8fde482 Mon Sep 17 00:00:00 2001 From: "Tom Breton (Tehom)" Date: Tue, 24 May 2011 17:38:39 -0400 Subject: [PATCH] Added error-provoker argument to destructure --- klink.c | 32 +++++++++++++++++++++----------- 1 file changed, 21 insertions(+), 11 deletions(-) diff --git a/klink.c b/klink.c index 54355ef..7f2674f 100644 --- a/klink.c +++ b/klink.c @@ -2799,7 +2799,7 @@ destructure_make_ops_to_bool kt_destr_outcome destructure (klink * sc, pko argobject, pko typespec, pko ** outarray, - pko * past_end, pko * extra_result, int saw_optional) + pko * past_end, pko * extra_result, int saw_optional, pko provoker) { if(*outarray == past_end) { @@ -2827,12 +2827,13 @@ destructure else { kt_destr_outcome outcome = - destructure(sc, argobject, - ar_typespec[1], - outarray, - past_end, - extra_result, - 0); + destructure (sc, argobject, + ar_typespec[1], + outarray, + past_end, + extra_result, + 0, + provoker); /* If there's error, contribute to describing its location. */ if (outcome == destr_err) @@ -2902,7 +2903,8 @@ destructure outarray, past_end, extra_result, - 0); + 0, + provoker); switch (outcome) { case destr_success: @@ -3017,7 +3019,14 @@ destructure_to_array pko * orig_array = array; pko extra_result = 0; kt_destr_outcome outcome = - destructure (sc, obj, type, &array, array + length, &extra_result, 0); + destructure (sc, + obj, + type, + &array, + array + length, + &extra_result, + 0, + provoker); switch (outcome) { case destr_success: @@ -3073,7 +3082,7 @@ SIG_CHKARRAY (destructure_resume) = }; DEF_SIMPLE_CFUNC (ps0a5, destructure_resume, 0) { - WITH_5_ARGS (destr_result, argobject, typespec, opt_p, err_val); + WITH_5_ARGS (destr_result, argobject, typespec, opt_p, provoker); const int max_args = 5; pko arg_array [max_args]; pko * outarray = arg_array; @@ -3085,7 +3094,8 @@ DEF_SIMPLE_CFUNC (ps0a5, destructure_resume, 0) &outarray, arg_array + max_args, &extra_result, - (opt_p == K_T)); + (opt_p == K_T), + provoker); switch (outcome) { case destr_success: -- 2.11.4.GIT