summaryrefslogtreecommitdiffstats
path: root/regex.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2024-06-29 05:34:20 -0500
committerKaz Kylheku <kaz@kylheku.com>2024-06-29 05:34:20 -0500
commit445476b0f858d8bafd71ed96d54aa404d7ee6c99 (patch)
tree21181b14de18d171bdabc3cab1b4cde88eb55fc4 /regex.c
parentd05ca75be66d011778e6190ea5de6bc2211603d1 (diff)
downloadtxr-445476b0f858d8bafd71ed96d54aa404d7ee6c99.tar.gz
txr-445476b0f858d8bafd71ed96d54aa404d7ee6c99.tar.bz2
txr-445476b0f858d8bafd71ed96d54aa404d7ee6c99.zip
txr: better implementation of previous change.
We drop the global variable because all it's doing is marking a particular match_files_ctx structure as being top. We can do that with a flag inside the structure. * match.c (match_files_ctx): Remove struct tag; that was added while developing the previous patch and ended up not being required. New member, top. (mf_current): Static variable removed. (mf_all, mf_args, mf_data, mf_spec, mf_spec_bindings, mf_file, mf_file_data, mf_from_ml): Initialize new member to zero. (step_data): Check c->top being true rather than c == mf_current. (v_next_impl): We don't have to save and restore anything here; just set nc.top to 1. (extract): We remove the uw_simple_catch_begin block, since there is no global to restore. Just set c.top to 1.
Diffstat (limited to 'regex.c')
0 files changed, 0 insertions, 0 deletions