diff options
| -rw-r--r-- | xdiff/xprepare.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/xdiff/xprepare.c b/xdiff/xprepare.c index 08e5d3f4df..cd4fc405eb 100644 --- a/xdiff/xprepare.c +++ b/xdiff/xprepare.c @@ -36,7 +36,8 @@ typedef struct s_xdlclass { uint64_t line_hash; struct s_xdlclass *next; - xrecord_t rec; + const uint8_t *ptr; + size_t size; long idx; long len1, len2; } xdlclass_t; @@ -101,7 +102,7 @@ static int xdl_classify_record(unsigned int pass, xdlclassifier_t *cf, xrecord_t hi = XDL_HASHLONG(line_hash, cf->hbits); for (rcrec = cf->rchash[hi]; rcrec; rcrec = rcrec->next) if (rcrec->line_hash == line_hash && - xdl_recmatch((const char *)rcrec->rec.ptr, (long)rcrec->rec.size, + xdl_recmatch((const char *)rcrec->ptr, (long)rcrec->size, (const char *)rec->ptr, (long)rec->size, cf->flags)) break; @@ -115,7 +116,8 @@ static int xdl_classify_record(unsigned int pass, xdlclassifier_t *cf, xrecord_t return -1; cf->rcrecs[rcrec->idx] = rcrec; rcrec->line_hash = line_hash; - rcrec->rec = *rec; + rcrec->ptr = rec->ptr; + rcrec->size = rec->size; rcrec->len1 = rcrec->len2 = 0; rcrec->next = cf->rchash[hi]; cf->rchash[hi] = rcrec; |
