dovecot-2.2: lib-fts: tr29 tokenizer - rename variable in prepar...

dovecot at dovecot.org dovecot at dovecot.org
Mon Jun 1 19:01:24 UTC 2015


details:   http://hg.dovecot.org/dovecot-2.2/rev/218c3988e105
changeset: 18779:218c3988e105
user:      Timo Sirainen <tss at iki.fi>
date:      Mon Jun 01 21:49:18 2015 +0300
description:
lib-fts: tr29 tokenizer - rename variable in preparation for the next patch

diffstat:

 src/lib-fts/fts-tokenizer-generic.c |  14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diffs (39 lines):

diff -r e3f9e4c8a338 -r 218c3988e105 src/lib-fts/fts-tokenizer-generic.c
--- a/src/lib-fts/fts-tokenizer-generic.c	Mon Jun 01 21:48:59 2015 +0300
+++ b/src/lib-fts/fts-tokenizer-generic.c	Mon Jun 01 21:49:18 2015 +0300
@@ -631,7 +631,7 @@
 	struct generic_fts_tokenizer *tok =
 		(struct generic_fts_tokenizer *)_tok;
 	unichar_t c;
-	size_t i, char_start_i, start_skip = 0;
+	size_t i, char_start_i, start_pos = 0;
 	enum letter_type lt;
 
 	/* TODO: Process 8bit chars separately, to speed things up. */
@@ -644,20 +644,20 @@
 		if (tok->prev_letter == LETTER_TYPE_NONE && is_nontoken(lt)) {
 			/* Skip non-token chars at the beginning of token */
 			i_assert(tok->token->used == 0);
-			start_skip = i;
+			start_pos = i;
 			continue;
 		}
 		if (uni_found_word_boundary(tok, lt)) {
-			i_assert(char_start_i >= start_skip && size >= start_skip);
-			tok_append_truncated(tok, data + start_skip,
-					     char_start_i - start_skip);
+			i_assert(char_start_i >= start_pos && size >= start_pos);
+			tok_append_truncated(tok, data + start_pos,
+					     char_start_i - start_pos);
 			*skip_r = i;
 			fts_tokenizer_generic_tr29_current_token(tok, token_r);
 			return 1;
 		}
 	}
-	i_assert(i >= start_skip && size >= start_skip);
-	tok_append_truncated(tok, data + start_skip, i - start_skip);
+	i_assert(i >= start_pos && size >= start_pos);
+	tok_append_truncated(tok, data + start_pos, i - start_pos);
 	*skip_r = i;
 
 	if (size == 0 && tok->token->used > 0) {


More information about the dovecot-cvs mailing list