mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
don't optimise anything with TARGET_TRANS to avoid intefering with the matcher's counting
This commit is contained in:
parent
e07803f976
commit
616eda51e3
@ -37,8 +37,6 @@ struct dm_regex { /* Instance variables for the lexer */
|
||||
struct dm_pool *scratch, *mem;
|
||||
};
|
||||
|
||||
#define TARGET_TRANS '\0'
|
||||
|
||||
static int _count_nodes(struct rx_node *rx)
|
||||
{
|
||||
int r = 1;
|
||||
|
@ -452,7 +452,12 @@ static int _nodes_equal(struct rx_node *l, struct rx_node *r)
|
||||
return _nodes_equal(l->left, r->left);
|
||||
|
||||
case CHARSET:
|
||||
return dm_bitset_equal(l->charset, r->charset);
|
||||
/*
|
||||
* Never change anything containing TARGET_TRANS
|
||||
* used by matcher as boundary marker between concatenated
|
||||
* expressions.
|
||||
*/
|
||||
return (!dm_bit(l->charset, TARGET_TRANS) && dm_bitset_equal(l->charset, r->charset));
|
||||
}
|
||||
|
||||
/* NOTREACHED */
|
||||
|
@ -33,6 +33,8 @@ enum {
|
||||
#define HAT_CHAR 0x2
|
||||
#define DOLLAR_CHAR 0x3
|
||||
|
||||
#define TARGET_TRANS '\0'
|
||||
|
||||
struct rx_node {
|
||||
int type;
|
||||
dm_bitset_t charset;
|
||||
|
Loading…
Reference in New Issue
Block a user