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/01 22:17:11 UTC
[lucy-commits] [23/24] git commit: refs/heads/cfish-string-prep1 - Use
Str_Immutable_Cat for tempfile names.
Use Str_Immutable_Cat for tempfile names.
Project: http://git-wip-us.apache.org/repos/asf/lucy/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy/commit/34e663ae
Tree: http://git-wip-us.apache.org/repos/asf/lucy/tree/34e663ae
Diff: http://git-wip-us.apache.org/repos/asf/lucy/diff/34e663ae
Branch: refs/heads/cfish-string-prep1
Commit: 34e663ae5c2b091792ee79e98430c4dfc04bed2f
Parents: f73001f
Author: Nick Wellnhofer <we...@aevum.de>
Authored: Sun Sep 1 20:55:38 2013 +0200
Committer: Nick Wellnhofer <we...@aevum.de>
Committed: Sun Sep 1 22:05:03 2013 +0200
----------------------------------------------------------------------
core/Lucy/Index/BackgroundMerger.c | 5 +++--
core/Lucy/Index/Indexer.c | 5 +++--
2 files changed, 6 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucy/blob/34e663ae/core/Lucy/Index/BackgroundMerger.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Index/BackgroundMerger.c b/core/Lucy/Index/BackgroundMerger.c
index fe94a7d..85ca89c 100644
--- a/core/Lucy/Index/BackgroundMerger.c
+++ b/core/Lucy/Index/BackgroundMerger.c
@@ -412,8 +412,9 @@ BGMerger_Prepare_Commit_IMP(BackgroundMerger *self) {
// Write temporary snapshot file.
DECREF(ivars->snapfile);
- ivars->snapfile = IxManager_Make_Snapshot_Filename(ivars->manager);
- Str_Cat_Trusted_Str(ivars->snapfile, ".temp", 5);
+ String *snapfile = IxManager_Make_Snapshot_Filename(ivars->manager);
+ ivars->snapfile = Str_Immutable_Cat_Trusted_UTF8(snapfile, ".temp", 5);
+ DECREF(snapfile);
Folder_Delete(folder, ivars->snapfile);
Snapshot_Write_File(snapshot, folder, ivars->snapfile);
http://git-wip-us.apache.org/repos/asf/lucy/blob/34e663ae/core/Lucy/Index/Indexer.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Index/Indexer.c b/core/Lucy/Index/Indexer.c
index cade20a..a564049 100644
--- a/core/Lucy/Index/Indexer.c
+++ b/core/Lucy/Index/Indexer.c
@@ -507,8 +507,9 @@ Indexer_Prepare_Commit_IMP(Indexer *self) {
// Derive snapshot and schema file names.
DECREF(ivars->snapfile);
- ivars->snapfile = IxManager_Make_Snapshot_Filename(ivars->manager);
- Str_Cat_Trusted_Str(ivars->snapfile, ".temp", 5);
+ String *snapfile = IxManager_Make_Snapshot_Filename(ivars->manager);
+ ivars->snapfile = Str_Immutable_Cat_Trusted_UTF8(snapfile, ".temp", 5);
+ DECREF(snapfile);
uint64_t schema_gen = IxFileNames_extract_gen(ivars->snapfile);
char base36[StrHelp_MAX_BASE36_BYTES];
StrHelp_to_base36(schema_gen, &base36);