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:24 UTC
[03/14] lucy git commit: Update remaining invocations of VA_Sort
Update remaining invocations of VA_Sort
Project: http://git-wip-us.apache.org/repos/asf/lucy/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy/commit/66c287f1
Tree: http://git-wip-us.apache.org/repos/asf/lucy/tree/66c287f1
Diff: http://git-wip-us.apache.org/repos/asf/lucy/diff/66c287f1
Branch: refs/heads/master
Commit: 66c287f156795ce0e9f7476cc48e61b6509bd5d3
Parents: 2020fec
Author: Nick Wellnhofer <we...@aevum.de>
Authored: Sun Apr 26 20:38:45 2015 +0200
Committer: Nick Wellnhofer <we...@aevum.de>
Committed: Sun Apr 26 21:04:35 2015 +0200
----------------------------------------------------------------------
core/Lucy/Highlight/HeatMap.c | 4 ++--
core/Lucy/Highlight/Highlighter.c | 2 +-
core/Lucy/Index/FilePurger.c | 2 +-
core/Lucy/Index/Inverter.c | 2 +-
core/Lucy/Index/PolyReader.c | 2 +-
core/Lucy/Index/Snapshot.c | 2 +-
core/Lucy/Search/QueryParser.c | 4 ++--
core/Lucy/Store/CompoundFileWriter.c | 2 +-
core/Lucy/Test/Search/TestSortSpec.c | 2 +-
core/Lucy/Test/Store/TestFolder.c | 2 +-
core/Lucy/Test/Util/TestSortExternal.c | 2 +-
core/Lucy/Util/Json.c | 2 +-
12 files changed, 14 insertions(+), 14 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucy/blob/66c287f1/core/Lucy/Highlight/HeatMap.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Highlight/HeatMap.c b/core/Lucy/Highlight/HeatMap.c
index f631b77..fa8f978 100644
--- a/core/Lucy/Highlight/HeatMap.c
+++ b/core/Lucy/Highlight/HeatMap.c
@@ -36,10 +36,10 @@ HeatMap_init(HeatMap *self, VArray *spans, uint32_t window) {
ivars->spans = NULL;
ivars->window = window;
- VA_Sort(spans_copy, NULL, NULL);
+ VA_Sort(spans_copy);
spans_plus_boosts = HeatMap_Generate_Proximity_Boosts(self, spans_copy);
VA_Push_All(spans_plus_boosts, spans_copy);
- VA_Sort(spans_plus_boosts, NULL, NULL);
+ VA_Sort(spans_plus_boosts);
ivars->spans = HeatMap_Flatten_Spans(self, spans_plus_boosts);
DECREF(spans_plus_boosts);
http://git-wip-us.apache.org/repos/asf/lucy/blob/66c287f1/core/Lucy/Highlight/Highlighter.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Highlight/Highlighter.c b/core/Lucy/Highlight/Highlighter.c
index 915aa7c..b0397a1 100644
--- a/core/Lucy/Highlight/Highlighter.c
+++ b/core/Lucy/Highlight/Highlighter.c
@@ -170,7 +170,7 @@ Highlighter_Create_Excerpt_IMP(Highlighter *self, HitDoc *hit_doc) {
= Compiler_Highlight_Spans(ivars->compiler, ivars->searcher,
doc_vec, ivars->field);
VArray *score_spans = maybe_spans ? maybe_spans : VA_new(0);
- VA_Sort(score_spans, NULL, NULL);
+ VA_Sort(score_spans);
HeatMap *heat_map
= HeatMap_new(score_spans, (ivars->excerpt_length * 2) / 3);
http://git-wip-us.apache.org/repos/asf/lucy/blob/66c287f1/core/Lucy/Index/FilePurger.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Index/FilePurger.c b/core/Lucy/Index/FilePurger.c
index e016b77..9b5971a 100644
--- a/core/Lucy/Index/FilePurger.c
+++ b/core/Lucy/Index/FilePurger.c
@@ -93,7 +93,7 @@ FilePurger_Purge_IMP(FilePurger *self) {
// Attempt to delete entries -- if failure, no big deal, just try
// again later. Proceed in reverse lexical order so that directories
// get deleted after they've been emptied.
- VA_Sort(purgables, NULL, NULL);
+ VA_Sort(purgables);
for (uint32_t i = VA_Get_Size(purgables); i--;) {
String *entry = (String*)VA_Fetch(purgables, i);
if (Hash_Fetch(ivars->disallowed, entry)) { continue; }
http://git-wip-us.apache.org/repos/asf/lucy/blob/66c287f1/core/Lucy/Index/Inverter.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Index/Inverter.c b/core/Lucy/Index/Inverter.c
index 60eff3f..c48d71d 100644
--- a/core/Lucy/Index/Inverter.c
+++ b/core/Lucy/Index/Inverter.c
@@ -77,7 +77,7 @@ Inverter_Iterate_IMP(Inverter *self) {
InverterIVARS *const ivars = Inverter_IVARS(self);
ivars->tick = -1;
if (!ivars->sorted) {
- VA_Sort(ivars->entries, NULL, NULL);
+ VA_Sort(ivars->entries);
ivars->sorted = true;
}
return VA_Get_Size(ivars->entries);
http://git-wip-us.apache.org/repos/asf/lucy/blob/66c287f1/core/Lucy/Index/PolyReader.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Index/PolyReader.c b/core/Lucy/Index/PolyReader.c
index 203a752..6b99962 100644
--- a/core/Lucy/Index/PolyReader.c
+++ b/core/Lucy/Index/PolyReader.c
@@ -297,7 +297,7 @@ S_try_open_elements(void *context) {
}
// Sort the segments by age.
- VA_Sort(segments, NULL, NULL);
+ VA_Sort(segments);
// Open individual SegReaders.
struct try_open_segreader_context seg_context;
http://git-wip-us.apache.org/repos/asf/lucy/blob/66c287f1/core/Lucy/Index/Snapshot.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Index/Snapshot.c b/core/Lucy/Index/Snapshot.c
index fa4739a..b2ba7e1 100644
--- a/core/Lucy/Index/Snapshot.c
+++ b/core/Lucy/Index/Snapshot.c
@@ -195,7 +195,7 @@ Snapshot_Write_File_IMP(Snapshot *self, Folder *folder, String *path) {
}
// Sort, then store file names.
- VA_Sort(list, NULL, NULL);
+ VA_Sort(list);
Hash_Store_Utf8(all_data, "entries", 7, (Obj*)list);
// Create a JSON-izable data structure.
http://git-wip-us.apache.org/repos/asf/lucy/blob/66c287f1/core/Lucy/Search/QueryParser.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Search/QueryParser.c b/core/Lucy/Search/QueryParser.c
index ce73981..bc67151 100644
--- a/core/Lucy/Search/QueryParser.c
+++ b/core/Lucy/Search/QueryParser.c
@@ -123,7 +123,7 @@ QParser_init(QueryParser *self, Schema *schema, Analyzer *analyzer,
for (uint32_t i = 0, max = VA_Get_Size(fields); i < max; i++) {
CERTIFY(VA_Fetch(fields, i), STRING);
}
- VA_Sort(ivars->fields, NULL, NULL);
+ VA_Sort(ivars->fields);
}
else {
VArray *all_fields = Schema_All_Fields(schema);
@@ -138,7 +138,7 @@ QParser_init(QueryParser *self, Schema *schema, Analyzer *analyzer,
}
DECREF(all_fields);
}
- VA_Sort(ivars->fields, NULL, NULL);
+ VA_Sort(ivars->fields);
// Derive default "occur" from default boolean operator.
if (Str_Equals_Utf8(ivars->default_boolop, "OR", 2)) {
http://git-wip-us.apache.org/repos/asf/lucy/blob/66c287f1/core/Lucy/Store/CompoundFileWriter.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Store/CompoundFileWriter.c b/core/Lucy/Store/CompoundFileWriter.c
index 51749ee..a30ddad 100644
--- a/core/Lucy/Store/CompoundFileWriter.c
+++ b/core/Lucy/Store/CompoundFileWriter.c
@@ -109,7 +109,7 @@ S_do_consolidate(CompoundFileWriter *self, CompoundFileWriterIVARS *ivars) {
Hash_Store_Utf8(metadata, "format", 6,
(Obj*)Str_newf("%i32", CFWriter_current_file_format));
- VA_Sort(files, NULL, NULL);
+ VA_Sort(files);
for (uint32_t i = 0, max = VA_Get_Size(files); i < max; i++) {
String *infilename = (String*)VA_Fetch(files, i);
http://git-wip-us.apache.org/repos/asf/lucy/blob/66c287f1/core/Lucy/Test/Search/TestSortSpec.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Test/Search/TestSortSpec.c b/core/Lucy/Test/Search/TestSortSpec.c
index 3ad9cd5..d1d1331 100644
--- a/core/Lucy/Test/Search/TestSortSpec.c
+++ b/core/Lucy/Test/Search/TestSortSpec.c
@@ -322,7 +322,7 @@ S_add_random_objects(Indexer **indexer, Schema *schema, RAMFolder *folder,
}
}
- VA_Sort(objects, NULL, NULL);
+ VA_Sort(objects);
for (int i = 0; i < 100; ++i) {
Obj *obj = VA_Fetch(objects, i);
http://git-wip-us.apache.org/repos/asf/lucy/blob/66c287f1/core/Lucy/Test/Store/TestFolder.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Test/Store/TestFolder.c b/core/Lucy/Test/Store/TestFolder.c
index 11a2594..ae437d7 100644
--- a/core/Lucy/Test/Store/TestFolder.c
+++ b/core/Lucy/Test/Store/TestFolder.c
@@ -242,7 +242,7 @@ test_List(TestBatchRunner *runner) {
DECREF(fh);
list = Folder_List(folder, NULL);
- VA_Sort(list, NULL, NULL);
+ VA_Sort(list);
TEST_INT_EQ(runner, VA_Get_Size(list), 3, "List");
elem = (String*)DOWNCAST(VA_Fetch(list, 0), STRING);
TEST_TRUE(runner, elem && Str_Equals(elem, (Obj*)banana),
http://git-wip-us.apache.org/repos/asf/lucy/blob/66c287f1/core/Lucy/Test/Util/TestSortExternal.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Test/Util/TestSortExternal.c b/core/Lucy/Test/Util/TestSortExternal.c
index 04bf030..e7ca8f9 100644
--- a/core/Lucy/Test/Util/TestSortExternal.c
+++ b/core/Lucy/Test/Util/TestSortExternal.c
@@ -262,7 +262,7 @@ test_sort_random_strings(TestBatchRunner *runner) {
VA_Push(bytebufs, (Obj*)bytebuf);
}
- VA_Sort(bytebufs, NULL, NULL);
+ VA_Sort(bytebufs);
S_test_sort(runner, bytebufs, 15000,
"Random binary strings of random length");
http://git-wip-us.apache.org/repos/asf/lucy/blob/66c287f1/core/Lucy/Util/Json.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Util/Json.c b/core/Lucy/Util/Json.c
index d7d9c8a..4176f41 100644
--- a/core/Lucy/Util/Json.c
+++ b/core/Lucy/Util/Json.c
@@ -345,7 +345,7 @@ S_to_json(Obj *dump, CharBuf *buf, int32_t depth) {
return false;
}
}
- VA_Sort(keys, NULL, NULL);
+ VA_Sort(keys);
// Spread pairs across multiple lines.
CB_Cat_Trusted_Utf8(buf, "{", 1);