lucy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nwelln...@apache.org
Subject [lucy-commits] [36/50] [abbrv] Convert "const String" to "String"
Date Fri, 11 Oct 2013 13:32:14 GMT
http://git-wip-us.apache.org/repos/asf/lucy/blob/f079ab91/core/Lucy/Store/Folder.cfh
----------------------------------------------------------------------
diff --git a/core/Lucy/Store/Folder.cfh b/core/Lucy/Store/Folder.cfh
index dbb1b4e..dafa984 100644
--- a/core/Lucy/Store/Folder.cfh
+++ b/core/Lucy/Store/Folder.cfh
@@ -32,7 +32,7 @@ public abstract class Lucy::Store::Folder inherits Clownfish::Obj {
     Hash   *entries;
 
     public inert nullable Folder*
-    init(Folder *self, const String *path);
+    init(Folder *self, String *path);
 
     public void
     Destroy(Folder *self);
@@ -45,7 +45,7 @@ public abstract class Lucy::Store::Folder inherits Clownfish::Obj {
     /** Setter for <code>path</code> member var.
      */
     void
-    Set_Path(Folder *self, const String *path);
+    Set_Path(Folder *self, String *path);
 
     /** Open an OutStream, or set Err_error and return NULL on failure.
      *
@@ -53,7 +53,7 @@ public abstract class Lucy::Store::Folder inherits Clownfish::Obj {
      * @return an OutStream.
      */
     public incremented nullable OutStream*
-    Open_Out(Folder *self,  const String *path);
+    Open_Out(Folder *self,  String *path);
 
     /** Open an InStream, or set Err_error and return NULL on failure.
      *
@@ -61,7 +61,7 @@ public abstract class Lucy::Store::Folder inherits Clownfish::Obj {
      * @return an InStream.
      */
     public incremented nullable InStream*
-    Open_In(Folder *self, const String *path);
+    Open_In(Folder *self, String *path);
 
     /** Open a FileHandle, or set Err_error and return NULL on failure.
      *
@@ -70,7 +70,7 @@ public abstract class Lucy::Store::Folder inherits Clownfish::Obj {
      * @return a FileHandle.
      */
     public incremented nullable FileHandle*
-    Open_FileHandle(Folder *self, const String *path, uint32_t flags);
+    Open_FileHandle(Folder *self, String *path, uint32_t flags);
 
     /** Open a DirHandle or set Err_error and return NULL on failure.
      *
@@ -79,7 +79,7 @@ public abstract class Lucy::Store::Folder inherits Clownfish::Obj {
      * @return a DirHandle.
      */
     public incremented nullable DirHandle*
-    Open_Dir(Folder *self, const String *path = NULL);
+    Open_Dir(Folder *self, String *path = NULL);
 
     /** Create a subdirectory.
      *
@@ -87,7 +87,7 @@ public abstract class Lucy::Store::Folder inherits Clownfish::Obj {
      * @return true on success, false on failure (sets Err_error).
      */
     public bool
-    MkDir(Folder *self, const String *path);
+    MkDir(Folder *self, String *path);
 
     /** List all local entries within a directory.  Set Err_error and return
      * NULL if something goes wrong.
@@ -96,7 +96,7 @@ public abstract class Lucy::Store::Folder inherits Clownfish::Obj {
      * @return an unsorted array of filenames.
      */
     incremented VArray*
-    List(Folder *self, const String *path = NULL);
+    List(Folder *self, String *path = NULL);
 
     /** Recursively list all files and directories in the Folder.
      *
@@ -104,7 +104,7 @@ public abstract class Lucy::Store::Folder inherits Clownfish::Obj {
      * @return an unsorted array of relative filepaths.
      */
     incremented VArray*
-    List_R(Folder *self, const String *path = NULL);
+    List_R(Folder *self, String *path = NULL);
 
     /** Indicate whether an entity exists at <code>path</code>.
      *
@@ -112,7 +112,7 @@ public abstract class Lucy::Store::Folder inherits Clownfish::Obj {
      * @return true if <code>path</code> exists.
      */
     public bool
-    Exists(Folder *self, const String *path);
+    Exists(Folder *self, String *path);
 
     /** Indicate whether a directory exists at <code>path</code>.
      *
@@ -120,7 +120,7 @@ public abstract class Lucy::Store::Folder inherits Clownfish::Obj {
      * @return true if <code>path</code> is a directory.
      */
     bool
-    Is_Directory(Folder *self, const String *path);
+    Is_Directory(Folder *self, String *path);
 
     /** Delete an entry from the folder.
      *
@@ -128,7 +128,7 @@ public abstract class Lucy::Store::Folder inherits Clownfish::Obj {
      * @return true if the deletion was successful.
      */
     public bool
-    Delete(Folder *self, const String *path);
+    Delete(Folder *self, String *path);
 
     /** Delete recursively, starting at <code>path</code>
      *
@@ -137,7 +137,7 @@ public abstract class Lucy::Store::Folder inherits Clownfish::Obj {
      * part remains.
      */
     public bool
-    Delete_Tree(Folder *self, const String *path);
+    Delete_Tree(Folder *self, String *path);
 
     /** Rename a file or directory, or set Err_error and return false on
      * failure.  If an entry exists at <code>to</code>, the results are
@@ -148,7 +148,7 @@ public abstract class Lucy::Store::Folder inherits Clownfish::Obj {
      * @return true on success, false on failure.
      */
     public abstract bool
-    Rename(Folder *self, const String *from, const String *to);
+    Rename(Folder *self, String *from, String *to);
 
     /** Create a hard link at path <code>to</code> pointing at the existing
      * file <code>from</code>, or set Err_error and return false on failure.
@@ -156,7 +156,7 @@ public abstract class Lucy::Store::Folder inherits Clownfish::Obj {
      * @return true on success, false on failure.
      */
     public abstract bool
-    Hard_Link(Folder *self, const String *from, const String *to);
+    Hard_Link(Folder *self, String *from, String *to);
 
     /** Read a file and return its contents.
      *
@@ -164,12 +164,12 @@ public abstract class Lucy::Store::Folder inherits Clownfish::Obj {
      * @param return the file's contents.
      */
     public incremented ByteBuf*
-    Slurp_File(Folder *self, const String *path);
+    Slurp_File(Folder *self, String *path);
 
     /** Collapse the contents of the directory into a compound file.
      */
     void
-    Consolidate(Folder *self, const String *path);
+    Consolidate(Folder *self, String *path);
 
     /** Given a filepath, return the Folder representing everything except
      * the last component.  E.g. the 'foo/bar' Folder for '/foo/bar/baz.txt',
@@ -179,7 +179,7 @@ public abstract class Lucy::Store::Folder inherits Clownfish::Obj {
      * either doesn't exist or isn't a directory, return NULL.
      */
     nullable Folder*
-    Enclosing_Folder(Folder *self, const String *path);
+    Enclosing_Folder(Folder *self, String *path);
 
     /** Return the Folder at the subdirectory specified by <code>path</code>.
      * If <code>path</code> is NULL or an empty string, return this Folder.
@@ -190,7 +190,7 @@ public abstract class Lucy::Store::Folder inherits Clownfish::Obj {
      * @return A Folder.
      */
     nullable Folder*
-    Find_Folder(Folder *self, const String *path);
+    Find_Folder(Folder *self, String *path);
 
     /** Perform implementation-specific initialization.  For example: FSFolder
      * creates its own directory.
@@ -214,13 +214,13 @@ public abstract class Lucy::Store::Folder inherits Clownfish::Obj {
      * on failure.
      */
     abstract incremented nullable FileHandle*
-    Local_Open_FileHandle(Folder *self, const String *name, uint32_t flags);
+    Local_Open_FileHandle(Folder *self, String *name, uint32_t flags);
 
     /** Open an InStream for a local file, or set Err_error and return NULL on
      * failure.
      */
     incremented nullable InStream*
-    Local_Open_In(Folder *self, const String *name);
+    Local_Open_In(Folder *self, String *name);
 
     /** Open a DirHandle to iterate over the local entries in this Folder, or
      * set Err_error and return NULL on failure.
@@ -234,7 +234,7 @@ public abstract class Lucy::Store::Folder inherits Clownfish::Obj {
      * @return true on success, false on failure (sets Err_error)
      */
     abstract bool
-    Local_MkDir(Folder *self, const String *name);
+    Local_MkDir(Folder *self, String *name);
 
     /** Indicate whether a local entry exists for the supplied
      * <code>name</code>.
@@ -242,7 +242,7 @@ public abstract class Lucy::Store::Folder inherits Clownfish::Obj {
      * @param name The name of the local entry.
      */
     abstract bool
-    Local_Exists(Folder *self, const String *name);
+    Local_Exists(Folder *self, String *name);
 
     /** Indicate whether a local subdirectory exists with the supplied
      * <code>name</code>.
@@ -250,7 +250,7 @@ public abstract class Lucy::Store::Folder inherits Clownfish::Obj {
      * @param name The name of the local subdirectory.
      */
     abstract bool
-    Local_Is_Directory(Folder *self, const String *name);
+    Local_Is_Directory(Folder *self, String *name);
 
     /** Return the Folder object representing the specified directory, if such
      * a directory exists.
@@ -259,7 +259,7 @@ public abstract class Lucy::Store::Folder inherits Clownfish::Obj {
      * @return a Folder.
      */
     abstract nullable Folder*
-    Local_Find_Folder(Folder *self, const String *name);
+    Local_Find_Folder(Folder *self, String *name);
 
     /** Delete a local entry.
      *
@@ -267,7 +267,7 @@ public abstract class Lucy::Store::Folder inherits Clownfish::Obj {
      * @return true if the deletion was successful.
      */
     abstract bool
-    Local_Delete(Folder *self, const String *name);
+    Local_Delete(Folder *self, String *name);
 }
 
 

http://git-wip-us.apache.org/repos/asf/lucy/blob/f079ab91/core/Lucy/Store/InStream.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Store/InStream.c b/core/Lucy/Store/InStream.c
index d68efa4..885e576 100644
--- a/core/Lucy/Store/InStream.c
+++ b/core/Lucy/Store/InStream.c
@@ -122,7 +122,7 @@ InStream_Destroy_IMP(InStream *self) {
 }
 
 InStream*
-InStream_Reopen_IMP(InStream *self, const String *filename, int64_t offset,
+InStream_Reopen_IMP(InStream *self, String *filename, int64_t offset,
                     int64_t len) {
     InStreamIVARS *const ivars = InStream_IVARS(self);
     if (!ivars->file_handle) {

http://git-wip-us.apache.org/repos/asf/lucy/blob/f079ab91/core/Lucy/Store/InStream.cfh
----------------------------------------------------------------------
diff --git a/core/Lucy/Store/InStream.cfh b/core/Lucy/Store/InStream.cfh
index 9fbb19b..88a099f 100644
--- a/core/Lucy/Store/InStream.cfh
+++ b/core/Lucy/Store/InStream.cfh
@@ -62,7 +62,7 @@ class Lucy::Store::InStream inherits Clownfish::Obj {
      * @param len Length of the file as seen by the new InStream.
      */
     incremented InStream*
-    Reopen(InStream *self, const String *filename = NULL, int64_t offset,
+    Reopen(InStream *self, String *filename = NULL, int64_t offset,
            int64_t len);
 
     /** Clone the InStream.  Clones share the same underlying FileHandle and

http://git-wip-us.apache.org/repos/asf/lucy/blob/f079ab91/core/Lucy/Store/Lock.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Store/Lock.c b/core/Lucy/Store/Lock.c
index e95fa5f..f252f8f 100644
--- a/core/Lucy/Store/Lock.c
+++ b/core/Lucy/Store/Lock.c
@@ -30,8 +30,8 @@
 #include "Lucy/Util/Sleep.h"
 
 Lock*
-Lock_init(Lock *self, Folder *folder, const String *name,
-          const String *host, int32_t timeout, int32_t interval) {
+Lock_init(Lock *self, Folder *folder, String *name,
+          String *host, int32_t timeout, int32_t interval) {
     LockIVARS *const ivars = Lock_IVARS(self);
 
     // Validate.
@@ -112,15 +112,15 @@ Lock_Obtain_IMP(Lock *self) {
 /***************************************************************************/
 
 LockFileLock*
-LFLock_new(Folder *folder, const String *name, const String *host,
+LFLock_new(Folder *folder, String *name, String *host,
            int32_t timeout, int32_t interval) {
     LockFileLock *self = (LockFileLock*)VTable_Make_Obj(LOCKFILELOCK);
     return LFLock_init(self, folder, name, host, timeout, interval);
 }
 
 LockFileLock*
-LFLock_init(LockFileLock *self, Folder *folder, const String *name,
-            const String *host, int32_t timeout, int32_t interval) {
+LFLock_init(LockFileLock *self, Folder *folder, String *name,
+            String *host, int32_t timeout, int32_t interval) {
     int pid = PID_getpid();
     Lock_init((Lock*)self, folder, name, host, timeout, interval);
     LockFileLockIVARS *const ivars = LFLock_IVARS(self);
@@ -226,7 +226,7 @@ LFLock_Clear_Stale_IMP(LockFileLock *self) {
 }
 
 bool
-LFLock_Maybe_Delete_File_IMP(LockFileLock *self, const String *path,
+LFLock_Maybe_Delete_File_IMP(LockFileLock *self, String *path,
                              bool delete_mine, bool delete_other) {
     LockFileLockIVARS *const ivars = LFLock_IVARS(self);
     Folder *folder  = ivars->folder;

http://git-wip-us.apache.org/repos/asf/lucy/blob/f079ab91/core/Lucy/Store/Lock.cfh
----------------------------------------------------------------------
diff --git a/core/Lucy/Store/Lock.cfh b/core/Lucy/Store/Lock.cfh
index d18d083..08dc94b 100644
--- a/core/Lucy/Store/Lock.cfh
+++ b/core/Lucy/Store/Lock.cfh
@@ -47,8 +47,8 @@ public abstract class Lucy::Store::Lock inherits Clownfish::Obj {
      * @param interval Time in milliseconds between retries.
      */
     public inert Lock*
-    init(Lock *self, Folder *folder, const String *name,
-         const String *host, int32_t timeout = 0, int32_t interval = 100);
+    init(Lock *self, Folder *folder, String *name,
+         String *host, int32_t timeout = 0, int32_t interval = 100);
 
     /** Returns true if the Lock is shared, false if the Lock is exclusive.
      */
@@ -116,12 +116,12 @@ class Lucy::Store::LockFileLock cnick LFLock
     String *link_path;
 
     inert incremented LockFileLock*
-    new(Folder *folder, const String *name, const String *host,
+    new(Folder *folder, String *name, String *host,
         int32_t timeout = 0, int32_t interval = 100);
 
     public inert LockFileLock*
-    init(LockFileLock *self, Folder *folder, const String *name,
-         const String *host, int32_t timeout = 0, int32_t interval = 100);
+    init(LockFileLock *self, Folder *folder, String *name,
+         String *host, int32_t timeout = 0, int32_t interval = 100);
 
     public bool
     Shared(LockFileLock *self);
@@ -148,7 +148,7 @@ class Lucy::Store::LockFileLock cnick LFLock
      * don't match this process's pid.
      */
     bool
-    Maybe_Delete_File(LockFileLock *self, const String *filepath,
+    Maybe_Delete_File(LockFileLock *self, String *filepath,
                       bool delete_mine, bool delete_other);
 
     public void

http://git-wip-us.apache.org/repos/asf/lucy/blob/f079ab91/core/Lucy/Store/LockFactory.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Store/LockFactory.c b/core/Lucy/Store/LockFactory.c
index f485654..dee3d20 100644
--- a/core/Lucy/Store/LockFactory.c
+++ b/core/Lucy/Store/LockFactory.c
@@ -27,13 +27,13 @@
 #include "Lucy/Store/SharedLock.h"
 
 LockFactory*
-LockFact_new(Folder *folder, const String *host) {
+LockFact_new(Folder *folder, String *host) {
     LockFactory *self = (LockFactory*)VTable_Make_Obj(LOCKFACTORY);
     return LockFact_init(self, folder, host);
 }
 
 LockFactory*
-LockFact_init(LockFactory *self, Folder *folder, const String *host) {
+LockFact_init(LockFactory *self, Folder *folder, String *host) {
     LockFactoryIVARS *const ivars = LockFact_IVARS(self);
     ivars->folder    = (Folder*)INCREF(folder);
     ivars->host      = Str_Clone(host);
@@ -49,7 +49,7 @@ LockFact_Destroy_IMP(LockFactory *self) {
 }
 
 Lock*
-LockFact_Make_Lock_IMP(LockFactory *self, const String *name,
+LockFact_Make_Lock_IMP(LockFactory *self, String *name,
                        int32_t timeout, int32_t interval) {
     LockFactoryIVARS *const ivars = LockFact_IVARS(self);
     return (Lock*)LFLock_new(ivars->folder, name, ivars->host, timeout,
@@ -57,7 +57,7 @@ LockFact_Make_Lock_IMP(LockFactory *self, const String *name,
 }
 
 Lock*
-LockFact_Make_Shared_Lock_IMP(LockFactory *self, const String *name,
+LockFact_Make_Shared_Lock_IMP(LockFactory *self, String *name,
                               int32_t timeout, int32_t interval) {
     LockFactoryIVARS *const ivars = LockFact_IVARS(self);
     return (Lock*)ShLock_new(ivars->folder, name, ivars->host, timeout,

http://git-wip-us.apache.org/repos/asf/lucy/blob/f079ab91/core/Lucy/Store/LockFactory.cfh
----------------------------------------------------------------------
diff --git a/core/Lucy/Store/LockFactory.cfh b/core/Lucy/Store/LockFactory.cfh
index b450191..d9ab93d 100644
--- a/core/Lucy/Store/LockFactory.cfh
+++ b/core/Lucy/Store/LockFactory.cfh
@@ -31,14 +31,14 @@ public class Lucy::Store::LockFactory cnick LockFact
     String *host;
 
     inert incremented LockFactory*
-    new(Folder *folder, const String *host);
+    new(Folder *folder, String *host);
 
     /**
      * @param folder A L<Lucy::Store::Folder>.
      * @param host An identifier which should be unique per-machine.
      */
     public inert LockFactory*
-    init(LockFactory *self, Folder *folder, const String *host);
+    init(LockFactory *self, Folder *folder, String *host);
 
     /** Return a Lock object, which, once Obtain() returns successfully,
      * maintains an exclusive lock on a resource.
@@ -50,7 +50,7 @@ public class Lucy::Store::LockFactory cnick LockFact
      * @param interval Time in milliseconds between retries.
      */
     public incremented Lock*
-    Make_Lock(LockFactory *self, const String *name, int32_t timeout = 0,
+    Make_Lock(LockFactory *self, String *name, int32_t timeout = 0,
               int32_t interval = 100);
 
     /** Return a Lock object for which Shared() returns true, and which
@@ -64,7 +64,7 @@ public class Lucy::Store::LockFactory cnick LockFact
      * @param interval Time in milliseconds between retries.
      */
     public incremented Lock*
-    Make_Shared_Lock(LockFactory *self, const String *name,
+    Make_Shared_Lock(LockFactory *self, String *name,
                      int32_t timeout = 0, int32_t interval = 100);
 
     public void

http://git-wip-us.apache.org/repos/asf/lucy/blob/f079ab91/core/Lucy/Store/RAMFileHandle.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Store/RAMFileHandle.c b/core/Lucy/Store/RAMFileHandle.c
index 5178f6f..98edc44 100644
--- a/core/Lucy/Store/RAMFileHandle.c
+++ b/core/Lucy/Store/RAMFileHandle.c
@@ -22,13 +22,13 @@
 #include "Lucy/Store/FileWindow.h"
 
 RAMFileHandle*
-RAMFH_open(const String *path, uint32_t flags, RAMFile *file) {
+RAMFH_open(String *path, uint32_t flags, RAMFile *file) {
     RAMFileHandle *self = (RAMFileHandle*)VTable_Make_Obj(RAMFILEHANDLE);
     return RAMFH_do_open(self, path, flags, file);
 }
 
 RAMFileHandle*
-RAMFH_do_open(RAMFileHandle *self, const String *path, uint32_t flags,
+RAMFH_do_open(RAMFileHandle *self, String *path, uint32_t flags,
               RAMFile *file) {
     bool must_create
         = (flags & (FH_CREATE | FH_EXCLUSIVE)) == (FH_CREATE | FH_EXCLUSIVE)

http://git-wip-us.apache.org/repos/asf/lucy/blob/f079ab91/core/Lucy/Store/RAMFileHandle.cfh
----------------------------------------------------------------------
diff --git a/core/Lucy/Store/RAMFileHandle.cfh b/core/Lucy/Store/RAMFileHandle.cfh
index fb0877f..c7660e1 100644
--- a/core/Lucy/Store/RAMFileHandle.cfh
+++ b/core/Lucy/Store/RAMFileHandle.cfh
@@ -29,7 +29,7 @@ class Lucy::Store::RAMFileHandle cnick RAMFH
     int64_t  len;
 
     inert incremented nullable RAMFileHandle*
-    open(const String *path = NULL, uint32_t flags, RAMFile *file = NULL);
+    open(String *path = NULL, uint32_t flags, RAMFile *file = NULL);
 
     /**
      * Return a new RAMFileHandle, or set Err_error and return NULL on
@@ -41,7 +41,7 @@ class Lucy::Store::RAMFileHandle cnick RAMFH
      * must be passed or an error will occur.
      */
     inert nullable RAMFileHandle*
-    do_open(RAMFileHandle *self, const String *path = NULL, uint32_t flags,
+    do_open(RAMFileHandle *self, String *path = NULL, uint32_t flags,
             RAMFile *file = NULL);
 
     /** Access the backing RAMFile.

http://git-wip-us.apache.org/repos/asf/lucy/blob/f079ab91/core/Lucy/Store/RAMFolder.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Store/RAMFolder.c b/core/Lucy/Store/RAMFolder.c
index 4a42484..fe497ab 100644
--- a/core/Lucy/Store/RAMFolder.c
+++ b/core/Lucy/Store/RAMFolder.c
@@ -28,16 +28,16 @@
 
 // Return the concatenation of the Folder's path and the supplied path.
 static String*
-S_fullpath(RAMFolder *self, const String *path);
+S_fullpath(RAMFolder *self, String *path);
 
 RAMFolder*
-RAMFolder_new(const String *path) {
+RAMFolder_new(String *path) {
     RAMFolder *self = (RAMFolder*)VTable_Make_Obj(RAMFOLDER);
     return RAMFolder_init(self, path);
 }
 
 RAMFolder*
-RAMFolder_init(RAMFolder *self, const String *path) {
+RAMFolder_init(RAMFolder *self, String *path) {
     Folder_init((Folder*)self, path);
     return self;
 }
@@ -54,7 +54,7 @@ RAMFolder_Check_IMP(RAMFolder *self) {
 }
 
 bool
-RAMFolder_Local_MkDir_IMP(RAMFolder *self, const String *name) {
+RAMFolder_Local_MkDir_IMP(RAMFolder *self, String *name) {
     RAMFolderIVARS *const ivars = RAMFolder_IVARS(self);
     if (Hash_Fetch(ivars->entries, (Obj*)name)) {
         Err_set_error(Err_new(Str_newf("Can't MkDir, '%o' already exists",
@@ -71,7 +71,7 @@ RAMFolder_Local_MkDir_IMP(RAMFolder *self, const String *name) {
 }
 
 FileHandle*
-RAMFolder_Local_Open_FileHandle_IMP(RAMFolder *self, const String *name,
+RAMFolder_Local_Open_FileHandle_IMP(RAMFolder *self, String *name,
                                     uint32_t flags) {
     RAMFolderIVARS *const ivars = RAMFolder_IVARS(self);
     RAMFileHandle *fh;
@@ -122,13 +122,13 @@ RAMFolder_Local_Open_Dir_IMP(RAMFolder *self) {
 }
 
 bool
-RAMFolder_Local_Exists_IMP(RAMFolder *self, const String *name) {
+RAMFolder_Local_Exists_IMP(RAMFolder *self, String *name) {
     RAMFolderIVARS *const ivars = RAMFolder_IVARS(self);
     return !!Hash_Fetch(ivars->entries, (Obj*)name);
 }
 
 bool
-RAMFolder_Local_Is_Directory_IMP(RAMFolder *self, const String *name) {
+RAMFolder_Local_Is_Directory_IMP(RAMFolder *self, String *name) {
     RAMFolderIVARS *const ivars = RAMFolder_IVARS(self);
     Obj *entry = Hash_Fetch(ivars->entries, (Obj*)name);
     if (entry && Obj_Is_A(entry, FOLDER)) { return true; }
@@ -139,7 +139,7 @@ RAMFolder_Local_Is_Directory_IMP(RAMFolder *self, const String *name)
{
 #define OP_HARD_LINK 2
 
 static bool
-S_rename_or_hard_link(RAMFolder *self, const String* from, const String *to,
+S_rename_or_hard_link(RAMFolder *self, String* from, String *to,
                       Folder *from_folder, Folder *to_folder,
                       String *from_name, String *to_name,
                       int op) {
@@ -274,8 +274,8 @@ S_rename_or_hard_link(RAMFolder *self, const String* from, const String
*to,
 }
 
 bool
-RAMFolder_Rename_IMP(RAMFolder *self, const String* from,
-                     const String *to) {
+RAMFolder_Rename_IMP(RAMFolder *self, String* from,
+                     String *to) {
     Folder *from_folder = RAMFolder_Enclosing_Folder(self, from);
     Folder *to_folder   = RAMFolder_Enclosing_Folder(self, to);
     String *from_name   = IxFileNames_local_part(from);
@@ -289,8 +289,8 @@ RAMFolder_Rename_IMP(RAMFolder *self, const String* from,
 }
 
 bool
-RAMFolder_Hard_Link_IMP(RAMFolder *self, const String *from,
-                        const String *to) {
+RAMFolder_Hard_Link_IMP(RAMFolder *self, String *from,
+                        String *to) {
     Folder *from_folder = RAMFolder_Enclosing_Folder(self, from);
     Folder *to_folder   = RAMFolder_Enclosing_Folder(self, to);
     String *from_name   = IxFileNames_local_part(from);
@@ -304,7 +304,7 @@ RAMFolder_Hard_Link_IMP(RAMFolder *self, const String *from,
 }
 
 bool
-RAMFolder_Local_Delete_IMP(RAMFolder *self, const String *name) {
+RAMFolder_Local_Delete_IMP(RAMFolder *self, String *name) {
     RAMFolderIVARS *const ivars = RAMFolder_IVARS(self);
     Obj *entry = Hash_Fetch(ivars->entries, (Obj*)name);
     if (entry) {
@@ -338,7 +338,7 @@ RAMFolder_Local_Delete_IMP(RAMFolder *self, const String *name) {
 }
 
 Folder*
-RAMFolder_Local_Find_Folder_IMP(RAMFolder *self, const String *path) {
+RAMFolder_Local_Find_Folder_IMP(RAMFolder *self, String *path) {
     RAMFolderIVARS *const ivars = RAMFolder_IVARS(self);
     Folder *local_folder = (Folder*)Hash_Fetch(ivars->entries, (Obj*)path);
     if (local_folder && Folder_Is_A(local_folder, FOLDER)) {
@@ -353,7 +353,7 @@ RAMFolder_Close_IMP(RAMFolder *self) {
 }
 
 static String*
-S_fullpath(RAMFolder *self, const String *path) {
+S_fullpath(RAMFolder *self, String *path) {
     RAMFolderIVARS *const ivars = RAMFolder_IVARS(self);
     if (Str_Get_Size(ivars->path)) {
         return Str_newf("%o/%o", ivars->path, path);

http://git-wip-us.apache.org/repos/asf/lucy/blob/f079ab91/core/Lucy/Store/RAMFolder.cfh
----------------------------------------------------------------------
diff --git a/core/Lucy/Store/RAMFolder.cfh b/core/Lucy/Store/RAMFolder.cfh
index a1133f2..c04267d 100644
--- a/core/Lucy/Store/RAMFolder.cfh
+++ b/core/Lucy/Store/RAMFolder.cfh
@@ -25,13 +25,13 @@ parcel Lucy;
 public class Lucy::Store::RAMFolder inherits Lucy::Store::Folder {
 
     inert incremented RAMFolder*
-    new(const String *path = NULL);
+    new(String *path = NULL);
 
     /**
      * @param path Relative path, used for subfolders.
      */
     public inert RAMFolder*
-    init(RAMFolder *self, const String *path = NULL);
+    init(RAMFolder *self, String *path = NULL);
 
     public void
     Initialize(RAMFolder *self);
@@ -43,31 +43,31 @@ public class Lucy::Store::RAMFolder inherits Lucy::Store::Folder {
     Close(RAMFolder *self);
 
     incremented nullable FileHandle*
-    Local_Open_FileHandle(RAMFolder *self, const String *name, uint32_t flags);
+    Local_Open_FileHandle(RAMFolder *self, String *name, uint32_t flags);
 
     incremented nullable DirHandle*
     Local_Open_Dir(RAMFolder *self);
 
     bool
-    Local_MkDir(RAMFolder *self, const String *name);
+    Local_MkDir(RAMFolder *self, String *name);
 
     bool
-    Local_Exists(RAMFolder *self, const String *name);
+    Local_Exists(RAMFolder *self, String *name);
 
     bool
-    Local_Is_Directory(RAMFolder *self, const String *name);
+    Local_Is_Directory(RAMFolder *self, String *name);
 
     nullable Folder*
-    Local_Find_Folder(RAMFolder *self, const String *name);
+    Local_Find_Folder(RAMFolder *self, String *name);
 
     bool
-    Local_Delete(RAMFolder *self, const String *name);
+    Local_Delete(RAMFolder *self, String *name);
 
     public bool
-    Rename(RAMFolder *self, const String* from, const String *to);
+    Rename(RAMFolder *self, String* from, String *to);
 
     public bool
-    Hard_Link(RAMFolder *self, const String *from, const String *to);
+    Hard_Link(RAMFolder *self, String *from, String *to);
 }
 
 

http://git-wip-us.apache.org/repos/asf/lucy/blob/f079ab91/core/Lucy/Store/SharedLock.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Store/SharedLock.c b/core/Lucy/Store/SharedLock.c
index 1707254..54bb4e5 100644
--- a/core/Lucy/Store/SharedLock.c
+++ b/core/Lucy/Store/SharedLock.c
@@ -27,15 +27,15 @@
 #include "Lucy/Store/OutStream.h"
 
 SharedLock*
-ShLock_new(Folder *folder, const String *name, const String *host,
+ShLock_new(Folder *folder, String *name, String *host,
            int32_t timeout, int32_t interval) {
     SharedLock *self = (SharedLock*)VTable_Make_Obj(SHAREDLOCK);
     return ShLock_init(self, folder, name, host, timeout, interval);
 }
 
 SharedLock*
-ShLock_init(SharedLock *self, Folder *folder, const String *name,
-            const String *host, int32_t timeout, int32_t interval) {
+ShLock_init(SharedLock *self, Folder *folder, String *name,
+            String *host, int32_t timeout, int32_t interval) {
     LFLock_init((LockFileLock*)self, folder, name, host, timeout, interval);
     SharedLockIVARS *const ivars = ShLock_IVARS(self);
 

http://git-wip-us.apache.org/repos/asf/lucy/blob/f079ab91/core/Lucy/Store/SharedLock.cfh
----------------------------------------------------------------------
diff --git a/core/Lucy/Store/SharedLock.cfh b/core/Lucy/Store/SharedLock.cfh
index ce27042..a9b741c 100644
--- a/core/Lucy/Store/SharedLock.cfh
+++ b/core/Lucy/Store/SharedLock.cfh
@@ -42,7 +42,7 @@ class Lucy::Store::SharedLock cnick ShLock
     inherits Lucy::Store::LockFileLock {
 
     inert incremented SharedLock*
-    new(Folder *folder, const String *name, const String *host,
+    new(Folder *folder, String *name, String *host,
         int32_t timeout = 0, int32_t interval = 100);
 
     /**
@@ -55,8 +55,8 @@ class Lucy::Store::SharedLock cnick ShLock
      * @param interval Time in milliseconds between retries.
      */
     public inert SharedLock*
-    init(SharedLock *self, Folder *folder, const String *name,
-         const String *host, int32_t timeout = 0, int32_t interval = 100);
+    init(SharedLock *self, Folder *folder, String *name,
+         String *host, int32_t timeout = 0, int32_t interval = 100);
 
     public bool
     Shared(SharedLock *self);

http://git-wip-us.apache.org/repos/asf/lucy/blob/f079ab91/core/Lucy/Test/Store/MockFileHandle.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Test/Store/MockFileHandle.c b/core/Lucy/Test/Store/MockFileHandle.c
index b3f0693..d7afa71 100644
--- a/core/Lucy/Test/Store/MockFileHandle.c
+++ b/core/Lucy/Test/Store/MockFileHandle.c
@@ -23,13 +23,13 @@
 #include "Lucy/Store/FileWindow.h"
 
 MockFileHandle*
-MockFileHandle_new(const String *path, int64_t length) {
+MockFileHandle_new(String *path, int64_t length) {
     MockFileHandle *self = (MockFileHandle*)VTable_Make_Obj(MOCKFILEHANDLE);
     return MockFileHandle_init(self, path, length);
 }
 
 MockFileHandle*
-MockFileHandle_init(MockFileHandle *self, const String *path,
+MockFileHandle_init(MockFileHandle *self, String *path,
                     int64_t length) {
     FH_do_open((FileHandle*)self, path, 0);
     MockFileHandleIVARS *const ivars = MockFileHandle_IVARS(self);

http://git-wip-us.apache.org/repos/asf/lucy/blob/f079ab91/core/Lucy/Test/Store/MockFileHandle.cfh
----------------------------------------------------------------------
diff --git a/core/Lucy/Test/Store/MockFileHandle.cfh b/core/Lucy/Test/Store/MockFileHandle.cfh
index 8b3ed59..fe979f4 100644
--- a/core/Lucy/Test/Store/MockFileHandle.cfh
+++ b/core/Lucy/Test/Store/MockFileHandle.cfh
@@ -23,10 +23,10 @@ class Lucy::Store::MockFileHandle inherits Lucy::Store::FileHandle {
     int64_t len;
 
     inert incremented MockFileHandle*
-    new(const String *path = NULL, int64_t length);
+    new(String *path = NULL, int64_t length);
 
     inert MockFileHandle*
-    init(MockFileHandle *self, const String *path = NULL, int64_t length);
+    init(MockFileHandle *self, String *path = NULL, int64_t length);
 
     bool
     Window(MockFileHandle *self, FileWindow *window, int64_t offset, int64_t len);

http://git-wip-us.apache.org/repos/asf/lucy/blob/f079ab91/core/Lucy/Util/IndexFileNames.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Util/IndexFileNames.c b/core/Lucy/Util/IndexFileNames.c
index 5d616f2..377d727 100644
--- a/core/Lucy/Util/IndexFileNames.c
+++ b/core/Lucy/Util/IndexFileNames.c
@@ -50,7 +50,7 @@ IxFileNames_latest_snapshot(Folder *folder) {
 }
 
 uint64_t
-IxFileNames_extract_gen(const String *name) {
+IxFileNames_extract_gen(String *name) {
     StringIterator *iter = Str_Top(name);
 
     // Advance past first underscore.  Bail if we run out of string or if we
@@ -70,7 +70,7 @@ IxFileNames_extract_gen(const String *name) {
 }
 
 String*
-IxFileNames_local_part(const String *path) {
+IxFileNames_local_part(String *path) {
     StringIterator *top = Str_Tail(path);
     int32_t code_point = StrIter_Prev(top);
 

http://git-wip-us.apache.org/repos/asf/lucy/blob/f079ab91/core/Lucy/Util/IndexFileNames.cfh
----------------------------------------------------------------------
diff --git a/core/Lucy/Util/IndexFileNames.cfh b/core/Lucy/Util/IndexFileNames.cfh
index b82f857..3e7ee7f 100644
--- a/core/Lucy/Util/IndexFileNames.cfh
+++ b/core/Lucy/Util/IndexFileNames.cfh
@@ -27,7 +27,7 @@ inert class Lucy::Util::IndexFileNames cnick IxFileNames {
      * @return a generation number, or 0 if no number can be extracted.
      */
     inert uint64_t
-    extract_gen(const String *name);
+    extract_gen(String *name);
 
     /** Return the name of the latest generation snapshot file in the Folder,
      * or NULL if no such file exists.
@@ -39,7 +39,7 @@ inert class Lucy::Util::IndexFileNames cnick IxFileNames {
      * Trailing slashes will be stripped.
      */
     inert incremented String*
-    local_part(const String *path);
+    local_part(String *path);
 }
 
 

http://git-wip-us.apache.org/repos/asf/lucy/blob/f079ab91/core/Lucy/Util/Json.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Util/Json.c b/core/Lucy/Util/Json.c
index c96a69d..34ec936 100644
--- a/core/Lucy/Util/Json.c
+++ b/core/Lucy/Util/Json.c
@@ -101,7 +101,7 @@ Json_from_json(String *json) {
 }
 
 Obj*
-Json_slurp_json(Folder *folder, const String *path) {
+Json_slurp_json(Folder *folder, String *path) {
     InStream *instream = Folder_Open_In(folder, path);
     if (!instream) {
         ERR_ADD_FRAME(Err_get_error());
@@ -119,7 +119,7 @@ Json_slurp_json(Folder *folder, const String *path) {
 }
 
 bool
-Json_spew_json(Obj *dump, Folder *folder, const String *path) {
+Json_spew_json(Obj *dump, Folder *folder, String *path) {
     String *json = Json_to_json(dump);
     if (!json) {
         ERR_ADD_FRAME(Err_get_error());

http://git-wip-us.apache.org/repos/asf/lucy/blob/f079ab91/core/Lucy/Util/Json.cfh
----------------------------------------------------------------------
diff --git a/core/Lucy/Util/Json.cfh b/core/Lucy/Util/Json.cfh
index ceedfd3..c103074 100644
--- a/core/Lucy/Util/Json.cfh
+++ b/core/Lucy/Util/Json.cfh
@@ -40,7 +40,7 @@ class Lucy::Util::Json inherits Clownfish::Obj {
      * @return true if the write succeeds, false on failure (sets Err_error).
      */
     inert bool
-    spew_json(Obj *dump, Folder *folder, const String *path);
+    spew_json(Obj *dump, Folder *folder, String *path);
 
     /** Decode the JSON in the file at <code>path</code> and return a data
      * structure made of Hashes, VArrays, and Strings.  Returns NULL and sets
@@ -48,7 +48,7 @@ class Lucy::Util::Json inherits Clownfish::Obj {
      * contain valid JSON.
      */
     inert incremented nullable Obj*
-    slurp_json(Folder *folder, const String *path);
+    slurp_json(Folder *folder, String *path);
 
     /** Allow the encoder to output strings, etc, instead of throwing an error
      * on anything other than a hash or an array.  Testing only.

http://git-wip-us.apache.org/repos/asf/lucy/blob/f079ab91/core/LucyX/Search/ProximityQuery.c
----------------------------------------------------------------------
diff --git a/core/LucyX/Search/ProximityQuery.c b/core/LucyX/Search/ProximityQuery.c
index ee76917..c4b779f 100644
--- a/core/LucyX/Search/ProximityQuery.c
+++ b/core/LucyX/Search/ProximityQuery.c
@@ -47,13 +47,13 @@ S_do_init(ProximityQuery *self, String *field, VArray *terms, float boost,
           uint32_t within);
 
 ProximityQuery*
-ProximityQuery_new(const String *field, VArray *terms, uint32_t within) {
+ProximityQuery_new(String *field, VArray *terms, uint32_t within) {
     ProximityQuery *self = (ProximityQuery*)VTable_Make_Obj(PROXIMITYQUERY);
     return ProximityQuery_init(self, field, terms, within);
 }
 
 ProximityQuery*
-ProximityQuery_init(ProximityQuery *self, const String *field, VArray *terms,
+ProximityQuery_init(ProximityQuery *self, String *field, VArray *terms,
                     uint32_t within) {
     return S_do_init(self, Str_Clone(field), VA_Clone(terms), 1.0f, within);
 }
@@ -371,7 +371,7 @@ ProximityCompiler_Make_Matcher_IMP(ProximityCompiler *self, SegReader
*reader,
 VArray*
 ProximityCompiler_Highlight_Spans_IMP(ProximityCompiler *self,
                                       Searcher *searcher, DocVector *doc_vec,
-                                      const String *field) {
+                                      String *field) {
     ProximityCompilerIVARS *const ivars = ProximityCompiler_IVARS(self);
     ProximityQueryIVARS *const parent_ivars
         = ProximityQuery_IVARS((ProximityQuery*)ivars->parent);

http://git-wip-us.apache.org/repos/asf/lucy/blob/f079ab91/core/LucyX/Search/ProximityQuery.cfh
----------------------------------------------------------------------
diff --git a/core/LucyX/Search/ProximityQuery.cfh b/core/LucyX/Search/ProximityQuery.cfh
index 102b38f..904cd6a 100644
--- a/core/LucyX/Search/ProximityQuery.cfh
+++ b/core/LucyX/Search/ProximityQuery.cfh
@@ -29,14 +29,14 @@ public class LucyX::Search::ProximityQuery inherits Lucy::Search::Query
{
     uint32_t       within;
 
     inert incremented ProximityQuery*
-    new(const String *field, VArray *terms, uint32_t within);
+    new(String *field, VArray *terms, uint32_t within);
 
     /**
      * @param field The field that the phrase must occur in.
      * @param terms The ordered array of terms that must match.
      */
     public inert ProximityQuery*
-    init(ProximityQuery *self, const String *field, VArray *terms, uint32_t within);
+    init(ProximityQuery *self, String *field, VArray *terms, uint32_t within);
 
     /** Accessor for object's field attribute.
      */
@@ -109,7 +109,7 @@ class LucyX::Search::ProximityCompiler
 
     public incremented VArray*
     Highlight_Spans(ProximityCompiler *self, Searcher *searcher,
-                    DocVector *doc_vec, const String *field);
+                    DocVector *doc_vec, String *field);
 
     public bool
     Equals(ProximityCompiler *self, Obj *other);

http://git-wip-us.apache.org/repos/asf/lucy/blob/f079ab91/perl/buildlib/Lucy/Build/Binding/Util.pm
----------------------------------------------------------------------
diff --git a/perl/buildlib/Lucy/Build/Binding/Util.pm b/perl/buildlib/Lucy/Build/Binding/Util.pm
index 5b1532e..1561b48 100644
--- a/perl/buildlib/Lucy/Build/Binding/Util.pm
+++ b/perl/buildlib/Lucy/Build/Binding/Util.pm
@@ -203,7 +203,7 @@ MODULE = Lucy   PACKAGE = Lucy::Util::IndexFileNames
 
 uint64_t
 extract_gen(name)
-    const cfish_String *name;
+    cfish_String *name;
 CODE:
     RETVAL = lucy_IxFileNames_extract_gen(name);
 OUTPUT: RETVAL

http://git-wip-us.apache.org/repos/asf/lucy/blob/f079ab91/perl/xs/Lucy/Analysis/RegexTokenizer.c
----------------------------------------------------------------------
diff --git a/perl/xs/Lucy/Analysis/RegexTokenizer.c b/perl/xs/Lucy/Analysis/RegexTokenizer.c
index 59baf40..40ff0b7 100644
--- a/perl/xs/Lucy/Analysis/RegexTokenizer.c
+++ b/perl/xs/Lucy/Analysis/RegexTokenizer.c
@@ -25,7 +25,7 @@
 #include "Clownfish/Util/StringHelper.h"
 
 static SV*
-S_compile_token_re(const cfish_String *pattern);
+S_compile_token_re(cfish_String *pattern);
 
 static void
 S_set_token_re_but_not_pattern(lucy_RegexTokenizer *self, void *token_re);
@@ -40,7 +40,7 @@ lucy_RegexTokenizer_is_available(void) {
 
 lucy_RegexTokenizer*
 lucy_RegexTokenizer_init(lucy_RegexTokenizer *self,
-                         const cfish_String *pattern) {
+                         cfish_String *pattern) {
     lucy_Analyzer_init((lucy_Analyzer*)self);
     lucy_RegexTokenizerIVARS *const ivars = lucy_RegexTokenizer_IVARS(self);
     #define DEFAULT_PATTERN "\\w+(?:['\\x{2019}]\\w+)*"
@@ -67,7 +67,7 @@ lucy_RegexTokenizer_init(lucy_RegexTokenizer *self,
 }
 
 static SV*
-S_compile_token_re(const cfish_String *pattern) {
+S_compile_token_re(cfish_String *pattern) {
     dSP;
     ENTER;
     SAVETMPS;

http://git-wip-us.apache.org/repos/asf/lucy/blob/f079ab91/perl/xs/Lucy/Document/Doc.c
----------------------------------------------------------------------
diff --git a/perl/xs/Lucy/Document/Doc.c b/perl/xs/Lucy/Document/Doc.c
index f74ed22..a46da38 100644
--- a/perl/xs/Lucy/Document/Doc.c
+++ b/perl/xs/Lucy/Document/Doc.c
@@ -52,7 +52,7 @@ LUCY_Doc_Get_Size_IMP(lucy_Doc *self) {
 }
 
 void
-LUCY_Doc_Store_IMP(lucy_Doc *self, const cfish_String *field, cfish_Obj *value) {
+LUCY_Doc_Store_IMP(lucy_Doc *self, cfish_String *field, cfish_Obj *value) {
     lucy_DocIVARS *const ivars = lucy_Doc_IVARS(self);
     const char *key      = CFISH_Str_Get_Ptr8(field);
     size_t      key_size = CFISH_Str_Get_Size(field);


Mime
View raw message