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 2013/09/13 20:31:44 UTC
[lucy-commits] [12/17] git commit: refs/heads/cfish-string-prep1 - Eliminate
Obj_Mimic in SortFieldWriter
Eliminate Obj_Mimic in SortFieldWriter
This is probably wrong but it doesn't break any tests.
Project: http://git-wip-us.apache.org/repos/asf/lucy/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy/commit/ec1f8867
Tree: http://git-wip-us.apache.org/repos/asf/lucy/tree/ec1f8867
Diff: http://git-wip-us.apache.org/repos/asf/lucy/diff/ec1f8867
Branch: refs/heads/cfish-string-prep1
Commit: ec1f886752915e4b691c4ae41dd657c47bc3a83c
Parents: 56cbd56
Author: Nick Wellnhofer <we...@aevum.de>
Authored: Tue Sep 10 01:54:24 2013 +0200
Committer: Nick Wellnhofer <we...@aevum.de>
Committed: Fri Sep 13 20:16:12 2013 +0200
----------------------------------------------------------------------
core/Lucy/Index/SortFieldWriter.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucy/blob/ec1f8867/core/Lucy/Index/SortFieldWriter.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Index/SortFieldWriter.c b/core/Lucy/Index/SortFieldWriter.c
index b251123..5e4f173 100644
--- a/core/Lucy/Index/SortFieldWriter.c
+++ b/core/Lucy/Index/SortFieldWriter.c
@@ -552,7 +552,7 @@ S_write_files(SortFieldWriter *self, OutStream *ord_out, OutStream *ix_out,
ords[0] = 0;
// Build array of ords, write non-NULL sorted values.
- Obj *val = Obj_Clone(elem->value);
+ Obj *val = elem->value;
Obj *last_val_address = elem->value;
S_write_val(elem->value, prim_id, ix_out, dat_out, dat_start);
while (NULL != (elem = (SFWriterElem*)SortFieldWriter_Fetch(self))) {
@@ -562,13 +562,12 @@ S_write_files(SortFieldWriter *self, OutStream *ord_out, OutStream *ix_out,
if (comparison != 0) {
ord++;
S_write_val(elem->value, prim_id, ix_out, dat_out, dat_start);
- Obj_Mimic(val, elem->value);
+ val = elem->value;
}
last_val_address = elem->value;
}
ords[elem->doc_id] = ord;
}
- DECREF(val);
// If there are NULL values, write one now and record the NULL ord.
if (has_nulls) {