diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2015-08-24 22:06:13 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2015-08-24 22:06:13 -0700 |
commit | 8d78717508e7f49a9af456197369d74352122b91 (patch) | |
tree | c99303cdb7a3678ae97e32c84ff7c842de54b886 /match.c | |
parent | ba3809f1be41bec92385b3e023269145dde4e5b2 (diff) | |
download | txr-8d78717508e7f49a9af456197369d74352122b91.tar.gz txr-8d78717508e7f49a9af456197369d74352122b91.tar.bz2 txr-8d78717508e7f49a9af456197369d74352122b91.zip |
Replace two-step initialization of args with macros.
* args.h (args_init_list, args_init): Return the
struct args * pointer.
(args_decl_list, args_decl): New macros.
* eval.c (apply, do_eval, expand_macro, op_dwim, op_catch,
(mapcarl, lazy_mapcarl): Switch to new macros.
* hash.c (hashl): Likewise.
* lib.c (generic_funcall, lazy_appendl, maxl, minl, funcall,
funcal1, funcall2, funcall3, funcall4, transpose, juxtv,
do_and, do_or, do_iff, unique): Likewise.
* match.c (h_fun, v_fun): Likewise.
* stream.c (vformat): Likewise.
* syslog.c (syslog_wrap): Likewise.
Diffstat (limited to 'match.c')
-rw-r--r-- | match.c | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -1101,8 +1101,7 @@ static val h_fun(match_line_ctx *c) } { - struct args *args = args_alloc(ARGS_MIN); - args_init_list(args, ARGS_MIN, bindings_cp); + args_decl_list(args, ARGS_MIN, bindings_cp); uw_block_begin(nil, result); uw_env_begin; debug_frame(sym, args, ub_p_a_pairs, c->bindings, c->dataline, c->data_lineno, c->pos); @@ -3589,8 +3588,7 @@ static val v_fun(match_files_ctx *c) } { - struct args *args = args_alloc(ARGS_MIN); - args_init_list(args, ARGS_MIN, bindings_cp); + args_decl_list(args, ARGS_MIN, bindings_cp); uw_block_begin(nil, result); uw_env_begin; debug_frame(sym, args, ub_p_a_pairs, c->bindings, if2(consp(c->data), car(c->data)), |