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/10/11 15:32:15 UTC
[lucy-commits] [37/50] [abbrv] Convert "const String" to "String"
http://git-wip-us.apache.org/repos/asf/lucy/blob/f079ab91/core/Lucy/Index/Segment.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Index/Segment.c b/core/Lucy/Index/Segment.c
index 511b15a..cda56c4 100644
--- a/core/Lucy/Index/Segment.c
+++ b/core/Lucy/Index/Segment.c
@@ -64,7 +64,7 @@ Seg_num_to_name(int64_t number) {
}
bool
-Seg_valid_seg_name(const String *name) {
+Seg_valid_seg_name(String *name) {
if (Str_Starts_With_Utf8(name, "seg_", 4)) {
StringIterator *iter = Str_Top(name);
StrIter_Advance(iter, 4);
@@ -158,7 +158,7 @@ Seg_Write_File_IMP(Segment *self, Folder *folder) {
}
int32_t
-Seg_Add_Field_IMP(Segment *self, const String *field) {
+Seg_Add_Field_IMP(Segment *self, String *field) {
SegmentIVARS *const ivars = Seg_IVARS(self);
Integer32 *num = (Integer32*)Hash_Fetch(ivars->by_name, (Obj*)field);
if (num) {
@@ -200,7 +200,7 @@ Seg_Increment_Count_IMP(Segment *self, int64_t increment) {
}
void
-Seg_Store_Metadata_IMP(Segment *self, const String *key, Obj *value) {
+Seg_Store_Metadata_IMP(Segment *self, String *key, Obj *value) {
SegmentIVARS *const ivars = Seg_IVARS(self);
if (Hash_Fetch(ivars->metadata, (Obj*)key)) {
THROW(ERR, "Metadata key '%o' already registered", key);
@@ -216,7 +216,7 @@ Seg_Store_Metadata_Utf8_IMP(Segment *self, const char *key, size_t key_len,
}
Obj*
-Seg_Fetch_Metadata_IMP(Segment *self, const String *key) {
+Seg_Fetch_Metadata_IMP(Segment *self, String *key) {
SegmentIVARS *const ivars = Seg_IVARS(self);
return Hash_Fetch(ivars->metadata, (Obj*)key);
}
@@ -251,7 +251,7 @@ Seg_Field_Name_IMP(Segment *self, int32_t field_num) {
}
int32_t
-Seg_Field_Num_IMP(Segment *self, const String *field) {
+Seg_Field_Num_IMP(Segment *self, String *field) {
if (field == NULL) {
return 0;
}
http://git-wip-us.apache.org/repos/asf/lucy/blob/f079ab91/core/Lucy/Index/Segment.cfh
----------------------------------------------------------------------
diff --git a/core/Lucy/Index/Segment.cfh b/core/Lucy/Index/Segment.cfh
index 43ca509..a1438a3 100644
--- a/core/Lucy/Index/Segment.cfh
+++ b/core/Lucy/Index/Segment.cfh
@@ -55,7 +55,7 @@ public class Lucy::Index::Segment cnick Seg inherits Clownfish::Obj {
* pattern: /^seg_\w+$/
*/
inert bool
- valid_seg_name(const String *name);
+ valid_seg_name(String *name);
/** Register a new field and assign it a field number. If the field was
* already known, nothing happens.
@@ -64,7 +64,7 @@ public class Lucy::Index::Segment cnick Seg inherits Clownfish::Obj {
* @return the field's field number, which is a positive integer.
*/
public int32_t
- Add_Field(Segment *self, const String *field);
+ Add_Field(Segment *self, String *field);
/** Store arbitrary information in the segment's metadata Hash, to be
* serialized later. Throws an error if <code>key</code> is used twice.
@@ -73,7 +73,7 @@ public class Lucy::Index::Segment cnick Seg inherits Clownfish::Obj {
* @param metadata JSON-izable data structure.
*/
public void
- Store_Metadata(Segment *self, const String *key,
+ Store_Metadata(Segment *self, String *key,
decremented Obj *metadata);
void
@@ -83,7 +83,7 @@ public class Lucy::Index::Segment cnick Seg inherits Clownfish::Obj {
/** Fetch a value from the Segment's metadata hash.
*/
public nullable Obj*
- Fetch_Metadata(Segment *self, const String *key);
+ Fetch_Metadata(Segment *self, String *key);
nullable Obj*
Fetch_Metadata_Utf8(Segment *self, const char *key, size_t len);
@@ -95,7 +95,7 @@ public class Lucy::Index::Segment cnick Seg inherits Clownfish::Obj {
* @param field Field name.
*/
public int32_t
- Field_Num(Segment *self, const String *field);
+ Field_Num(Segment *self, String *field);
/** Given a field number, return the name of its field, or NULL if the
* field name can't be found.
http://git-wip-us.apache.org/repos/asf/lucy/blob/f079ab91/core/Lucy/Index/Snapshot.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Index/Snapshot.c b/core/Lucy/Index/Snapshot.c
index 3f32465..1728e6b 100644
--- a/core/Lucy/Index/Snapshot.c
+++ b/core/Lucy/Index/Snapshot.c
@@ -60,13 +60,13 @@ Snapshot_Destroy_IMP(Snapshot *self) {
}
void
-Snapshot_Add_Entry_IMP(Snapshot *self, const String *entry) {
+Snapshot_Add_Entry_IMP(Snapshot *self, String *entry) {
SnapshotIVARS *const ivars = Snapshot_IVARS(self);
Hash_Store(ivars->entries, (Obj*)entry, (Obj*)CFISH_TRUE);
}
bool
-Snapshot_Delete_Entry_IMP(Snapshot *self, const String *entry) {
+Snapshot_Delete_Entry_IMP(Snapshot *self, String *entry) {
SnapshotIVARS *const ivars = Snapshot_IVARS(self);
Obj *val = Hash_Delete(ivars->entries, (Obj*)entry);
if (val) {
@@ -91,7 +91,7 @@ Snapshot_Num_Entries_IMP(Snapshot *self) {
}
void
-Snapshot_Set_Path_IMP(Snapshot *self, const String *path) {
+Snapshot_Set_Path_IMP(Snapshot *self, String *path) {
SnapshotIVARS *const ivars = Snapshot_IVARS(self);
DECREF(ivars->path);
ivars->path = path ? Str_Clone(path) : NULL;
@@ -103,7 +103,7 @@ Snapshot_Get_Path_IMP(Snapshot *self) {
}
Snapshot*
-Snapshot_Read_File_IMP(Snapshot *self, Folder *folder, const String *path) {
+Snapshot_Read_File_IMP(Snapshot *self, Folder *folder, String *path) {
SnapshotIVARS *const ivars = Snapshot_IVARS(self);
// Eliminate all prior data. Pick a snapshot file.
@@ -170,7 +170,7 @@ S_clean_segment_contents(VArray *orig) {
void
-Snapshot_Write_File_IMP(Snapshot *self, Folder *folder, const String *path) {
+Snapshot_Write_File_IMP(Snapshot *self, Folder *folder, String *path) {
SnapshotIVARS *const ivars = Snapshot_IVARS(self);
Hash *all_data = Hash_new(0);
VArray *list = Snapshot_List(self);
http://git-wip-us.apache.org/repos/asf/lucy/blob/f079ab91/core/Lucy/Index/Snapshot.cfh
----------------------------------------------------------------------
diff --git a/core/Lucy/Index/Snapshot.cfh b/core/Lucy/Index/Snapshot.cfh
index 01bff99..c7d69b7 100644
--- a/core/Lucy/Index/Snapshot.cfh
+++ b/core/Lucy/Index/Snapshot.cfh
@@ -55,7 +55,7 @@ public class Lucy::Index::Snapshot inherits Clownfish::Obj {
/** Add a filepath to the snapshot.
*/
public void
- Add_Entry(Snapshot *self, const String *entry);
+ Add_Entry(Snapshot *self, String *entry);
/** Delete a filepath from the snapshot.
*
@@ -63,7 +63,7 @@ public class Lucy::Index::Snapshot inherits Clownfish::Obj {
* otherwise.
*/
public bool
- Delete_Entry(Snapshot *self, const String *entry);
+ Delete_Entry(Snapshot *self, String *entry);
/** Decode a snapshot file and initialize the object to reflect its
* contents.
@@ -74,7 +74,7 @@ public class Lucy::Index::Snapshot inherits Clownfish::Obj {
* @return the object, allowing an assignment idiom.
*/
public Snapshot*
- Read_File(Snapshot *self, Folder *folder, const String *path = NULL);
+ Read_File(Snapshot *self, Folder *folder, String *path = NULL);
/** Write a snapshot file. The caller must lock the index while this
* operation takes place, and the operation will fail if the snapshot file
@@ -86,13 +86,13 @@ public class Lucy::Index::Snapshot inherits Clownfish::Obj {
* folder.
*/
public void
- Write_File(Snapshot *self, Folder *folder, const String *path = NULL);
+ Write_File(Snapshot *self, Folder *folder, String *path = NULL);
/** Set the path to the file that the Snapshot object serves as a proxy
* for.
*/
public void
- Set_Path(Snapshot *self, const String *path);
+ Set_Path(Snapshot *self, String *path);
/** Get the path to the snapshot file. Initially NULL; updated by
* Read_File(), Write_File(), and Set_Path().
http://git-wip-us.apache.org/repos/asf/lucy/blob/f079ab91/core/Lucy/Index/SortCache.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Index/SortCache.c b/core/Lucy/Index/SortCache.c
index 446ced2..3fe006f 100644
--- a/core/Lucy/Index/SortCache.c
+++ b/core/Lucy/Index/SortCache.c
@@ -21,7 +21,7 @@
#include "Lucy/Plan/FieldType.h"
SortCache*
-SortCache_init(SortCache *self, const String *field, FieldType *type,
+SortCache_init(SortCache *self, String *field, FieldType *type,
void *ords, int32_t cardinality, int32_t doc_max, int32_t null_ord,
int32_t ord_width) {
SortCacheIVARS *const ivars = SortCache_IVARS(self);
http://git-wip-us.apache.org/repos/asf/lucy/blob/f079ab91/core/Lucy/Index/SortCache.cfh
----------------------------------------------------------------------
diff --git a/core/Lucy/Index/SortCache.cfh b/core/Lucy/Index/SortCache.cfh
index f16b78f..380c28d 100644
--- a/core/Lucy/Index/SortCache.cfh
+++ b/core/Lucy/Index/SortCache.cfh
@@ -30,7 +30,7 @@ class Lucy::Index::SortCache inherits Clownfish::Obj {
bool native_ords;
public inert SortCache*
- init(SortCache *self, const String *field, FieldType *type,
+ init(SortCache *self, String *field, FieldType *type,
void *ords, int32_t cardinality, int32_t doc_max, int32_t null_ord = -1,
int32_t ord_width);
http://git-wip-us.apache.org/repos/asf/lucy/blob/f079ab91/core/Lucy/Index/SortCache/NumericSortCache.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Index/SortCache/NumericSortCache.c b/core/Lucy/Index/SortCache/NumericSortCache.c
index fe35359..1fba4f1 100644
--- a/core/Lucy/Index/SortCache/NumericSortCache.c
+++ b/core/Lucy/Index/SortCache/NumericSortCache.c
@@ -30,7 +30,7 @@
#include "Lucy/Store/Folder.h"
NumericSortCache*
-NumSortCache_init(NumericSortCache *self, const String *field,
+NumSortCache_init(NumericSortCache *self, String *field,
FieldType *type, int32_t cardinality, int32_t doc_max,
int32_t null_ord, int32_t ord_width, InStream *ord_in,
InStream *dat_in) {
@@ -82,7 +82,7 @@ NumSortCache_Destroy_IMP(NumericSortCache *self) {
/***************************************************************************/
Float64SortCache*
-F64SortCache_new(const String *field, FieldType *type, int32_t cardinality,
+F64SortCache_new(String *field, FieldType *type, int32_t cardinality,
int32_t doc_max, int32_t null_ord, int32_t ord_width,
InStream *ord_in, InStream *dat_in) {
Float64SortCache *self
@@ -92,7 +92,7 @@ F64SortCache_new(const String *field, FieldType *type, int32_t cardinality,
}
Float64SortCache*
-F64SortCache_init(Float64SortCache *self, const String *field,
+F64SortCache_init(Float64SortCache *self, String *field,
FieldType *type, int32_t cardinality, int32_t doc_max,
int32_t null_ord, int32_t ord_width, InStream *ord_in,
InStream *dat_in) {
@@ -120,7 +120,7 @@ F64SortCache_Value_IMP(Float64SortCache *self, int32_t ord) {
/***************************************************************************/
Float32SortCache*
-F32SortCache_new(const String *field, FieldType *type, int32_t cardinality,
+F32SortCache_new(String *field, FieldType *type, int32_t cardinality,
int32_t doc_max, int32_t null_ord, int32_t ord_width,
InStream *ord_in, InStream *dat_in) {
Float32SortCache *self
@@ -130,7 +130,7 @@ F32SortCache_new(const String *field, FieldType *type, int32_t cardinality,
}
Float32SortCache*
-F32SortCache_init(Float32SortCache *self, const String *field,
+F32SortCache_init(Float32SortCache *self, String *field,
FieldType *type, int32_t cardinality, int32_t doc_max,
int32_t null_ord, int32_t ord_width, InStream *ord_in,
InStream *dat_in) {
@@ -158,7 +158,7 @@ F32SortCache_Value_IMP(Float32SortCache *self, int32_t ord) {
/***************************************************************************/
Int32SortCache*
-I32SortCache_new(const String *field, FieldType *type, int32_t cardinality,
+I32SortCache_new(String *field, FieldType *type, int32_t cardinality,
int32_t doc_max, int32_t null_ord, int32_t ord_width,
InStream *ord_in, InStream *dat_in) {
Int32SortCache *self
@@ -168,7 +168,7 @@ I32SortCache_new(const String *field, FieldType *type, int32_t cardinality,
}
Int32SortCache*
-I32SortCache_init(Int32SortCache *self, const String *field,
+I32SortCache_init(Int32SortCache *self, String *field,
FieldType *type, int32_t cardinality, int32_t doc_max,
int32_t null_ord, int32_t ord_width, InStream *ord_in,
InStream *dat_in) {
@@ -196,7 +196,7 @@ I32SortCache_Value_IMP(Int32SortCache *self, int32_t ord) {
/***************************************************************************/
Int64SortCache*
-I64SortCache_new(const String *field, FieldType *type, int32_t cardinality,
+I64SortCache_new(String *field, FieldType *type, int32_t cardinality,
int32_t doc_max, int32_t null_ord, int32_t ord_width,
InStream *ord_in, InStream *dat_in) {
Int64SortCache *self
@@ -206,7 +206,7 @@ I64SortCache_new(const String *field, FieldType *type, int32_t cardinality,
}
Int64SortCache*
-I64SortCache_init(Int64SortCache *self, const String *field,
+I64SortCache_init(Int64SortCache *self, String *field,
FieldType *type, int32_t cardinality, int32_t doc_max,
int32_t null_ord, int32_t ord_width, InStream *ord_in,
InStream *dat_in) {
http://git-wip-us.apache.org/repos/asf/lucy/blob/f079ab91/core/Lucy/Index/SortCache/NumericSortCache.cfh
----------------------------------------------------------------------
diff --git a/core/Lucy/Index/SortCache/NumericSortCache.cfh b/core/Lucy/Index/SortCache/NumericSortCache.cfh
index 4b6de04..3d23200 100644
--- a/core/Lucy/Index/SortCache/NumericSortCache.cfh
+++ b/core/Lucy/Index/SortCache/NumericSortCache.cfh
@@ -23,7 +23,7 @@ class Lucy::Index::SortCache::NumericSortCache cnick NumSortCache
InStream *dat_in;
inert NumericSortCache*
- init(NumericSortCache *self, const String *field, FieldType *type,
+ init(NumericSortCache *self, String *field, FieldType *type,
int32_t cardinality, int32_t doc_max, int32_t null_ord = -1,
int32_t ord_width, InStream *ord_in, InStream *dat_in);
@@ -35,12 +35,12 @@ class Lucy::Index::SortCache::Float64SortCache cnick F64SortCache
inherits Lucy::Index::SortCache::NumericSortCache {
public inert incremented Float64SortCache*
- new(const String *field, FieldType *type, int32_t cardinality,
+ new(String *field, FieldType *type, int32_t cardinality,
int32_t doc_max, int32_t null_ord = -1, int32_t ord_width,
InStream *ord_in, InStream *dat_in);
public inert Float64SortCache*
- init(Float64SortCache *self, const String *field, FieldType *type,
+ init(Float64SortCache *self, String *field, FieldType *type,
int32_t cardinality, int32_t doc_max, int32_t null_ord = -1,
int32_t ord_width, InStream *ord_in, InStream *dat_in);
@@ -52,12 +52,12 @@ class Lucy::Index::SortCache::Float32SortCache cnick F32SortCache
inherits Lucy::Index::SortCache::NumericSortCache {
public inert incremented Float32SortCache*
- new(const String *field, FieldType *type, int32_t cardinality,
+ new(String *field, FieldType *type, int32_t cardinality,
int32_t doc_max, int32_t null_ord = -1, int32_t ord_width,
InStream *ord_in, InStream *dat_in);
public inert Float32SortCache*
- init(Float32SortCache *self, const String *field, FieldType *type,
+ init(Float32SortCache *self, String *field, FieldType *type,
int32_t cardinality, int32_t doc_max, int32_t null_ord = -1,
int32_t ord_width, InStream *ord_in, InStream *dat_in);
@@ -69,12 +69,12 @@ class Lucy::Index::SortCache::Int32SortCache cnick I32SortCache
inherits Lucy::Index::SortCache::NumericSortCache {
public inert incremented Int32SortCache*
- new(const String *field, FieldType *type, int32_t cardinality,
+ new(String *field, FieldType *type, int32_t cardinality,
int32_t doc_max, int32_t null_ord = -1, int32_t ord_width,
InStream *ord_in, InStream *dat_in);
public inert Int32SortCache*
- init(Int32SortCache *self, const String *field, FieldType *type,
+ init(Int32SortCache *self, String *field, FieldType *type,
int32_t cardinality, int32_t doc_max, int32_t null_ord = -1,
int32_t ord_width, InStream *ord_in, InStream *dat_in);
@@ -86,12 +86,12 @@ class Lucy::Index::SortCache::Int64SortCache cnick I64SortCache
inherits Lucy::Index::SortCache::NumericSortCache {
public inert incremented Int64SortCache*
- new(const String *field, FieldType *type, int32_t cardinality,
+ new(String *field, FieldType *type, int32_t cardinality,
int32_t doc_max, int32_t null_ord = -1, int32_t ord_width,
InStream *ord_in, InStream *dat_in);
public inert Int64SortCache*
- init(Int64SortCache *self, const String *field, FieldType *type,
+ init(Int64SortCache *self, String *field, FieldType *type,
int32_t cardinality, int32_t doc_max, int32_t null_ord = -1,
int32_t ord_width, InStream *ord_in, InStream *dat_in);
http://git-wip-us.apache.org/repos/asf/lucy/blob/f079ab91/core/Lucy/Index/SortCache/TextSortCache.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Index/SortCache/TextSortCache.c b/core/Lucy/Index/SortCache/TextSortCache.c
index b96c49f..19fa3df 100644
--- a/core/Lucy/Index/SortCache/TextSortCache.c
+++ b/core/Lucy/Index/SortCache/TextSortCache.c
@@ -25,7 +25,7 @@
#include "Lucy/Store/Folder.h"
TextSortCache*
-TextSortCache_new(const String *field, FieldType *type, int32_t cardinality,
+TextSortCache_new(String *field, FieldType *type, int32_t cardinality,
int32_t doc_max, int32_t null_ord, int32_t ord_width,
InStream *ord_in, InStream *ix_in, InStream *dat_in) {
TextSortCache *self = (TextSortCache*)VTable_Make_Obj(TEXTSORTCACHE);
@@ -34,7 +34,7 @@ TextSortCache_new(const String *field, FieldType *type, int32_t cardinality,
}
TextSortCache*
-TextSortCache_init(TextSortCache *self, const String *field,
+TextSortCache_init(TextSortCache *self, String *field,
FieldType *type, int32_t cardinality,
int32_t doc_max, int32_t null_ord, int32_t ord_width,
InStream *ord_in, InStream *ix_in, InStream *dat_in) {
http://git-wip-us.apache.org/repos/asf/lucy/blob/f079ab91/core/Lucy/Index/SortCache/TextSortCache.cfh
----------------------------------------------------------------------
diff --git a/core/Lucy/Index/SortCache/TextSortCache.cfh b/core/Lucy/Index/SortCache/TextSortCache.cfh
index 66b73c1..a933e05 100644
--- a/core/Lucy/Index/SortCache/TextSortCache.cfh
+++ b/core/Lucy/Index/SortCache/TextSortCache.cfh
@@ -26,12 +26,12 @@ class Lucy::Index::SortCache::TextSortCache
InStream *dat_in;
inert incremented TextSortCache*
- new(const String *field, FieldType *type, int32_t cardinality,
+ new(String *field, FieldType *type, int32_t cardinality,
int32_t doc_max, int32_t null_ord = -1, int32_t ord_width,
InStream *ord_in, InStream *ix_in, InStream *dat_in);
inert TextSortCache*
- init(TextSortCache *self, const String *field, FieldType *type,
+ init(TextSortCache *self, String *field, FieldType *type,
int32_t cardinality, int32_t doc_max, int32_t null_ord = -1,
int32_t ord_width, InStream *ord_in, InStream *ix_in,
InStream *dat_in);
http://git-wip-us.apache.org/repos/asf/lucy/blob/f079ab91/core/Lucy/Index/SortFieldWriter.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Index/SortFieldWriter.c b/core/Lucy/Index/SortFieldWriter.c
index 18ace6a..e7d35cf 100644
--- a/core/Lucy/Index/SortFieldWriter.c
+++ b/core/Lucy/Index/SortFieldWriter.c
@@ -57,7 +57,7 @@ typedef struct lucy_SFWriterElem {
SortFieldWriter*
SortFieldWriter_new(Schema *schema, Snapshot *snapshot, Segment *segment,
- PolyReader *polyreader, const String *field,
+ PolyReader *polyreader, String *field,
MemoryPool *memory_pool, size_t mem_thresh,
OutStream *temp_ord_out, OutStream *temp_ix_out,
OutStream *temp_dat_out) {
@@ -71,7 +71,7 @@ SortFieldWriter_new(Schema *schema, Snapshot *snapshot, Segment *segment,
SortFieldWriter*
SortFieldWriter_init(SortFieldWriter *self, Schema *schema,
Snapshot *snapshot, Segment *segment,
- PolyReader *polyreader, const String *field,
+ PolyReader *polyreader, String *field,
MemoryPool *memory_pool, size_t mem_thresh,
OutStream *temp_ord_out, OutStream *temp_ix_out,
OutStream *temp_dat_out) {
http://git-wip-us.apache.org/repos/asf/lucy/blob/f079ab91/core/Lucy/Index/SortFieldWriter.cfh
----------------------------------------------------------------------
diff --git a/core/Lucy/Index/SortFieldWriter.cfh b/core/Lucy/Index/SortFieldWriter.cfh
index 274961c..ac25515 100644
--- a/core/Lucy/Index/SortFieldWriter.cfh
+++ b/core/Lucy/Index/SortFieldWriter.cfh
@@ -55,13 +55,13 @@ class Lucy::Index::SortFieldWriter
inert incremented SortFieldWriter*
new(Schema *schema, Snapshot *snapshot, Segment *segment,
- PolyReader *polyreader, const String *field, MemoryPool *memory_pool,
+ PolyReader *polyreader, String *field, MemoryPool *memory_pool,
size_t mem_thresh, OutStream *temp_ord_out, OutStream *temp_ix_out,
OutStream *temp_dat_out);
inert SortFieldWriter*
init(SortFieldWriter *self, Schema *schema, Snapshot *snapshot,
- Segment *segment, PolyReader *polyreader, const String *field,
+ Segment *segment, PolyReader *polyreader, String *field,
MemoryPool *memory_pool, size_t mem_thresh, OutStream *temp_ord_out,
OutStream *temp_ix_out, OutStream *temp_dat_out);
http://git-wip-us.apache.org/repos/asf/lucy/blob/f079ab91/core/Lucy/Index/SortReader.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Index/SortReader.c b/core/Lucy/Index/SortReader.c
index efbd994..af337e2 100644
--- a/core/Lucy/Index/SortReader.c
+++ b/core/Lucy/Index/SortReader.c
@@ -155,7 +155,7 @@ S_calc_ord_width(int32_t cardinality) {
}
static SortCache*
-S_lazy_init_sort_cache(DefaultSortReader *self, const String *field) {
+S_lazy_init_sort_cache(DefaultSortReader *self, String *field) {
DefaultSortReaderIVARS *const ivars = DefSortReader_IVARS(self);
// See if we have any values.
@@ -257,7 +257,7 @@ S_lazy_init_sort_cache(DefaultSortReader *self, const String *field) {
SortCache*
DefSortReader_Fetch_Sort_Cache_IMP(DefaultSortReader *self,
- const String *field) {
+ String *field) {
SortCache *cache = NULL;
if (field) {
http://git-wip-us.apache.org/repos/asf/lucy/blob/f079ab91/core/Lucy/Index/SortReader.cfh
----------------------------------------------------------------------
diff --git a/core/Lucy/Index/SortReader.cfh b/core/Lucy/Index/SortReader.cfh
index ec57b22..db433c0 100644
--- a/core/Lucy/Index/SortReader.cfh
+++ b/core/Lucy/Index/SortReader.cfh
@@ -27,7 +27,7 @@ abstract class Lucy::Index::SortReader
int32_t seg_tick = -1);
abstract nullable SortCache*
- Fetch_Sort_Cache(SortReader *self, const String *field);
+ Fetch_Sort_Cache(SortReader *self, String *field);
/** Returns NULL, since multi-segment sort caches cannot be produced by
* the default implementation.
@@ -55,7 +55,7 @@ class Lucy::Index::DefaultSortReader cnick DefSortReader
Snapshot *snapshot, VArray *segments, int32_t seg_tick);
nullable SortCache*
- Fetch_Sort_Cache(DefaultSortReader *self, const String *field);
+ Fetch_Sort_Cache(DefaultSortReader *self, String *field);
public void
Close(DefaultSortReader *self);
http://git-wip-us.apache.org/repos/asf/lucy/blob/f079ab91/core/Lucy/Index/TermVector.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Index/TermVector.c b/core/Lucy/Index/TermVector.c
index 79dd977..edf8a8b 100644
--- a/core/Lucy/Index/TermVector.c
+++ b/core/Lucy/Index/TermVector.c
@@ -24,14 +24,14 @@
#include "Lucy/Util/Freezer.h"
TermVector*
-TV_new(const String *field, const String *text, I32Array *positions,
+TV_new(String *field, String *text, I32Array *positions,
I32Array *start_offsets, I32Array *end_offsets) {
TermVector *self = (TermVector*)VTable_Make_Obj(TERMVECTOR);
return TV_init(self, field, text, positions, start_offsets, end_offsets);
}
TermVector*
-TV_init(TermVector *self, const String *field, const String *text,
+TV_init(TermVector *self, String *field, String *text,
I32Array *positions, I32Array *start_offsets, I32Array *end_offsets) {
TermVectorIVARS *const ivars = TV_IVARS(self);
http://git-wip-us.apache.org/repos/asf/lucy/blob/f079ab91/core/Lucy/Index/TermVector.cfh
----------------------------------------------------------------------
diff --git a/core/Lucy/Index/TermVector.cfh b/core/Lucy/Index/TermVector.cfh
index 554602a..aed47df 100644
--- a/core/Lucy/Index/TermVector.cfh
+++ b/core/Lucy/Index/TermVector.cfh
@@ -33,11 +33,11 @@ class Lucy::Index::TermVector cnick TV
* start_offsets, and end_offsets arrays.
*/
inert incremented TermVector*
- new(const String *field, const String *text, I32Array *positions,
+ new(String *field, String *text, I32Array *positions,
I32Array *start_offsets, I32Array *end_offsets);
inert TermVector*
- init(TermVector *self, const String *field, const String *text,
+ init(TermVector *self, String *field, String *text,
I32Array *positions, I32Array *start_offsets, I32Array *end_offsets);
I32Array*
http://git-wip-us.apache.org/repos/asf/lucy/blob/f079ab91/core/Lucy/Plan/Schema.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Plan/Schema.c b/core/Lucy/Plan/Schema.c
index 070d6ce..4173145 100644
--- a/core/Lucy/Plan/Schema.c
+++ b/core/Lucy/Plan/Schema.c
@@ -38,13 +38,13 @@ static void
S_add_unique(VArray *array, Obj *elem);
static void
-S_add_text_field(Schema *self, const String *field, FieldType *type);
+S_add_text_field(Schema *self, String *field, FieldType *type);
static void
-S_add_string_field(Schema *self, const String *field, FieldType *type);
+S_add_string_field(Schema *self, String *field, FieldType *type);
static void
-S_add_blob_field(Schema *self, const String *field, FieldType *type);
+S_add_blob_field(Schema *self, String *field, FieldType *type);
static void
-S_add_numeric_field(Schema *self, const String *field, FieldType *type);
+S_add_numeric_field(Schema *self, String *field, FieldType *type);
Schema*
Schema_new() {
@@ -114,7 +114,7 @@ Schema_Architecture_IMP(Schema *self) {
}
void
-Schema_Spec_Field_IMP(Schema *self, const String *field, FieldType *type) {
+Schema_Spec_Field_IMP(Schema *self, String *field, FieldType *type) {
FieldType *existing = Schema_Fetch_Type(self, field);
// If the field already has an association, verify pairing and return.
@@ -141,7 +141,7 @@ Schema_Spec_Field_IMP(Schema *self, const String *field, FieldType *type) {
}
static void
-S_add_text_field(Schema *self, const String *field, FieldType *type) {
+S_add_text_field(Schema *self, String *field, FieldType *type) {
SchemaIVARS *const ivars = Schema_IVARS(self);
FullTextType *fttype = (FullTextType*)CERTIFY(type, FULLTEXTTYPE);
Similarity *sim = FullTextType_Make_Similarity(fttype);
@@ -157,7 +157,7 @@ S_add_text_field(Schema *self, const String *field, FieldType *type) {
}
static void
-S_add_string_field(Schema *self, const String *field, FieldType *type) {
+S_add_string_field(Schema *self, String *field, FieldType *type) {
SchemaIVARS *const ivars = Schema_IVARS(self);
StringType *string_type = (StringType*)CERTIFY(type, STRINGTYPE);
Similarity *sim = StringType_Make_Similarity(string_type);
@@ -170,27 +170,27 @@ S_add_string_field(Schema *self, const String *field, FieldType *type) {
}
static void
-S_add_blob_field(Schema *self, const String *field, FieldType *type) {
+S_add_blob_field(Schema *self, String *field, FieldType *type) {
SchemaIVARS *const ivars = Schema_IVARS(self);
BlobType *blob_type = (BlobType*)CERTIFY(type, BLOBTYPE);
Hash_Store(ivars->types, (Obj*)field, INCREF(blob_type));
}
static void
-S_add_numeric_field(Schema *self, const String *field, FieldType *type) {
+S_add_numeric_field(Schema *self, String *field, FieldType *type) {
SchemaIVARS *const ivars = Schema_IVARS(self);
NumericType *num_type = (NumericType*)CERTIFY(type, NUMERICTYPE);
Hash_Store(ivars->types, (Obj*)field, INCREF(num_type));
}
FieldType*
-Schema_Fetch_Type_IMP(Schema *self, const String *field) {
+Schema_Fetch_Type_IMP(Schema *self, String *field) {
SchemaIVARS *const ivars = Schema_IVARS(self);
return (FieldType*)Hash_Fetch(ivars->types, (Obj*)field);
}
Analyzer*
-Schema_Fetch_Analyzer_IMP(Schema *self, const String *field) {
+Schema_Fetch_Analyzer_IMP(Schema *self, String *field) {
SchemaIVARS *const ivars = Schema_IVARS(self);
return field
? (Analyzer*)Hash_Fetch(ivars->analyzers, (Obj*)field)
@@ -198,7 +198,7 @@ Schema_Fetch_Analyzer_IMP(Schema *self, const String *field) {
}
Similarity*
-Schema_Fetch_Sim_IMP(Schema *self, const String *field) {
+Schema_Fetch_Sim_IMP(Schema *self, String *field) {
SchemaIVARS *const ivars = Schema_IVARS(self);
Similarity *sim = NULL;
if (field != NULL) {
@@ -418,7 +418,7 @@ Schema_Eat_IMP(Schema *self, Schema *other) {
}
void
-Schema_Write_IMP(Schema *self, Folder *folder, const String *filename) {
+Schema_Write_IMP(Schema *self, Folder *folder, String *filename) {
Hash *dump = Schema_Dump(self);
StackString *schema_temp = SSTR_WRAP_UTF8("schema.temp", 11);
bool success;
http://git-wip-us.apache.org/repos/asf/lucy/blob/f079ab91/core/Lucy/Plan/Schema.cfh
----------------------------------------------------------------------
diff --git a/core/Lucy/Plan/Schema.cfh b/core/Lucy/Plan/Schema.cfh
index 527b68f..9767d85 100644
--- a/core/Lucy/Plan/Schema.cfh
+++ b/core/Lucy/Plan/Schema.cfh
@@ -57,24 +57,24 @@ public class Lucy::Plan::Schema inherits Clownfish::Obj {
* @param type A FieldType.
*/
public void
- Spec_Field(Schema *self, const String *name, FieldType *type);
+ Spec_Field(Schema *self, String *name, FieldType *type);
/** Return the FieldType for the specified field. If the field can't be
* found, return NULL.
*/
public nullable FieldType*
- Fetch_Type(Schema *self, const String *field);
+ Fetch_Type(Schema *self, String *field);
/** Return the Analyzer for the specified field.
*/
nullable Analyzer*
- Fetch_Analyzer(Schema *self, const String *field = NULL);
+ Fetch_Analyzer(Schema *self, String *field = NULL);
/** Return the Similarity for the specified field, or NULL if either the
* field can't be found or it isn't associated with a Similarity.
*/
public nullable Similarity*
- Fetch_Sim(Schema *self, const String *field = NULL);
+ Fetch_Sim(Schema *self, String *field = NULL);
/** Return the number of fields currently defined.
*/
@@ -108,7 +108,7 @@ public class Lucy::Plan::Schema inherits Clownfish::Obj {
Eat(Schema *self, Schema *other);
void
- Write(Schema *self, Folder *folder, const String *filename = NULL);
+ Write(Schema *self, Folder *folder, String *filename = NULL);
public void
Destroy(Schema *self);
http://git-wip-us.apache.org/repos/asf/lucy/blob/f079ab91/core/Lucy/Search/Compiler.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Search/Compiler.c b/core/Lucy/Search/Compiler.c
index 1ed904e..d8dd55e 100644
--- a/core/Lucy/Search/Compiler.c
+++ b/core/Lucy/Search/Compiler.c
@@ -97,7 +97,7 @@ Compiler_Normalize_IMP(Compiler *self) {
VArray*
Compiler_Highlight_Spans_IMP(Compiler *self, Searcher *searcher,
- DocVector *doc_vec, const String *field) {
+ DocVector *doc_vec, String *field) {
UNUSED_VAR(self);
UNUSED_VAR(searcher);
UNUSED_VAR(doc_vec);
http://git-wip-us.apache.org/repos/asf/lucy/blob/f079ab91/core/Lucy/Search/Compiler.cfh
----------------------------------------------------------------------
diff --git a/core/Lucy/Search/Compiler.cfh b/core/Lucy/Search/Compiler.cfh
index 8a1144f..4f490cf 100644
--- a/core/Lucy/Search/Compiler.cfh
+++ b/core/Lucy/Search/Compiler.cfh
@@ -149,7 +149,7 @@ public class Lucy::Search::Compiler inherits Lucy::Search::Query {
*/
public incremented VArray*
Highlight_Spans(Compiler *self, Searcher *searcher,
- DocVector *doc_vec, const String *field);
+ DocVector *doc_vec, String *field);
public void
Serialize(Compiler *self, OutStream *outstream);
http://git-wip-us.apache.org/repos/asf/lucy/blob/f079ab91/core/Lucy/Search/IndexSearcher.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Search/IndexSearcher.c b/core/Lucy/Search/IndexSearcher.c
index dc4fc0d..b631bf0 100644
--- a/core/Lucy/Search/IndexSearcher.c
+++ b/core/Lucy/Search/IndexSearcher.c
@@ -103,7 +103,7 @@ IxSearcher_Doc_Max_IMP(IndexSearcher *self) {
}
uint32_t
-IxSearcher_Doc_Freq_IMP(IndexSearcher *self, const String *field, Obj *term) {
+IxSearcher_Doc_Freq_IMP(IndexSearcher *self, String *field, Obj *term) {
IndexSearcherIVARS *const ivars = IxSearcher_IVARS(self);
LexiconReader *lex_reader
= (LexiconReader*)IxReader_Fetch(ivars->reader,
http://git-wip-us.apache.org/repos/asf/lucy/blob/f079ab91/core/Lucy/Search/IndexSearcher.cfh
----------------------------------------------------------------------
diff --git a/core/Lucy/Search/IndexSearcher.cfh b/core/Lucy/Search/IndexSearcher.cfh
index fce1910..18f5ab1 100644
--- a/core/Lucy/Search/IndexSearcher.cfh
+++ b/core/Lucy/Search/IndexSearcher.cfh
@@ -51,7 +51,7 @@ public class Lucy::Search::IndexSearcher cnick IxSearcher
Doc_Max(IndexSearcher *self);
public uint32_t
- Doc_Freq(IndexSearcher *self, const String *field, Obj *term);
+ Doc_Freq(IndexSearcher *self, String *field, Obj *term);
public void
Collect(IndexSearcher *self, Query *query, Collector *collector);
http://git-wip-us.apache.org/repos/asf/lucy/blob/f079ab91/core/Lucy/Search/LeafQuery.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Search/LeafQuery.c b/core/Lucy/Search/LeafQuery.c
index 52c2718..189ae2c 100644
--- a/core/Lucy/Search/LeafQuery.c
+++ b/core/Lucy/Search/LeafQuery.c
@@ -25,13 +25,13 @@
#include "Lucy/Util/Freezer.h"
LeafQuery*
-LeafQuery_new(const String *field, const String *text) {
+LeafQuery_new(String *field, String *text) {
LeafQuery *self = (LeafQuery*)VTable_Make_Obj(LEAFQUERY);
return LeafQuery_init(self, field, text);
}
LeafQuery*
-LeafQuery_init(LeafQuery *self, const String *field, const String *text) {
+LeafQuery_init(LeafQuery *self, String *field, String *text) {
LeafQueryIVARS *const ivars = LeafQuery_IVARS(self);
Query_init((Query*)self, 1.0f);
ivars->field = field ? Str_Clone(field) : NULL;
http://git-wip-us.apache.org/repos/asf/lucy/blob/f079ab91/core/Lucy/Search/LeafQuery.cfh
----------------------------------------------------------------------
diff --git a/core/Lucy/Search/LeafQuery.cfh b/core/Lucy/Search/LeafQuery.cfh
index 4c7d09c..63dea2f 100644
--- a/core/Lucy/Search/LeafQuery.cfh
+++ b/core/Lucy/Search/LeafQuery.cfh
@@ -31,14 +31,14 @@ public class Lucy::Search::LeafQuery inherits Lucy::Search::Query {
String *text;
inert incremented LeafQuery*
- new(const String *field = NULL, const String *text);
+ new(String *field = NULL, String *text);
/**
* @param field Optional field name.
* @param text Raw query text.
*/
public inert LeafQuery*
- init(LeafQuery *self, const String *field = NULL, const String *text);
+ init(LeafQuery *self, String *field = NULL, String *text);
/** Accessor for object's <code>field</code> attribute.
*/
http://git-wip-us.apache.org/repos/asf/lucy/blob/f079ab91/core/Lucy/Search/NOTQuery.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Search/NOTQuery.c b/core/Lucy/Search/NOTQuery.c
index eb9baf4..0daa62e 100644
--- a/core/Lucy/Search/NOTQuery.c
+++ b/core/Lucy/Search/NOTQuery.c
@@ -105,7 +105,7 @@ NOTCompiler_Sum_Of_Squared_Weights_IMP(NOTCompiler *self) {
VArray*
NOTCompiler_Highlight_Spans_IMP(NOTCompiler *self, Searcher *searcher,
- DocVector *doc_vec, const String *field) {
+ DocVector *doc_vec, String *field) {
UNUSED_VAR(self);
UNUSED_VAR(searcher);
UNUSED_VAR(doc_vec);
http://git-wip-us.apache.org/repos/asf/lucy/blob/f079ab91/core/Lucy/Search/NOTQuery.cfh
----------------------------------------------------------------------
diff --git a/core/Lucy/Search/NOTQuery.cfh b/core/Lucy/Search/NOTQuery.cfh
index 8e38d85..a9f10ad 100644
--- a/core/Lucy/Search/NOTQuery.cfh
+++ b/core/Lucy/Search/NOTQuery.cfh
@@ -78,7 +78,7 @@ class Lucy::Search::NOTCompiler
public incremented VArray*
Highlight_Spans(NOTCompiler *self, Searcher *searcher,
- DocVector *doc_vec, const String *field);
+ DocVector *doc_vec, String *field);
}
http://git-wip-us.apache.org/repos/asf/lucy/blob/f079ab91/core/Lucy/Search/PhraseQuery.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Search/PhraseQuery.c b/core/Lucy/Search/PhraseQuery.c
index 7576401..19abb78 100644
--- a/core/Lucy/Search/PhraseQuery.c
+++ b/core/Lucy/Search/PhraseQuery.c
@@ -46,13 +46,13 @@ static PhraseQuery*
S_do_init(PhraseQuery *self, String *field, VArray *terms, float boost);
PhraseQuery*
-PhraseQuery_new(const String *field, VArray *terms) {
+PhraseQuery_new(String *field, VArray *terms) {
PhraseQuery *self = (PhraseQuery*)VTable_Make_Obj(PHRASEQUERY);
return PhraseQuery_init(self, field, terms);
}
PhraseQuery*
-PhraseQuery_init(PhraseQuery *self, const String *field, VArray *terms) {
+PhraseQuery_init(PhraseQuery *self, String *field, VArray *terms) {
return S_do_init(self, Str_Clone(field), VA_Clone(terms), 1.0f);
}
@@ -343,7 +343,7 @@ PhraseCompiler_Make_Matcher_IMP(PhraseCompiler *self, SegReader *reader,
VArray*
PhraseCompiler_Highlight_Spans_IMP(PhraseCompiler *self, Searcher *searcher,
- DocVector *doc_vec, const String *field) {
+ DocVector *doc_vec, String *field) {
PhraseCompilerIVARS *const ivars = PhraseCompiler_IVARS(self);
PhraseQueryIVARS *const parent_ivars
= PhraseQuery_IVARS((PhraseQuery*)ivars->parent);
http://git-wip-us.apache.org/repos/asf/lucy/blob/f079ab91/core/Lucy/Search/PhraseQuery.cfh
----------------------------------------------------------------------
diff --git a/core/Lucy/Search/PhraseQuery.cfh b/core/Lucy/Search/PhraseQuery.cfh
index c8609f2..0f78399 100644
--- a/core/Lucy/Search/PhraseQuery.cfh
+++ b/core/Lucy/Search/PhraseQuery.cfh
@@ -28,14 +28,14 @@ public class Lucy::Search::PhraseQuery inherits Lucy::Search::Query {
VArray *terms;
inert incremented PhraseQuery*
- new(const String *field, VArray *terms);
+ new(String *field, VArray *terms);
/**
* @param field The field that the phrase must occur in.
* @param terms The ordered array of terms that must match.
*/
public inert PhraseQuery*
- init(PhraseQuery *self, const String *field, VArray *terms);
+ init(PhraseQuery *self, String *field, VArray *terms);
/** Accessor for object's field attribute.
*/
@@ -102,7 +102,7 @@ class Lucy::Search::PhraseCompiler
public incremented VArray*
Highlight_Spans(PhraseCompiler *self, Searcher *searcher,
- DocVector *doc_vec, const String *field);
+ DocVector *doc_vec, String *field);
public bool
Equals(PhraseCompiler *self, Obj *other);
http://git-wip-us.apache.org/repos/asf/lucy/blob/f079ab91/core/Lucy/Search/PolyQuery.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Search/PolyQuery.c b/core/Lucy/Search/PolyQuery.c
index 6d74c35..df0395f 100644
--- a/core/Lucy/Search/PolyQuery.c
+++ b/core/Lucy/Search/PolyQuery.c
@@ -185,7 +185,7 @@ PolyCompiler_Apply_Norm_Factor_IMP(PolyCompiler *self, float factor) {
VArray*
PolyCompiler_Highlight_Spans_IMP(PolyCompiler *self, Searcher *searcher,
- DocVector *doc_vec, const String *field) {
+ DocVector *doc_vec, String *field) {
PolyCompilerIVARS *const ivars = PolyCompiler_IVARS(self);
VArray *spans = VA_new(0);
for (uint32_t i = 0, max = VA_Get_Size(ivars->children); i < max; i++) {
http://git-wip-us.apache.org/repos/asf/lucy/blob/f079ab91/core/Lucy/Search/PolyQuery.cfh
----------------------------------------------------------------------
diff --git a/core/Lucy/Search/PolyQuery.cfh b/core/Lucy/Search/PolyQuery.cfh
index 5208f92..25c465b 100644
--- a/core/Lucy/Search/PolyQuery.cfh
+++ b/core/Lucy/Search/PolyQuery.cfh
@@ -88,7 +88,7 @@ class Lucy::Search::PolyCompiler inherits Lucy::Search::Compiler {
public incremented VArray*
Highlight_Spans(PolyCompiler *self, Searcher *searcher,
- DocVector *doc_vec, const String *field);
+ DocVector *doc_vec, String *field);
public void
Destroy(PolyCompiler *self);
http://git-wip-us.apache.org/repos/asf/lucy/blob/f079ab91/core/Lucy/Search/PolySearcher.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Search/PolySearcher.c b/core/Lucy/Search/PolySearcher.c
index 54f7565..48ec3d3 100644
--- a/core/Lucy/Search/PolySearcher.c
+++ b/core/Lucy/Search/PolySearcher.c
@@ -105,7 +105,7 @@ PolySearcher_Doc_Max_IMP(PolySearcher *self) {
}
uint32_t
-PolySearcher_Doc_Freq_IMP(PolySearcher *self, const String *field, Obj *term) {
+PolySearcher_Doc_Freq_IMP(PolySearcher *self, String *field, Obj *term) {
PolySearcherIVARS *const ivars = PolySearcher_IVARS(self);
uint32_t doc_freq = 0;
for (uint32_t i = 0, max = VA_Get_Size(ivars->searchers); i < max; i++) {
http://git-wip-us.apache.org/repos/asf/lucy/blob/f079ab91/core/Lucy/Search/PolySearcher.cfh
----------------------------------------------------------------------
diff --git a/core/Lucy/Search/PolySearcher.cfh b/core/Lucy/Search/PolySearcher.cfh
index 18bc489..2c4a82e 100644
--- a/core/Lucy/Search/PolySearcher.cfh
+++ b/core/Lucy/Search/PolySearcher.cfh
@@ -46,7 +46,7 @@ public class Lucy::Search::PolySearcher
Doc_Max(PolySearcher *self);
public uint32_t
- Doc_Freq(PolySearcher *self, const String *field, Obj *term);
+ Doc_Freq(PolySearcher *self, String *field, Obj *term);
public void
Collect(PolySearcher *self, Query *query, Collector *collector);
http://git-wip-us.apache.org/repos/asf/lucy/blob/f079ab91/core/Lucy/Search/QueryParser.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Search/QueryParser.c b/core/Lucy/Search/QueryParser.c
index 4d4c86d..1a27965 100644
--- a/core/Lucy/Search/QueryParser.c
+++ b/core/Lucy/Search/QueryParser.c
@@ -97,7 +97,7 @@ static Query*
S_compose_subquery(QueryParser *self, VArray *elems, bool enclosed);
QueryParser*
-QParser_new(Schema *schema, Analyzer *analyzer, const String *default_boolop,
+QParser_new(Schema *schema, Analyzer *analyzer, String *default_boolop,
VArray *fields) {
QueryParser *self = (QueryParser*)VTable_Make_Obj(QUERYPARSER);
return QParser_init(self, schema, analyzer, default_boolop, fields);
@@ -105,7 +105,7 @@ QParser_new(Schema *schema, Analyzer *analyzer, const String *default_boolop,
QueryParser*
QParser_init(QueryParser *self, Schema *schema, Analyzer *analyzer,
- const String *default_boolop, VArray *fields) {
+ String *default_boolop, VArray *fields) {
QueryParserIVARS *const ivars = QParser_IVARS(self);
// Init.
ivars->heed_colons = false;
@@ -199,7 +199,7 @@ QParser_Set_Heed_Colons_IMP(QueryParser *self, bool heed_colons) {
Query*
-QParser_Parse_IMP(QueryParser *self, const String *query_string) {
+QParser_Parse_IMP(QueryParser *self, String *query_string) {
String *qstring = query_string
? Str_Clone(query_string)
: Str_new_from_trusted_utf8("", 0);
@@ -213,7 +213,7 @@ QParser_Parse_IMP(QueryParser *self, const String *query_string) {
}
Query*
-QParser_Tree_IMP(QueryParser *self, const String *query_string) {
+QParser_Tree_IMP(QueryParser *self, String *query_string) {
QueryParserIVARS *const ivars = QParser_IVARS(self);
VArray *elems = QueryLexer_Tokenize(ivars->lexer, query_string);
S_balance_parens(self, elems);
@@ -376,7 +376,7 @@ S_compose_inner_queries(QueryParser *self, VArray *elems,
}
if (ParserElem_Get_Type(elem) == TOKEN_STRING) {
- const String *text = (String*)ParserElem_As(elem, STRING);
+ String *text = (String*)ParserElem_As(elem, STRING);
LeafQuery *query = LeafQuery_new(field, text);
ParserElem *new_elem
= ParserElem_new(TOKEN_QUERY, (Obj*)query);
@@ -972,14 +972,14 @@ QParser_Expand_Leaf_IMP(QueryParser *self, Query *query) {
}
Query*
-QParser_Make_Term_Query_IMP(QueryParser *self, const String *field,
+QParser_Make_Term_Query_IMP(QueryParser *self, String *field,
Obj *term) {
UNUSED_VAR(self);
return (Query*)TermQuery_new(field, term);
}
Query*
-QParser_Make_Phrase_Query_IMP(QueryParser *self, const String *field,
+QParser_Make_Phrase_Query_IMP(QueryParser *self, String *field,
VArray *terms) {
UNUSED_VAR(self);
return (Query*)PhraseQuery_new(field, terms);
http://git-wip-us.apache.org/repos/asf/lucy/blob/f079ab91/core/Lucy/Search/QueryParser.cfh
----------------------------------------------------------------------
diff --git a/core/Lucy/Search/QueryParser.cfh b/core/Lucy/Search/QueryParser.cfh
index d89c44f..50329fa 100644
--- a/core/Lucy/Search/QueryParser.cfh
+++ b/core/Lucy/Search/QueryParser.cfh
@@ -53,7 +53,7 @@ public class Lucy::Search::QueryParser cnick QParser
inert incremented QueryParser*
new(Schema *schema, Analyzer *analyzer = NULL,
- const String *default_boolop = NULL, VArray *fields = NULL);
+ String *default_boolop = NULL, VArray *fields = NULL);
/** Constructor.
*
@@ -73,7 +73,7 @@ public class Lucy::Search::QueryParser cnick QParser
*/
public inert QueryParser*
init(QueryParser *self, Schema *schema, Analyzer *analyzer = NULL,
- const String *default_boolop = NULL, VArray *fields = NULL);
+ String *default_boolop = NULL, VArray *fields = NULL);
/** Build a Query object from the contents of a query string. At present,
* implemented internally by calling Tree(), Expand(), and Prune().
@@ -82,7 +82,7 @@ public class Lucy::Search::QueryParser cnick QParser
* @return a Query.
*/
public incremented Query*
- Parse(QueryParser *self, const String *query_string = NULL);
+ Parse(QueryParser *self, String *query_string = NULL);
/** Parse the logical structure of a query string, building a tree
* comprised of Query objects. Leaf nodes in the tree will most often be
@@ -97,7 +97,7 @@ public class Lucy::Search::QueryParser cnick QParser
* @return a Query.
*/
public incremented Query*
- Tree(QueryParser *self, const String *query_string);
+ Tree(QueryParser *self, String *query_string);
/** Walk the hierarchy of a Query tree, descending through all PolyQuery
* nodes and calling Expand_Leaf() on any LeafQuery nodes encountered.
@@ -157,7 +157,7 @@ public class Lucy::Search::QueryParser cnick QParser
* @return A Query.
*/
public incremented Query*
- Make_Term_Query(QueryParser *self, const String *field, Obj *term);
+ Make_Term_Query(QueryParser *self, String *field, Obj *term);
/** Factory method creating a PhraseQuery.
*
@@ -166,7 +166,7 @@ public class Lucy::Search::QueryParser cnick QParser
* @return A Query.
*/
public incremented Query*
- Make_Phrase_Query(QueryParser *self, const String *field, VArray *terms);
+ Make_Phrase_Query(QueryParser *self, String *field, VArray *terms);
/** Factory method creating an ORQuery.
*
http://git-wip-us.apache.org/repos/asf/lucy/blob/f079ab91/core/Lucy/Search/QueryParser/QueryLexer.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Search/QueryParser/QueryLexer.c b/core/Lucy/Search/QueryParser/QueryLexer.c
index 1f819d6..f3827dd 100644
--- a/core/Lucy/Search/QueryParser/QueryLexer.c
+++ b/core/Lucy/Search/QueryParser/QueryLexer.c
@@ -71,7 +71,7 @@ QueryLexer_Set_Heed_Colons_IMP(QueryLexer *self, bool heed_colons) {
}
VArray*
-QueryLexer_Tokenize_IMP(QueryLexer *self, const String *query_string) {
+QueryLexer_Tokenize_IMP(QueryLexer *self, String *query_string) {
QueryLexerIVARS *const ivars = QueryLexer_IVARS(self);
VArray *elems = VA_new(0);
http://git-wip-us.apache.org/repos/asf/lucy/blob/f079ab91/core/Lucy/Search/QueryParser/QueryLexer.cfh
----------------------------------------------------------------------
diff --git a/core/Lucy/Search/QueryParser/QueryLexer.cfh b/core/Lucy/Search/QueryParser/QueryLexer.cfh
index 5069cd4..5c345f9 100644
--- a/core/Lucy/Search/QueryParser/QueryLexer.cfh
+++ b/core/Lucy/Search/QueryParser/QueryLexer.cfh
@@ -32,7 +32,7 @@ class Lucy::Search::QueryParser::QueryLexer inherits Clownfish::Obj {
* @return an array of ParserElems.
*/
incremented VArray*
- Tokenize(QueryLexer *self, const String *query_string = NULL);
+ Tokenize(QueryLexer *self, String *query_string = NULL);
bool
Heed_Colons(QueryLexer *self);
http://git-wip-us.apache.org/repos/asf/lucy/blob/f079ab91/core/Lucy/Search/RangeQuery.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Search/RangeQuery.c b/core/Lucy/Search/RangeQuery.c
index d4c7174..f42d2e3 100644
--- a/core/Lucy/Search/RangeQuery.c
+++ b/core/Lucy/Search/RangeQuery.c
@@ -41,7 +41,7 @@ static int32_t
S_find_upper_bound(RangeCompiler *self, SortCache *sort_cache);
RangeQuery*
-RangeQuery_new(const String *field, Obj *lower_term, Obj *upper_term,
+RangeQuery_new(String *field, Obj *lower_term, Obj *upper_term,
bool include_lower, bool include_upper) {
RangeQuery *self = (RangeQuery*)VTable_Make_Obj(RANGEQUERY);
return RangeQuery_init(self, field, lower_term, upper_term,
@@ -49,7 +49,7 @@ RangeQuery_new(const String *field, Obj *lower_term, Obj *upper_term,
}
RangeQuery*
-RangeQuery_init(RangeQuery *self, const String *field, Obj *lower_term,
+RangeQuery_init(RangeQuery *self, String *field, Obj *lower_term,
Obj *upper_term, bool include_lower, bool include_upper) {
Query_init((Query*)self, 0.0f);
RangeQueryIVARS *const ivars = RangeQuery_IVARS(self);
@@ -240,7 +240,7 @@ Matcher*
RangeCompiler_Make_Matcher_IMP(RangeCompiler *self, SegReader *reader,
bool need_score) {
RangeQuery *parent = (RangeQuery*)RangeCompiler_IVARS(self)->parent;
- const String *field = RangeQuery_IVARS(parent)->field;
+ String *field = RangeQuery_IVARS(parent)->field;
SortReader *sort_reader
= (SortReader*)SegReader_Fetch(reader, VTable_Get_Name(SORTREADER));
SortCache *sort_cache = sort_reader
http://git-wip-us.apache.org/repos/asf/lucy/blob/f079ab91/core/Lucy/Search/RangeQuery.cfh
----------------------------------------------------------------------
diff --git a/core/Lucy/Search/RangeQuery.cfh b/core/Lucy/Search/RangeQuery.cfh
index a013905..fc83382 100644
--- a/core/Lucy/Search/RangeQuery.cfh
+++ b/core/Lucy/Search/RangeQuery.cfh
@@ -31,7 +31,7 @@ public class Lucy::Search::RangeQuery inherits Lucy::Search::Query {
bool include_upper;
inert incremented RangeQuery*
- new(const String *field, Obj *lower_term = NULL, Obj *upper_term = NULL,
+ new(String *field, Obj *lower_term = NULL, Obj *upper_term = NULL,
bool include_lower = true, bool include_upper = true);
/** Takes 5 parameters; <code>field</code> is required, as
@@ -49,7 +49,7 @@ public class Lucy::Search::RangeQuery inherits Lucy::Search::Query {
* <code>upper_term</code> should be included in the results.
*/
public inert RangeQuery*
- init(RangeQuery *self, const String *field,
+ init(RangeQuery *self, String *field,
Obj *lower_term = NULL, Obj *upper_term = NULL,
bool include_lower = true, bool include_upper = true);
http://git-wip-us.apache.org/repos/asf/lucy/blob/f079ab91/core/Lucy/Search/Searcher.cfh
----------------------------------------------------------------------
diff --git a/core/Lucy/Search/Searcher.cfh b/core/Lucy/Search/Searcher.cfh
index d81ed54..49c950e 100644
--- a/core/Lucy/Search/Searcher.cfh
+++ b/core/Lucy/Search/Searcher.cfh
@@ -53,7 +53,7 @@ public class Lucy::Search::Searcher inherits Clownfish::Obj {
* @param term The term to look up.
*/
public abstract uint32_t
- Doc_Freq(Searcher *self, const String *field, Obj *term);
+ Doc_Freq(Searcher *self, String *field, Obj *term);
/** If the supplied object is a Query, return it; if it's a query string,
* create a QueryParser and parse it to produce a query against all
http://git-wip-us.apache.org/repos/asf/lucy/blob/f079ab91/core/Lucy/Search/SortRule.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Search/SortRule.c b/core/Lucy/Search/SortRule.c
index b129df7..2d4a653 100644
--- a/core/Lucy/Search/SortRule.c
+++ b/core/Lucy/Search/SortRule.c
@@ -27,13 +27,13 @@ int32_t SortRule_SCORE = 1;
int32_t SortRule_DOC_ID = 2;
SortRule*
-SortRule_new(int32_t type, const String *field, bool reverse) {
+SortRule_new(int32_t type, String *field, bool reverse) {
SortRule *self = (SortRule*)VTable_Make_Obj(SORTRULE);
return SortRule_init(self, type, field, reverse);
}
SortRule*
-SortRule_init(SortRule *self, int32_t type, const String *field,
+SortRule_init(SortRule *self, int32_t type, String *field,
bool reverse) {
SortRuleIVARS *ivars = SortRule_IVARS(self);
ivars->field = field ? Str_Clone(field) : NULL;
http://git-wip-us.apache.org/repos/asf/lucy/blob/f079ab91/core/Lucy/Search/SortRule.cfh
----------------------------------------------------------------------
diff --git a/core/Lucy/Search/SortRule.cfh b/core/Lucy/Search/SortRule.cfh
index 01c119e..cd2eba0 100644
--- a/core/Lucy/Search/SortRule.cfh
+++ b/core/Lucy/Search/SortRule.cfh
@@ -34,7 +34,7 @@ public class Lucy::Search::SortRule inherits Clownfish::Obj {
inert int32_t DOC_ID;
public inert incremented SortRule*
- new(int32_t type = 0, const String *field = NULL,
+ new(int32_t type = 0, String *field = NULL,
bool reverse = false);
/**
@@ -44,7 +44,7 @@ public class Lucy::Search::SortRule inherits Clownfish::Obj {
* @param reverse If true, reverse the order of the sort for this rule.
*/
public inert incremented SortRule*
- init(SortRule *self, int32_t type = 0, const String *field = NULL,
+ init(SortRule *self, int32_t type = 0, String *field = NULL,
bool reverse = false);
/** Accessor for "field" member.
http://git-wip-us.apache.org/repos/asf/lucy/blob/f079ab91/core/Lucy/Search/TermQuery.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Search/TermQuery.c b/core/Lucy/Search/TermQuery.c
index eeae547..913d6a5 100644
--- a/core/Lucy/Search/TermQuery.c
+++ b/core/Lucy/Search/TermQuery.c
@@ -35,13 +35,13 @@
#include "Lucy/Util/Freezer.h"
TermQuery*
-TermQuery_new(const String *field, const Obj *term) {
+TermQuery_new(String *field, const Obj *term) {
TermQuery *self = (TermQuery*)VTable_Make_Obj(TERMQUERY);
return TermQuery_init(self, field, term);
}
TermQuery*
-TermQuery_init(TermQuery *self, const String *field, const Obj *term) {
+TermQuery_init(TermQuery *self, String *field, const Obj *term) {
Query_init((Query*)self, 1.0f);
TermQueryIVARS *const ivars = TermQuery_IVARS(self);
ivars->field = Str_Clone(field);
@@ -284,7 +284,7 @@ TermCompiler_Make_Matcher_IMP(TermCompiler *self, SegReader *reader,
VArray*
TermCompiler_Highlight_Spans_IMP(TermCompiler *self, Searcher *searcher,
- DocVector *doc_vec, const String *field) {
+ DocVector *doc_vec, String *field) {
TermCompilerIVARS *const ivars = TermCompiler_IVARS(self);
TermQueryIVARS *const parent_ivars
http://git-wip-us.apache.org/repos/asf/lucy/blob/f079ab91/core/Lucy/Search/TermQuery.cfh
----------------------------------------------------------------------
diff --git a/core/Lucy/Search/TermQuery.cfh b/core/Lucy/Search/TermQuery.cfh
index a52437d..a59b4c6 100644
--- a/core/Lucy/Search/TermQuery.cfh
+++ b/core/Lucy/Search/TermQuery.cfh
@@ -29,14 +29,14 @@ public class Lucy::Search::TermQuery inherits Lucy::Search::Query {
Obj *term;
inert incremented TermQuery*
- new(const String *field, const Obj *term);
+ new(String *field, const Obj *term);
/**
* @param field Field name.
* @param term Term text.
*/
public inert TermQuery*
- init(TermQuery *self, const String *field, const Obj *term);
+ init(TermQuery *self, String *field, const Obj *term);
/** Accessor for object's <code>field</code> member.
*/
@@ -101,7 +101,7 @@ class Lucy::Search::TermCompiler inherits Lucy::Search::Compiler {
public incremented VArray*
Highlight_Spans(TermCompiler *self, Searcher *searcher,
- DocVector *doc_vec, const String *field);
+ DocVector *doc_vec, String *field);
public bool
Equals(TermCompiler *self, Obj *other);
http://git-wip-us.apache.org/repos/asf/lucy/blob/f079ab91/core/Lucy/Store/CompoundFileReader.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Store/CompoundFileReader.c b/core/Lucy/Store/CompoundFileReader.c
index 79ca64a..e24064d 100644
--- a/core/Lucy/Store/CompoundFileReader.c
+++ b/core/Lucy/Store/CompoundFileReader.c
@@ -124,7 +124,7 @@ CFReader_Get_Real_Folder_IMP(CompoundFileReader *self) {
}
void
-CFReader_Set_Path_IMP(CompoundFileReader *self, const String *path) {
+CFReader_Set_Path_IMP(CompoundFileReader *self, String *path) {
CompoundFileReaderIVARS *const ivars = CFReader_IVARS(self);
Folder_Set_Path(ivars->real_folder, path);
CFReader_Set_Path_t super_set_path
@@ -135,7 +135,7 @@ CFReader_Set_Path_IMP(CompoundFileReader *self, const String *path) {
FileHandle*
CFReader_Local_Open_FileHandle_IMP(CompoundFileReader *self,
- const String *name, uint32_t flags) {
+ String *name, uint32_t flags) {
CompoundFileReaderIVARS *const ivars = CFReader_IVARS(self);
Hash *entry = (Hash*)Hash_Fetch(ivars->records, (Obj*)name);
FileHandle *fh = NULL;
@@ -155,7 +155,7 @@ CFReader_Local_Open_FileHandle_IMP(CompoundFileReader *self,
}
bool
-CFReader_Local_Delete_IMP(CompoundFileReader *self, const String *name) {
+CFReader_Local_Delete_IMP(CompoundFileReader *self, String *name) {
CompoundFileReaderIVARS *const ivars = CFReader_IVARS(self);
Hash *record = (Hash*)Hash_Delete(ivars->records, (Obj*)name);
DECREF(record);
@@ -182,7 +182,7 @@ CFReader_Local_Delete_IMP(CompoundFileReader *self, const String *name) {
}
InStream*
-CFReader_Local_Open_In_IMP(CompoundFileReader *self, const String *name) {
+CFReader_Local_Open_In_IMP(CompoundFileReader *self, String *name) {
CompoundFileReaderIVARS *const ivars = CFReader_IVARS(self);
Hash *entry = (Hash*)Hash_Fetch(ivars->records, (Obj*)name);
@@ -216,7 +216,7 @@ CFReader_Local_Open_In_IMP(CompoundFileReader *self, const String *name) {
}
bool
-CFReader_Local_Exists_IMP(CompoundFileReader *self, const String *name) {
+CFReader_Local_Exists_IMP(CompoundFileReader *self, String *name) {
CompoundFileReaderIVARS *const ivars = CFReader_IVARS(self);
if (Hash_Fetch(ivars->records, (Obj*)name)) { return true; }
if (Folder_Local_Exists(ivars->real_folder, name)) { return true; }
@@ -225,7 +225,7 @@ CFReader_Local_Exists_IMP(CompoundFileReader *self, const String *name) {
bool
CFReader_Local_Is_Directory_IMP(CompoundFileReader *self,
- const String *name) {
+ String *name) {
CompoundFileReaderIVARS *const ivars = CFReader_IVARS(self);
if (Hash_Fetch(ivars->records, (Obj*)name)) { return false; }
if (Folder_Local_Is_Directory(ivars->real_folder, name)) { return true; }
@@ -239,7 +239,7 @@ CFReader_Close_IMP(CompoundFileReader *self) {
}
bool
-CFReader_Local_MkDir_IMP(CompoundFileReader *self, const String *name) {
+CFReader_Local_MkDir_IMP(CompoundFileReader *self, String *name) {
CompoundFileReaderIVARS *const ivars = CFReader_IVARS(self);
if (Hash_Fetch(ivars->records, (Obj*)name)) {
Err_set_error(Err_new(Str_newf("Can't MkDir: '%o' exists", name)));
@@ -254,7 +254,7 @@ CFReader_Local_MkDir_IMP(CompoundFileReader *self, const String *name) {
Folder*
CFReader_Local_Find_Folder_IMP(CompoundFileReader *self,
- const String *name) {
+ String *name) {
CompoundFileReaderIVARS *const ivars = CFReader_IVARS(self);
if (Hash_Fetch(ivars->records, (Obj*)name)) { return false; }
return Folder_Local_Find_Folder(ivars->real_folder, name);
http://git-wip-us.apache.org/repos/asf/lucy/blob/f079ab91/core/Lucy/Store/CompoundFileReader.cfh
----------------------------------------------------------------------
diff --git a/core/Lucy/Store/CompoundFileReader.cfh b/core/Lucy/Store/CompoundFileReader.cfh
index 0876856..e7cafc4 100644
--- a/core/Lucy/Store/CompoundFileReader.cfh
+++ b/core/Lucy/Store/CompoundFileReader.cfh
@@ -52,7 +52,7 @@ class Lucy::Store::CompoundFileReader cnick CFReader
Get_Real_Folder(CompoundFileReader *self);
void
- Set_Path(CompoundFileReader *self, const String *path);
+ Set_Path(CompoundFileReader *self, String *path);
public void
Close(CompoundFileReader *self);
@@ -61,26 +61,26 @@ class Lucy::Store::CompoundFileReader cnick CFReader
Destroy(CompoundFileReader *self);
bool
- Local_Delete(CompoundFileReader *self, const String *name);
+ Local_Delete(CompoundFileReader *self, String *name);
bool
- Local_Exists(CompoundFileReader *self, const String *name);
+ Local_Exists(CompoundFileReader *self, String *name);
bool
- Local_Is_Directory(CompoundFileReader *self, const String *name);
+ Local_Is_Directory(CompoundFileReader *self, String *name);
incremented nullable FileHandle*
- Local_Open_FileHandle(CompoundFileReader *self, const String *name,
+ Local_Open_FileHandle(CompoundFileReader *self, String *name,
uint32_t flags);
incremented nullable InStream*
- Local_Open_In(CompoundFileReader *self, const String *name);
+ Local_Open_In(CompoundFileReader *self, String *name);
bool
- Local_MkDir(CompoundFileReader *self, const String *name);
+ Local_MkDir(CompoundFileReader *self, String *name);
nullable Folder*
- Local_Find_Folder(CompoundFileReader *self, const String *name);
+ Local_Find_Folder(CompoundFileReader *self, String *name);
incremented nullable DirHandle*
Local_Open_Dir(CompoundFileReader *self);
http://git-wip-us.apache.org/repos/asf/lucy/blob/f079ab91/core/Lucy/Store/DirHandle.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Store/DirHandle.c b/core/Lucy/Store/DirHandle.c
index 3a47e34..3271db8 100644
--- a/core/Lucy/Store/DirHandle.c
+++ b/core/Lucy/Store/DirHandle.c
@@ -19,7 +19,7 @@
#include "Lucy/Store/DirHandle.h"
DirHandle*
-DH_init(DirHandle *self, const String *dir) {
+DH_init(DirHandle *self, String *dir) {
DirHandleIVARS *const ivars = DH_IVARS(self);
ivars->dir = Str_Clone(dir);
ivars->entry = NULL;
http://git-wip-us.apache.org/repos/asf/lucy/blob/f079ab91/core/Lucy/Store/DirHandle.cfh
----------------------------------------------------------------------
diff --git a/core/Lucy/Store/DirHandle.cfh b/core/Lucy/Store/DirHandle.cfh
index 341c0aa..436c450 100644
--- a/core/Lucy/Store/DirHandle.cfh
+++ b/core/Lucy/Store/DirHandle.cfh
@@ -29,7 +29,7 @@ abstract class Lucy::Store::DirHandle cnick DH
* @param dir The path to the directory.
*/
inert DirHandle*
- init(DirHandle *self, const String *dir);
+ init(DirHandle *self, String *dir);
/** Proceed to the next entry in the directory.
*
http://git-wip-us.apache.org/repos/asf/lucy/blob/f079ab91/core/Lucy/Store/FSDirHandle.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Store/FSDirHandle.c b/core/Lucy/Store/FSDirHandle.c
index 5f1a23f..506042f 100644
--- a/core/Lucy/Store/FSDirHandle.c
+++ b/core/Lucy/Store/FSDirHandle.c
@@ -31,7 +31,7 @@
#endif
FSDirHandle*
-FSDH_open(const String *dir) {
+FSDH_open(String *dir) {
FSDirHandle *self = (FSDirHandle*)VTable_Make_Obj(FSDIRHANDLE);
return FSDH_do_open(self, dir);
}
@@ -64,7 +64,7 @@ SI_is_updir(const char *name, size_t len) {
#include <windows.h>
FSDirHandle*
-FSDH_do_open(FSDirHandle *self, const String *dir) {
+FSDH_do_open(FSDirHandle *self, String *dir) {
size_t dir_path_size = Str_Get_Size(dir);
const char *dir_path_ptr = Str_Get_Ptr8(dir);
char search_string[MAX_PATH + 1];
@@ -207,7 +207,7 @@ FSDH_Next_IMP(FSDirHandle *self) {
#include <dirent.h>
FSDirHandle*
-FSDH_do_open(FSDirHandle *self, const String *dir) {
+FSDH_do_open(FSDirHandle *self, String *dir) {
DH_init((DirHandle*)self, dir);
FSDirHandleIVARS *const ivars = FSDH_IVARS(self);
ivars->sys_dir_entry = NULL;
http://git-wip-us.apache.org/repos/asf/lucy/blob/f079ab91/core/Lucy/Store/FSDirHandle.cfh
----------------------------------------------------------------------
diff --git a/core/Lucy/Store/FSDirHandle.cfh b/core/Lucy/Store/FSDirHandle.cfh
index dc4a640..e0e2d61 100644
--- a/core/Lucy/Store/FSDirHandle.cfh
+++ b/core/Lucy/Store/FSDirHandle.cfh
@@ -27,10 +27,10 @@ class Lucy::Store::FSDirHandle cnick FSDH
bool delayed_iter;
inert incremented nullable FSDirHandle*
- open(const String *path);
+ open(String *path);
inert nullable FSDirHandle*
- do_open(FSDirHandle *self, const String *path);
+ do_open(FSDirHandle *self, String *path);
bool
Next(FSDirHandle *self);
http://git-wip-us.apache.org/repos/asf/lucy/blob/f079ab91/core/Lucy/Store/FSFileHandle.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Store/FSFileHandle.c b/core/Lucy/Store/FSFileHandle.c
index 1f8b831..a183c65 100644
--- a/core/Lucy/Store/FSFileHandle.c
+++ b/core/Lucy/Store/FSFileHandle.c
@@ -83,13 +83,13 @@ SI_close_win_handles(FSFileHandle *self);
#endif
FSFileHandle*
-FSFH_open(const String *path, uint32_t flags) {
+FSFH_open(String *path, uint32_t flags) {
FSFileHandle *self = (FSFileHandle*)VTable_Make_Obj(FSFILEHANDLE);
return FSFH_do_open(self, path, flags);
}
FSFileHandle*
-FSFH_do_open(FSFileHandle *self, const String *path, uint32_t flags) {
+FSFH_do_open(FSFileHandle *self, String *path, uint32_t flags) {
FH_do_open((FileHandle*)self, path, flags);
FSFileHandleIVARS *const ivars = FSFH_IVARS(self);
if (!path || !Str_Get_Size(path)) {
http://git-wip-us.apache.org/repos/asf/lucy/blob/f079ab91/core/Lucy/Store/FSFileHandle.cfh
----------------------------------------------------------------------
diff --git a/core/Lucy/Store/FSFileHandle.cfh b/core/Lucy/Store/FSFileHandle.cfh
index 1507fff..cbe6a7d 100644
--- a/core/Lucy/Store/FSFileHandle.cfh
+++ b/core/Lucy/Store/FSFileHandle.cfh
@@ -35,10 +35,10 @@ class Lucy::Store::FSFileHandle cnick FSFH
* @param flags FileHandle constructor flags.
*/
inert incremented nullable FSFileHandle*
- open(const String *path = NULL, uint32_t flags);
+ open(String *path = NULL, uint32_t flags);
inert nullable FSFileHandle*
- do_open(FSFileHandle *self, const String *path = NULL, uint32_t flags);
+ do_open(FSFileHandle *self, String *path = NULL, uint32_t flags);
bool
Window(FSFileHandle *self, FileWindow *window, int64_t offset, int64_t len);
http://git-wip-us.apache.org/repos/asf/lucy/blob/f079ab91/core/Lucy/Store/FSFolder.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Store/FSFolder.c b/core/Lucy/Store/FSFolder.c
index b37fe6b..7a535d8 100644
--- a/core/Lucy/Store/FSFolder.c
+++ b/core/Lucy/Store/FSFolder.c
@@ -48,44 +48,44 @@
// Return a String containing a platform-specific absolute filepath.
static String*
-S_fullpath(FSFolder *self, const String *path);
+S_fullpath(FSFolder *self, String *path);
// Return a String containing a platform-specific absolute filepath.
static char*
-S_fullpath_ptr(FSFolder *self, const String *path);
+S_fullpath_ptr(FSFolder *self, String *path);
// Return true if the supplied path is a directory.
static bool
-S_dir_ok(const String *path);
+S_dir_ok(String *path);
// Create a directory, or set Err_error and return false.
static bool
-S_create_dir(const String *path);
+S_create_dir(String *path);
// Return true unless the supplied path contains a slash.
static bool
-S_is_local_entry(const String *path);
+S_is_local_entry(String *path);
// Return true if the supplied path is absolute.
static bool
-S_is_absolute(const String *path);
+S_is_absolute(String *path);
// Transform a possibly relative path into an absolute path.
static String*
-S_absolutify(const String *path);
+S_absolutify(String *path);
// Create a hard link.
static bool
S_hard_link(char *from_path, char *to_path);
FSFolder*
-FSFolder_new(const String *path) {
+FSFolder_new(String *path) {
FSFolder *self = (FSFolder*)VTable_Make_Obj(FSFOLDER);
return FSFolder_init(self, path);
}
FSFolder*
-FSFolder_init(FSFolder *self, const String *path) {
+FSFolder_init(FSFolder *self, String *path) {
String *abs_path = S_absolutify(path);
Folder_init((Folder*)self, abs_path);
DECREF(abs_path);
@@ -109,7 +109,7 @@ FSFolder_Check_IMP(FSFolder *self) {
}
FileHandle*
-FSFolder_Local_Open_FileHandle_IMP(FSFolder *self, const String *name,
+FSFolder_Local_Open_FileHandle_IMP(FSFolder *self, String *name,
uint32_t flags) {
String *fullpath = S_fullpath(self, name);
FSFileHandle *fh = FSFH_open(fullpath, flags);
@@ -119,7 +119,7 @@ FSFolder_Local_Open_FileHandle_IMP(FSFolder *self, const String *name,
}
bool
-FSFolder_Local_MkDir_IMP(FSFolder *self, const String *name) {
+FSFolder_Local_MkDir_IMP(FSFolder *self, String *name) {
String *dir = S_fullpath(self, name);
bool result = S_create_dir(dir);
if (!result) { ERR_ADD_FRAME(Err_get_error()); }
@@ -136,7 +136,7 @@ FSFolder_Local_Open_Dir_IMP(FSFolder *self) {
}
bool
-FSFolder_Local_Exists_IMP(FSFolder *self, const String *name) {
+FSFolder_Local_Exists_IMP(FSFolder *self, String *name) {
FSFolderIVARS *const ivars = FSFolder_IVARS(self);
if (Hash_Fetch(ivars->entries, (Obj*)name)) {
return true;
@@ -157,7 +157,7 @@ FSFolder_Local_Exists_IMP(FSFolder *self, const String *name) {
}
bool
-FSFolder_Local_Is_Directory_IMP(FSFolder *self, const String *name) {
+FSFolder_Local_Is_Directory_IMP(FSFolder *self, String *name) {
FSFolderIVARS *const ivars = FSFolder_IVARS(self);
// Check for a cached object, then fall back to a system call.
@@ -174,7 +174,7 @@ FSFolder_Local_Is_Directory_IMP(FSFolder *self, const String *name) {
}
bool
-FSFolder_Rename_IMP(FSFolder *self, const String* from, const String *to) {
+FSFolder_Rename_IMP(FSFolder *self, String* from, String *to) {
char *from_path = S_fullpath_ptr(self, from);
char *to_path = S_fullpath_ptr(self, to);
bool retval = !rename(from_path, to_path);
@@ -188,8 +188,8 @@ FSFolder_Rename_IMP(FSFolder *self, const String* from, const String *to) {
}
bool
-FSFolder_Hard_Link_IMP(FSFolder *self, const String *from,
- const String *to) {
+FSFolder_Hard_Link_IMP(FSFolder *self, String *from,
+ String *to) {
char *from_path_ptr = S_fullpath_ptr(self, from);
char *to_path_ptr = S_fullpath_ptr(self, to);
bool retval = S_hard_link(from_path_ptr, to_path_ptr);
@@ -199,7 +199,7 @@ FSFolder_Hard_Link_IMP(FSFolder *self, const String *from,
}
bool
-FSFolder_Local_Delete_IMP(FSFolder *self, const String *name) {
+FSFolder_Local_Delete_IMP(FSFolder *self, String *name) {
FSFolderIVARS *const ivars = FSFolder_IVARS(self);
char *path_ptr = S_fullpath_ptr(self, name);
@@ -220,7 +220,7 @@ FSFolder_Close_IMP(FSFolder *self) {
}
Folder*
-FSFolder_Local_Find_Folder_IMP(FSFolder *self, const String *name) {
+FSFolder_Local_Find_Folder_IMP(FSFolder *self, String *name) {
FSFolderIVARS *const ivars = FSFolder_IVARS(self);
Folder *subfolder = NULL;
@@ -269,7 +269,7 @@ FSFolder_Local_Find_Folder_IMP(FSFolder *self, const String *name) {
}
static String*
-S_fullpath(FSFolder *self, const String *path) {
+S_fullpath(FSFolder *self, String *path) {
FSFolderIVARS *const ivars = FSFolder_IVARS(self);
String *fullpath = Str_newf("%o%s%o", ivars->path, DIR_SEP, path);
String *retval;
@@ -284,7 +284,7 @@ S_fullpath(FSFolder *self, const String *path) {
}
static char*
-S_fullpath_ptr(FSFolder *self, const String *path) {
+S_fullpath_ptr(FSFolder *self, String *path) {
FSFolderIVARS *const ivars = FSFolder_IVARS(self);
size_t folder_size = Str_Get_Size(ivars->path);
size_t path_size = Str_Get_Size(path);
@@ -308,7 +308,7 @@ S_fullpath_ptr(FSFolder *self, const String *path) {
}
static bool
-S_dir_ok(const String *path) {
+S_dir_ok(String *path) {
bool retval = false;
char *path_ptr = Str_To_Utf8(path);
struct stat stat_buf;
@@ -320,7 +320,7 @@ S_dir_ok(const String *path) {
}
static bool
-S_create_dir(const String *path) {
+S_create_dir(String *path) {
bool retval = true;
char *path_ptr = Str_To_Utf8(path);
if (-1 == chy_makedir(path_ptr, 0777)) {
@@ -333,7 +333,7 @@ S_create_dir(const String *path) {
}
static bool
-S_is_local_entry(const String *path) {
+S_is_local_entry(String *path) {
return Str_Find_Utf8(path, "/", 1) == -1;
}
@@ -349,7 +349,7 @@ S_is_local_entry(const String *path) {
#include <windows.h>
static bool
-S_is_absolute(const String *path) {
+S_is_absolute(String *path) {
int32_t code_point = Str_Code_Point_At(path, 0);
if (isalpha(code_point)) {
@@ -362,7 +362,7 @@ S_is_absolute(const String *path) {
}
static String*
-S_absolutify(const String *path) {
+S_absolutify(String *path) {
if (S_is_absolute(path)) { return Str_Clone(path); }
DWORD cwd_len = GetCurrentDirectory(0, NULL);
@@ -394,12 +394,12 @@ S_hard_link(char *from8, char *to8) {
#elif (defined(CHY_HAS_UNISTD_H))
static bool
-S_is_absolute(const String *path) {
+S_is_absolute(String *path) {
return Str_Starts_With_Utf8(path, DIR_SEP, 1);
}
static String*
-S_absolutify(const String *path) {
+S_absolutify(String *path) {
if (S_is_absolute(path)) { return Str_Clone(path); }
char *cwd = getcwd(NULL, 0);
http://git-wip-us.apache.org/repos/asf/lucy/blob/f079ab91/core/Lucy/Store/FSFolder.cfh
----------------------------------------------------------------------
diff --git a/core/Lucy/Store/FSFolder.cfh b/core/Lucy/Store/FSFolder.cfh
index c806aac..b4a7428 100644
--- a/core/Lucy/Store/FSFolder.cfh
+++ b/core/Lucy/Store/FSFolder.cfh
@@ -25,7 +25,7 @@ parcel Lucy;
public class Lucy::Store::FSFolder inherits Lucy::Store::Folder {
inert incremented FSFolder*
- new(const String *path);
+ new(String *path);
/**
* @param path Location of the index. If the specified directory does
@@ -34,7 +34,7 @@ public class Lucy::Store::FSFolder inherits Lucy::Store::Folder {
* be necessary to create the directory yourself.
*/
public inert FSFolder*
- init(FSFolder *self, const String *path);
+ init(FSFolder *self, String *path);
/** Attempt to create the directory specified by <code>path</code>.
*/
@@ -51,32 +51,32 @@ public class Lucy::Store::FSFolder inherits Lucy::Store::Folder {
Close(FSFolder *self);
incremented nullable FileHandle*
- Local_Open_FileHandle(FSFolder *self, const String *name,
+ Local_Open_FileHandle(FSFolder *self, String *name,
uint32_t flags);
incremented nullable DirHandle*
Local_Open_Dir(FSFolder *self);
bool
- Local_MkDir(FSFolder *self, const String *name);
+ Local_MkDir(FSFolder *self, String *name);
bool
- Local_Exists(FSFolder *self, const String *name);
+ Local_Exists(FSFolder *self, String *name);
bool
- Local_Is_Directory(FSFolder *self, const String *name);
+ Local_Is_Directory(FSFolder *self, String *name);
nullable Folder*
- Local_Find_Folder(FSFolder *self, const String *name);
+ Local_Find_Folder(FSFolder *self, String *name);
bool
- Local_Delete(FSFolder *self, const String *name);
+ Local_Delete(FSFolder *self, String *name);
public bool
- Rename(FSFolder *self, const String* from, const String *to);
+ Rename(FSFolder *self, String* from, String *to);
public bool
- Hard_Link(FSFolder *self, const String *from, const String *to);
+ Hard_Link(FSFolder *self, String *from, String *to);
}
http://git-wip-us.apache.org/repos/asf/lucy/blob/f079ab91/core/Lucy/Store/FileHandle.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Store/FileHandle.c b/core/Lucy/Store/FileHandle.c
index afb8035..97618d5 100644
--- a/core/Lucy/Store/FileHandle.c
+++ b/core/Lucy/Store/FileHandle.c
@@ -22,7 +22,7 @@
int32_t FH_object_count = 0;
FileHandle*
-FH_do_open(FileHandle *self, const String *path, uint32_t flags) {
+FH_do_open(FileHandle *self, String *path, uint32_t flags) {
FileHandleIVARS *const ivars = FH_IVARS(self);
ivars->path = path ? Str_Clone(path) : Str_new_from_trusted_utf8("", 0);
ivars->flags = flags;
@@ -53,7 +53,7 @@ FH_Grow_IMP(FileHandle *self, int64_t length) {
}
void
-FH_Set_Path_IMP(FileHandle *self, const String *path) {
+FH_Set_Path_IMP(FileHandle *self, String *path) {
FileHandleIVARS *const ivars = FH_IVARS(self);
DECREF(ivars->path);
ivars->path = Str_Clone(path);
http://git-wip-us.apache.org/repos/asf/lucy/blob/f079ab91/core/Lucy/Store/FileHandle.cfh
----------------------------------------------------------------------
diff --git a/core/Lucy/Store/FileHandle.cfh b/core/Lucy/Store/FileHandle.cfh
index 75f849a..01b3691 100644
--- a/core/Lucy/Store/FileHandle.cfh
+++ b/core/Lucy/Store/FileHandle.cfh
@@ -52,7 +52,7 @@ abstract class Lucy::Store::FileHandle cnick FH
* behaviors.
*/
inert nullable FileHandle*
- do_open(FileHandle *self, const String *path = NULL, uint32_t flags);
+ do_open(FileHandle *self, String *path = NULL, uint32_t flags);
/** Ensure that the FileWindow's buffer provides access to file data for
* <code>len</code> bytes starting at <code>offset</code>.
@@ -118,7 +118,7 @@ abstract class Lucy::Store::FileHandle cnick FH
/** Set the object's <code>path</code> attribute.
*/
void
- Set_Path(FileHandle *self, const String *path);
+ Set_Path(FileHandle *self, String *path);
/** Return the object's <code>path</code> attribute.
*/
http://git-wip-us.apache.org/repos/asf/lucy/blob/f079ab91/core/Lucy/Store/Folder.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Store/Folder.c b/core/Lucy/Store/Folder.c
index 935c794..86776a8 100644
--- a/core/Lucy/Store/Folder.c
+++ b/core/Lucy/Store/Folder.c
@@ -29,7 +29,7 @@
#include "Lucy/Util/IndexFileNames.h"
Folder*
-Folder_init(Folder *self, const String *path) {
+Folder_init(Folder *self, String *path) {
FolderIVARS *const ivars = Folder_IVARS(self);
// Init.
@@ -62,7 +62,7 @@ Folder_Destroy_IMP(Folder *self) {
}
InStream*
-Folder_Open_In_IMP(Folder *self, const String *path) {
+Folder_Open_In_IMP(Folder *self, String *path) {
Folder *enclosing_folder = Folder_Enclosing_Folder(self, path);
InStream *instream = NULL;
@@ -85,7 +85,7 @@ Folder_Open_In_IMP(Folder *self, const String *path) {
* necessary because calling CFReader_Local_Open_FileHandle() won't find
* virtual files. No other class should need to override it. */
InStream*
-Folder_Local_Open_In_IMP(Folder *self, const String *name) {
+Folder_Local_Open_In_IMP(Folder *self, String *name) {
FileHandle *fh = Folder_Local_Open_FileHandle(self, name, FH_READ_ONLY);
InStream *instream = NULL;
if (fh) {
@@ -102,7 +102,7 @@ Folder_Local_Open_In_IMP(Folder *self, const String *name) {
}
OutStream*
-Folder_Open_Out_IMP(Folder *self, const String *path) {
+Folder_Open_Out_IMP(Folder *self, String *path) {
const uint32_t flags = FH_WRITE_ONLY | FH_CREATE | FH_EXCLUSIVE;
FileHandle *fh = Folder_Open_FileHandle(self, path, flags);
OutStream *outstream = NULL;
@@ -120,7 +120,7 @@ Folder_Open_Out_IMP(Folder *self, const String *path) {
}
FileHandle*
-Folder_Open_FileHandle_IMP(Folder *self, const String *path,
+Folder_Open_FileHandle_IMP(Folder *self, String *path,
uint32_t flags) {
Folder *enclosing_folder = Folder_Enclosing_Folder(self, path);
FileHandle *fh = NULL;
@@ -141,7 +141,7 @@ Folder_Open_FileHandle_IMP(Folder *self, const String *path,
}
bool
-Folder_Delete_IMP(Folder *self, const String *path) {
+Folder_Delete_IMP(Folder *self, String *path) {
Folder *enclosing_folder = Folder_Enclosing_Folder(self, path);
if (enclosing_folder) {
String *name = IxFileNames_local_part(path);
@@ -155,7 +155,7 @@ Folder_Delete_IMP(Folder *self, const String *path) {
}
bool
-Folder_Delete_Tree_IMP(Folder *self, const String *path) {
+Folder_Delete_Tree_IMP(Folder *self, String *path) {
Folder *enclosing_folder = Folder_Enclosing_Folder(self, path);
// Don't allow Folder to delete itself.
@@ -219,7 +219,7 @@ S_is_updir(String *path) {
static void
S_add_to_file_list(Folder *self, VArray *list, String *dir,
- const String *path) {
+ String *path) {
DirHandle *dh = Folder_Open_Dir(self, dir);
if (!dh) {
@@ -255,7 +255,7 @@ S_add_to_file_list(Folder *self, VArray *list, String *dir,
}
DirHandle*
-Folder_Open_Dir_IMP(Folder *self, const String *path) {
+Folder_Open_Dir_IMP(Folder *self, String *path) {
DirHandle *dh = NULL;
Folder *folder;
if (path) {
@@ -278,7 +278,7 @@ Folder_Open_Dir_IMP(Folder *self, const String *path) {
}
bool
-Folder_MkDir_IMP(Folder *self, const String *path) {
+Folder_MkDir_IMP(Folder *self, String *path) {
Folder *enclosing_folder = Folder_Enclosing_Folder(self, path);
bool result = false;
@@ -302,7 +302,7 @@ Folder_MkDir_IMP(Folder *self, const String *path) {
}
bool
-Folder_Exists_IMP(Folder *self, const String *path) {
+Folder_Exists_IMP(Folder *self, String *path) {
Folder *enclosing_folder = Folder_Enclosing_Folder(self, path);
bool retval = false;
if (enclosing_folder) {
@@ -316,7 +316,7 @@ Folder_Exists_IMP(Folder *self, const String *path) {
}
bool
-Folder_Is_Directory_IMP(Folder *self, const String *path) {
+Folder_Is_Directory_IMP(Folder *self, String *path) {
Folder *enclosing_folder = Folder_Enclosing_Folder(self, path);
bool retval = false;
if (enclosing_folder) {
@@ -330,7 +330,7 @@ Folder_Is_Directory_IMP(Folder *self, const String *path) {
}
VArray*
-Folder_List_IMP(Folder *self, const String *path) {
+Folder_List_IMP(Folder *self, String *path) {
Folder *local_folder = Folder_Find_Folder(self, path);
VArray *list = NULL;
DirHandle *dh = Folder_Local_Open_Dir(local_folder);
@@ -350,7 +350,7 @@ Folder_List_IMP(Folder *self, const String *path) {
}
VArray*
-Folder_List_R_IMP(Folder *self, const String *path) {
+Folder_List_R_IMP(Folder *self, String *path) {
Folder *local_folder = Folder_Find_Folder(self, path);
VArray *list = VA_new(0);
if (local_folder) {
@@ -362,7 +362,7 @@ Folder_List_R_IMP(Folder *self, const String *path) {
}
ByteBuf*
-Folder_Slurp_File_IMP(Folder *self, const String *path) {
+Folder_Slurp_File_IMP(Folder *self, String *path) {
InStream *instream = Folder_Open_In(self, path);
ByteBuf *retval = NULL;
@@ -398,14 +398,14 @@ Folder_Get_Path_IMP(Folder *self) {
}
void
-Folder_Set_Path_IMP(Folder *self, const String *path) {
+Folder_Set_Path_IMP(Folder *self, String *path) {
FolderIVARS *const ivars = Folder_IVARS(self);
DECREF(ivars->path);
ivars->path = Str_Clone(path);
}
void
-Folder_Consolidate_IMP(Folder *self, const String *path) {
+Folder_Consolidate_IMP(Folder *self, String *path) {
Folder *folder = Folder_Find_Folder(self, path);
Folder *enclosing_folder = Folder_Enclosing_Folder(self, path);
if (!folder) {
@@ -465,7 +465,7 @@ S_enclosing_folder(Folder *self, StringIterator *path) {
}
Folder*
-Folder_Enclosing_Folder_IMP(Folder *self, const String *path) {
+Folder_Enclosing_Folder_IMP(Folder *self, String *path) {
StringIterator *iter = Str_Top(path);
Folder *folder = S_enclosing_folder(self, iter);
DECREF(iter);
@@ -473,7 +473,7 @@ Folder_Enclosing_Folder_IMP(Folder *self, const String *path) {
}
Folder*
-Folder_Find_Folder_IMP(Folder *self, const String *path) {
+Folder_Find_Folder_IMP(Folder *self, String *path) {
if (!path || !Str_Get_Size(path)) {
return self;
}