You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucy.apache.org by nw...@apache.org on 2015/04/29 21:56:26 UTC
[05/14] lucy git commit: Switch from VA_Shallow_Copy to VA_Clone
Switch from VA_Shallow_Copy to VA_Clone
Project: http://git-wip-us.apache.org/repos/asf/lucy/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy/commit/40baec85
Tree: http://git-wip-us.apache.org/repos/asf/lucy/tree/40baec85
Diff: http://git-wip-us.apache.org/repos/asf/lucy/diff/40baec85
Branch: refs/heads/master
Commit: 40baec856ad3b41a476035efcab0915f559950c3
Parents: 4229ef2
Author: Nick Wellnhofer <we...@aevum.de>
Authored: Sun Apr 26 20:42:49 2015 +0200
Committer: Nick Wellnhofer <we...@aevum.de>
Committed: Sun Apr 26 21:04:35 2015 +0200
----------------------------------------------------------------------
core/Lucy/Highlight/HeatMap.c | 2 +-
core/Lucy/Index/PolyReader.c | 2 +-
core/Lucy/Search/QueryParser.c | 4 ++--
core/Lucy/Search/SortSpec.c | 2 +-
4 files changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucy/blob/40baec85/core/Lucy/Highlight/HeatMap.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Highlight/HeatMap.c b/core/Lucy/Highlight/HeatMap.c
index fa8f978..13bf656 100644
--- a/core/Lucy/Highlight/HeatMap.c
+++ b/core/Lucy/Highlight/HeatMap.c
@@ -30,7 +30,7 @@ HeatMap_new(VArray *spans, uint32_t window) {
HeatMap*
HeatMap_init(HeatMap *self, VArray *spans, uint32_t window) {
HeatMapIVARS *const ivars = HeatMap_IVARS(self);
- VArray *spans_copy = VA_Shallow_Copy(spans);
+ VArray *spans_copy = VA_Clone(spans);
VArray *spans_plus_boosts;
ivars->spans = NULL;
http://git-wip-us.apache.org/repos/asf/lucy/blob/40baec85/core/Lucy/Index/PolyReader.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Index/PolyReader.c b/core/Lucy/Index/PolyReader.c
index 6b99962..7aa8eeb 100644
--- a/core/Lucy/Index/PolyReader.c
+++ b/core/Lucy/Index/PolyReader.c
@@ -540,7 +540,7 @@ PolyReader_Offsets_IMP(PolyReader *self) {
VArray*
PolyReader_Seg_Readers_IMP(PolyReader *self) {
PolyReaderIVARS *const ivars = PolyReader_IVARS(self);
- return (VArray*)VA_Shallow_Copy(ivars->sub_readers);
+ return (VArray*)VA_Clone(ivars->sub_readers);
}
VArray*
http://git-wip-us.apache.org/repos/asf/lucy/blob/40baec85/core/Lucy/Search/QueryParser.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Search/QueryParser.c b/core/Lucy/Search/QueryParser.c
index bc67151..69bcfdb 100644
--- a/core/Lucy/Search/QueryParser.c
+++ b/core/Lucy/Search/QueryParser.c
@@ -119,7 +119,7 @@ QParser_init(QueryParser *self, Schema *schema, Analyzer *analyzer,
: Str_new_from_trusted_utf8("OR", 2);
if (fields) {
- ivars->fields = VA_Shallow_Copy(fields);
+ ivars->fields = VA_Clone(fields);
for (uint32_t i = 0, max = VA_Get_Size(fields); i < max; i++) {
CERTIFY(VA_Fetch(fields, i), STRING);
}
@@ -596,7 +596,7 @@ S_compose_subquery(QueryParser *self, VArray *elems, bool enclosed) {
// Bind all mandatory matchers together in one Query.
if (num_required || num_negated) {
if (enclosed || num_required + num_negated > 1) {
- VArray *children = VA_Shallow_Copy(required);
+ VArray *children = VA_Clone(required);
VA_Push_All(children, negated);
req_query = QParser_Make_AND_Query(self, children);
DECREF(children);
http://git-wip-us.apache.org/repos/asf/lucy/blob/40baec85/core/Lucy/Search/SortSpec.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Search/SortSpec.c b/core/Lucy/Search/SortSpec.c
index 3ba42fa..02f12fa 100644
--- a/core/Lucy/Search/SortSpec.c
+++ b/core/Lucy/Search/SortSpec.c
@@ -36,7 +36,7 @@ SortSpec_new(VArray *rules) {
SortSpec*
SortSpec_init(SortSpec *self, VArray *rules) {
SortSpecIVARS *const ivars = SortSpec_IVARS(self);
- ivars->rules = VA_Shallow_Copy(rules);
+ ivars->rules = VA_Clone(rules);
for (int32_t i = 0, max = VA_Get_Size(rules); i < max; i++) {
SortRule *rule = (SortRule*)VA_Fetch(rules, i);
CERTIFY(rule, SORTRULE);