MCPcopy Create free account
hub / github.com/git/git / merge_state_array

Function merge_state_array

compat/regex/regexec.c:1739–1764  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1737 mctx->state_log_top = next_state_log_idx;
1738 }
1739 return REG_NOERROR;
1740}
1741
1742static reg_errcode_t
1743internal_function
1744merge_state_array (const re_dfa_t *dfa, re_dfastate_t **dst,
1745 re_dfastate_t **src, int num)
1746{
1747 int st_idx;
1748 reg_errcode_t err;
1749 for (st_idx = 0; st_idx < num; ++st_idx)
1750 {
1751 if (dst[st_idx] == NULL)
1752 dst[st_idx] = src[st_idx];
1753 else if (src[st_idx] != NULL)
1754 {
1755 re_node_set merged_set;
1756 err = re_node_set_init_union (&merged_set, &dst[st_idx]->nodes,
1757 &src[st_idx]->nodes);
1758 if (BE (err != REG_NOERROR, 0))
1759 return err;
1760 dst[st_idx] = re_acquire_state (&err, dfa, &merged_set);
1761 re_node_set_free (&merged_set);
1762 if (BE (err != REG_NOERROR, 0))
1763 return err;
1764 }
1765 }
1766 return REG_NOERROR;
1767}

Callers 2

prune_impossible_nodesFunction · 0.85
sift_states_bkrefFunction · 0.85

Calls 1

re_node_set_init_unionFunction · 0.85

Tested by

no test coverage detected