lucy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nwelln...@apache.org
Subject [3/6] lucy git commit: Switch over to CB_Clear
Date Sun, 15 Nov 2015 11:43:20 GMT
Switch over to CB_Clear


Project: http://git-wip-us.apache.org/repos/asf/lucy/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy/commit/f472b5e7
Tree: http://git-wip-us.apache.org/repos/asf/lucy/tree/f472b5e7
Diff: http://git-wip-us.apache.org/repos/asf/lucy/diff/f472b5e7

Branch: refs/heads/master
Commit: f472b5e745a6d28548d1e5f1f0ebc88bb4f6a939
Parents: 1554fa5
Author: Nick Wellnhofer <wellnhofer@aevum.de>
Authored: Tue Nov 10 13:35:14 2015 +0100
Committer: Nick Wellnhofer <wellnhofer@aevum.de>
Committed: Sun Nov 15 12:38:48 2015 +0100

----------------------------------------------------------------------
 core/Lucy/Highlight/Highlighter.c | 2 +-
 core/Lucy/Search/QueryParser.c    | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucy/blob/f472b5e7/core/Lucy/Highlight/Highlighter.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Highlight/Highlighter.c b/core/Lucy/Highlight/Highlighter.c
index f88b814..f25888f 100644
--- a/core/Lucy/Highlight/Highlighter.c
+++ b/core/Lucy/Highlight/Highlighter.c
@@ -603,8 +603,8 @@ S_encode_entities(String *text, CharBuf *buf) {
         }
     }
 
+    CB_Clear(buf);
     CB_Grow(buf, space);
-    CB_Set_Size(buf, 0);
     DECREF(iter);
     iter = Str_Top(text);
     while (STR_OOB != (code_point = StrIter_Next(iter))) {

http://git-wip-us.apache.org/repos/asf/lucy/blob/f472b5e7/core/Lucy/Search/QueryParser.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Search/QueryParser.c b/core/Lucy/Search/QueryParser.c
index 32736d5..40ba903 100644
--- a/core/Lucy/Search/QueryParser.c
+++ b/core/Lucy/Search/QueryParser.c
@@ -830,7 +830,7 @@ S_unescape(QueryParser *self, String *orig, CharBuf *buf) {
     int32_t code_point;
     UNUSED_VAR(self);
 
-    CB_Set_Size(buf, 0);
+    CB_Clear(buf);
     CB_Grow(buf, Str_Get_Size(orig) + 4);
 
     while (STR_OOB != (code_point = StrIter_Next(iter))) {


Mime
View raw message