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/05/26 17:35:31 UTC

[lucy-commits] [3/9] git commit: refs/heads/separate-clownfish-wip1 - Rename more Lucy prefixes to Clownfish

Rename more Lucy prefixes to Clownfish


Project: http://git-wip-us.apache.org/repos/asf/lucy/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy/commit/9c65f940
Tree: http://git-wip-us.apache.org/repos/asf/lucy/tree/9c65f940
Diff: http://git-wip-us.apache.org/repos/asf/lucy/diff/9c65f940

Branch: refs/heads/separate-clownfish-wip1
Commit: 9c65f940aa83b341cb7df3366874adb6a63c2583
Parents: 7100a70
Author: Nick Wellnhofer <we...@aevum.de>
Authored: Sun May 19 19:41:30 2013 +0200
Committer: Nick Wellnhofer <we...@aevum.de>
Committed: Sun May 26 16:04:06 2013 +0200

----------------------------------------------------------------------
 c/src/Clownfish/Err.c                      |    2 +-
 c/t/test_lucy.c                            |    6 +-
 clownfish/compiler/src/CFCBindAliases.c    |  107 ++++++++++++++++++-
 core/Clownfish/CharBuf.c                   |    2 +-
 core/Clownfish/CharBuf.cfh                 |    6 +-
 core/Clownfish/Err.c                       |    4 +-
 core/Clownfish/Err.cfh                     |   57 +++++-----
 core/Clownfish/Hash.c                      |    4 +-
 core/Clownfish/LockFreeRegistry.c          |    8 +-
 core/Clownfish/Num.c                       |    2 +-
 core/Clownfish/Num.cfh                     |    4 +-
 core/Clownfish/Obj.cfh                     |   26 +++---
 core/Clownfish/Util/Atomic.c               |    4 +-
 core/Clownfish/Util/Atomic.cfh             |   26 +++---
 core/Clownfish/Util/Memory.cfh             |   16 ++--
 core/Clownfish/Util/NumberUtils.cfh        |   98 +++++++++---------
 core/Clownfish/Util/SortUtils.c            |   38 ++++----
 core/Clownfish/Util/SortUtils.cfh          |    8 +-
 core/Clownfish/Util/StringHelper.c         |    2 +-
 core/Clownfish/Util/StringHelper.cfh       |    4 +-
 core/Clownfish/VArray.c                    |    4 +-
 core/Clownfish/VArray.cfh                  |    8 +-
 core/Clownfish/VTable.c                    |    2 +-
 core/Lucy/Plan/FieldType.cfh               |    2 +-
 core/Lucy/Test.cfh                         |   16 ++--
 core/Lucy/Test/Index/TestTermInfo.c        |    2 +-
 core/Lucy/Util/Json.c                      |    6 +-
 core/Lucy/Util/Json.cfh                    |    4 +-
 core/Lucy/Util/SortExternal.c              |    8 +-
 perl/buildlib/Lucy/Build/Binding/Object.pm |    2 +-
 perl/buildlib/Lucy/Build/Binding/Util.pm   |    2 +-
 perl/xs/Lucy/Analysis/RegexTokenizer.c     |    2 +-
 perl/xs/Lucy/Document/Doc.c                |    2 +-
 perl/xs/XSBind.c                           |  132 +++++++++++-----------
 34 files changed, 358 insertions(+), 258 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucy/blob/9c65f940/c/src/Clownfish/Err.c
----------------------------------------------------------------------
diff --git a/c/src/Clownfish/Err.c b/c/src/Clownfish/Err.c
index a233f74..2adb533 100644
--- a/c/src/Clownfish/Err.c
+++ b/c/src/Clownfish/Err.c
@@ -70,7 +70,7 @@ Err_to_host(Err *self) {
 void
 Err_throw_mess(VTable *vtable, CharBuf *message) {
     Err_Make_t make
-        = METHOD_PTR(CERTIFY(vtable, VTABLE), Lucy_Err_Make);
+        = METHOD_PTR(CERTIFY(vtable, VTABLE), Cfish_Err_Make);
     Err *err = (Err*)CERTIFY(make(NULL), ERR);
     Err_Cat_Mess(err, message);
     DECREF(message);

http://git-wip-us.apache.org/repos/asf/lucy/blob/9c65f940/c/t/test_lucy.c
----------------------------------------------------------------------
diff --git a/c/t/test_lucy.c b/c/t/test_lucy.c
index f23847b..709b5d1 100644
--- a/c/t/test_lucy.c
+++ b/c/t/test_lucy.c
@@ -21,13 +21,13 @@
 
 int
 main() {
-    lucy_TestFormatterCF *formatter;
+    cfish_TestFormatterCF *formatter;
     bool success;
 
     lucy_bootstrap_parcel();
 
-    formatter = lucy_TestFormatterCF_new();
-    success = lucy_Test_run_all_batches((lucy_TestFormatter*)formatter);
+    formatter = cfish_TestFormatterCF_new();
+    success = lucy_Test_run_all_batches((cfish_TestFormatter*)formatter);
     CFISH_DECREF(formatter);
 
     return success ? EXIT_SUCCESS : EXIT_FAILURE;

http://git-wip-us.apache.org/repos/asf/lucy/blob/9c65f940/clownfish/compiler/src/CFCBindAliases.c
----------------------------------------------------------------------
diff --git a/clownfish/compiler/src/CFCBindAliases.c b/clownfish/compiler/src/CFCBindAliases.c
index 9eda959..0354080 100644
--- a/clownfish/compiler/src/CFCBindAliases.c
+++ b/clownfish/compiler/src/CFCBindAliases.c
@@ -28,10 +28,19 @@ struct alias aliases[] = {
 
     {"cfish_Obj", "lucy_Obj"},
     {"CFISH_OBJ", "LUCY_OBJ"},
+    {"cfish_Obj_dec_refcount", "lucy_Obj_dec_refcount"},
+    {"cfish_Obj_get_refcount", "lucy_Obj_get_refcount"},
+    {"cfish_Obj_inc_refcount", "lucy_Obj_inc_refcount"},
+    {"cfish_Obj_to_host", "lucy_Obj_to_host"},
+    {"Cfish_Obj_Destroy", "Lucy_Obj_Destroy"},
+    {"Cfish_Obj_Destroy_OFFSET", "Lucy_Obj_Destroy_OFFSET"},
+    {"Cfish_Obj_Destroy_t", "Lucy_Obj_Destroy_t"},
     {"Cfish_Obj_Dump", "Lucy_Obj_Dump"},
     {"Cfish_Obj_Get_Class_Name", "Lucy_Obj_Get_Class_Name"},
     {"Cfish_Obj_Is_A", "Lucy_Obj_Is_A"},
     {"Cfish_Obj_Load", "Lucy_Obj_Load"},
+    {"Cfish_Obj_Load_OFFSET", "Lucy_Obj_Load_OFFSET"},
+    {"Cfish_Obj_Load_t", "Lucy_Obj_Load_t"},
     {"Cfish_Obj_To_F64", "Lucy_Obj_To_F64"},
     {"Cfish_Obj_To_I64", "Lucy_Obj_To_I64"},
     {"Cfish_Obj_To_Bool", "Lucy_Obj_To_Bool"},
@@ -49,10 +58,14 @@ struct alias aliases[] = {
     {"cfish_CB_newf", "lucy_CB_newf"},
     {"cfish_CB_new_from_trusted_utf8", "lucy_CB_new_from_trusted_utf8"},
     {"Cfish_CB_Clone", "Lucy_CB_Clone"},
+    {"Cfish_CB_Nip_One_OFFSET", "Lucy_CB_Nip_One_OFFSET"},
+    {"Cfish_CB_Nip_One_t", "Lucy_CB_Nip_One_t"},
     {"cfish_ZombieCharBuf", "lucy_ZombieCharBuf"},
     {"CFISH_ZOMBIECHARBUF", "LUCY_ZOMBIECHARBUF"},
     {"CFISH_VIEWCHARBUF", "LUCY_VIEWCHARBUF"},
+    {"cfish_ZCB_new", "lucy_ZCB_new"},
     {"cfish_ZCB_size", "lucy_ZCB_size"},
+    {"cfish_ZCB_wrap", "lucy_ZCB_wrap"},
     {"cfish_ZCB_wrap_str", "lucy_ZCB_wrap_str"},
     {"Cfish_ZCB_Assign_Str", "Lucy_ZCB_Assign_Str"},
     {"Cfish_ZCB_Assign_Trusted_Str", "Lucy_ZCB_Assign_Trusted_Str"},
@@ -65,14 +78,36 @@ struct alias aliases[] = {
     {"CFISH_INTEGER64", "LUCY_INTEGER64"},
     {"CFISH_FLOAT32", "LUCY_FLOAT32"},
     {"CFISH_FLOAT64", "LUCY_FLOAT64"},
+    {"cfish_Bool_false_singleton", "lucy_Bool_false_singleton"},
+    {"cfish_Bool_true_singleton", "lucy_Bool_true_singleton"},
     {"cfish_Bool_singleton", "lucy_Bool_singleton"},
+    {"Cfish_Bool_Dec_RefCount_OFFSET", "Lucy_Bool_Dec_RefCount_OFFSET"},
+    {"Cfish_Bool_Dec_RefCount_t", "Lucy_Bool_Dec_RefCount_t"},
 
     {"cfish_Err", "lucy_Err"},
     {"CFISH_ERR", "LUCY_ERR"},
+    {"cfish_Err_certify", "lucy_Err_certify"},
+    {"cfish_Err_do_throw", "lucy_Err_do_throw"},
+    {"cfish_Err_downcast", "lucy_Err_downcast"},
+    {"cfish_Err_get_error", "lucy_Err_get_error"},
+    {"cfish_Err_init_class", "lucy_Err_init_class"},
+    {"cfish_Err_make_mess", "lucy_Err_make_mess"},
     {"cfish_Err_new", "lucy_Err_new"},
-    {"cfish_Err_trap", "lucy_Err_trap"},
+    {"cfish_Err_rethrow", "lucy_Err_rethrow"},
     {"cfish_Err_set_error", "lucy_Err_set_error"},
-    {"cfish_Err_get_error", "lucy_Err_get_error"},
+    {"cfish_Err_throw_at", "lucy_Err_throw_at"},
+    {"cfish_Err_throw_mess", "lucy_Err_throw_mess"},
+    {"cfish_Err_to_host", "lucy_Err_to_host"},
+    {"cfish_Err_trap", "lucy_Err_trap"},
+    {"cfish_Err_warn_at", "lucy_Err_warn_at"},
+    {"cfish_Err_warn_mess", "lucy_Err_warn_mess"},
+    {"Cfish_Err_Add_Frame", "Lucy_Err_Add_Frame"},
+    {"Cfish_Err_Cat_Mess", "Lucy_Err_Cat_Mess"},
+    {"Cfish_Err_Make_OFFSET", "Lucy_Err_Make_OFFSET"},
+    {"Cfish_Err_Make_t", "Lucy_Err_Make_t"},
+    {"Cfish_Err_To_Host", "Lucy_Err_To_Host"},
+    {"Cfish_Err_To_Host_OFFSET", "Lucy_Err_To_Host_OFFSET"},
+    {"Cfish_Err_To_Host_t", "Lucy_Err_To_Host_t"},
 
     {"cfish_Hash", "lucy_Hash"},
     {"CFISH_HASH", "LUCY_HASH"},
@@ -83,6 +118,62 @@ struct alias aliases[] = {
     {"Cfish_Hash_Store_Str", "Lucy_Hash_Store_Str"},
     {"Cfish_Hash_Store", "Lucy_Hash_Store"},
 
+    {"cfish_LockFreeRegistry", "lucy_LockFreeRegistry"},
+    {"CFISH_LOCKFREEREGISTRY", "LUCY_LOCKFREEREGISTRY"},
+    {"cfish_LFReg_to_host", "lucy_LFReg_to_host"},
+    {"Cfish_LFReg_To_Host", "Lucy_LFReg_To_Host"},
+    {"Cfish_LFReg_To_Host_OFFSET", "Lucy_LFReg_To_Host_OFFSET"},
+    {"Cfish_LFReg_To_Host_t", "Lucy_LFReg_To_Host_t"},
+
+    {"cfish_Memory_wrapped_calloc", "lucy_Memory_wrapped_calloc"},
+    {"cfish_Memory_wrapped_free", "lucy_Memory_wrapped_free"},
+    {"cfish_Memory_wrapped_malloc", "lucy_Memory_wrapped_malloc"},
+    {"cfish_Memory_wrapped_realloc", "lucy_Memory_wrapped_realloc"},
+
+    {"cfish_NumUtil_decode_bigend_f32", "lucy_NumUtil_decode_bigend_f32"},
+    {"cfish_NumUtil_decode_bigend_f64", "lucy_NumUtil_decode_bigend_f64"},
+    {"cfish_NumUtil_decode_bigend_u16", "lucy_NumUtil_decode_bigend_u16"},
+    {"cfish_NumUtil_decode_bigend_u32", "lucy_NumUtil_decode_bigend_u32"},
+    {"cfish_NumUtil_decode_bigend_u64", "lucy_NumUtil_decode_bigend_u64"},
+    {"cfish_NumUtil_decode_c32", "lucy_NumUtil_decode_c32"},
+    {"cfish_NumUtil_decode_c64", "lucy_NumUtil_decode_c64"},
+    {"cfish_NumUtil_encode_bigend_f32", "lucy_NumUtil_encode_bigend_f32"},
+    {"cfish_NumUtil_encode_bigend_f64", "lucy_NumUtil_encode_bigend_f64"},
+    {"cfish_NumUtil_encode_bigend_u16", "lucy_NumUtil_encode_bigend_u16"},
+    {"cfish_NumUtil_encode_bigend_u32", "lucy_NumUtil_encode_bigend_u32"},
+    {"cfish_NumUtil_encode_bigend_u64", "lucy_NumUtil_encode_bigend_u64"},
+    {"cfish_NumUtil_encode_c32", "lucy_NumUtil_encode_c32"},
+    {"cfish_NumUtil_encode_c64", "lucy_NumUtil_encode_c64"},
+    {"cfish_NumUtil_encode_padded_c32", "lucy_NumUtil_encode_padded_c32"},
+    {"cfish_NumUtil_u1clear", "lucy_NumUtil_u1clear"},
+    {"cfish_NumUtil_u1flip", "lucy_NumUtil_u1flip"},
+    {"cfish_NumUtil_u1get", "lucy_NumUtil_u1get"},
+    {"cfish_NumUtil_u1set", "lucy_NumUtil_u1set"},
+    {"cfish_NumUtil_u1masks", "lucy_NumUtil_u1masks"},
+    {"cfish_NumUtil_u2get", "lucy_NumUtil_u2get"},
+    {"cfish_NumUtil_u2set", "lucy_NumUtil_u2set"},
+    {"cfish_NumUtil_u2masks", "lucy_NumUtil_u2masks"},
+    {"cfish_NumUtil_u2shifts", "lucy_NumUtil_u2shifts"},
+    {"cfish_NumUtil_u4get", "lucy_NumUtil_u4get"},
+    {"cfish_NumUtil_u4set", "lucy_NumUtil_u4set"},
+    {"cfish_NumUtil_u4masks", "lucy_NumUtil_u4masks"},
+    {"cfish_NumUtil_u4shifts", "lucy_NumUtil_u4shifts"},
+    {"cfish_NumUtil_skip_cint", "lucy_NumUtil_skip_cint"},
+
+    {"cfish_StrHelp_UTF8_COUNT", "lucy_StrHelp_UTF8_COUNT"},
+
+    {"cfish_TestBatch_fail", "lucy_TestBatch_fail"},
+    {"cfish_TestBatch_pass", "lucy_TestBatch_pass"},
+    {"cfish_TestBatch_skip", "lucy_TestBatch_skip"},
+    {"cfish_TestBatch_test_false", "lucy_TestBatch_test_false"},
+    {"cfish_TestBatch_test_float_equals", "lucy_TestBatch_test_float_equals"},
+    {"cfish_TestBatch_test_int_equals", "lucy_TestBatch_test_int_equals"},
+    {"cfish_TestBatch_test_string_equals", "lucy_TestBatch_test_string_equals"},
+    {"cfish_TestBatch_test_true", "lucy_TestBatch_test_true"},
+    {"cfish_TestFormatter", "lucy_TestFormatter"},
+    {"cfish_TestFormatterCF", "lucy_TestFormatterCF"},
+    {"cfish_TestFormatterCF_new", "lucy_TestFormatterCF_new"},
+
     {"cfish_VArray", "lucy_VArray"},
     {"CFISH_VARRAY", "LUCY_VARRAY"},
     {"cfish_VA_new", "lucy_VA_new"},
@@ -94,12 +185,22 @@ struct alias aliases[] = {
 
     {"cfish_VTable", "lucy_VTable"},
     {"CFISH_VTABLE", "LUCY_VTABLE"},
-    {"cfish_VTable_bootstrap", "lucy_VTable_bootstrap"},
     {"cfish_VTable_add_alias_to_registry", "lucy_VTable_add_alias_to_registry"},
+    {"cfish_VTable_bootstrap", "lucy_VTable_bootstrap"},
+    {"cfish_VTable_find_parent_class", "lucy_VTable_find_parent_class"},
+    {"cfish_VTable_foster_obj", "lucy_VTable_foster_obj"},
+    {"cfish_VTable_fresh_host_methods", "lucy_VTable_fresh_host_methods"},
+    {"cfish_VTable_init_obj", "lucy_VTable_init_obj"},
+    {"cfish_VTable_make_obj", "lucy_VTable_make_obj"},
     {"cfish_VTable_offset_of_parent", "lucy_VTable_offset_of_parent"},
+    {"cfish_VTable_register_with_host", "lucy_VTable_register_with_host"},
     {"cfish_VTable_singleton", "lucy_VTable_singleton"},
+    {"cfish_VTable_to_host", "lucy_VTable_to_host"},
     {"Cfish_VTable_Get_Name", "Lucy_VTable_Get_Name"},
     {"Cfish_VTable_Make_Obj", "Lucy_VTable_Make_Obj"},
+    {"Cfish_VTable_To_Host", "Lucy_VTable_To_Host"},
+    {"Cfish_VTable_To_Host_OFFSET", "Lucy_VTable_To_Host_OFFSET"},
+    {"Cfish_VTable_To_Host_t", "Lucy_VTable_To_Host_t"},
 
     {"CFISH_USE_SHORT_NAMES", "LUCY_USE_SHORT_NAMES"},
 

http://git-wip-us.apache.org/repos/asf/lucy/blob/9c65f940/core/Clownfish/CharBuf.c
----------------------------------------------------------------------
diff --git a/core/Clownfish/CharBuf.c b/core/Clownfish/CharBuf.c
index 88474eb..fda1646 100644
--- a/core/Clownfish/CharBuf.c
+++ b/core/Clownfish/CharBuf.c
@@ -133,7 +133,7 @@ CB_hash_sum(CharBuf *self) {
     uint32_t hashvalue = 5381;
     ZombieCharBuf *iterator = ZCB_WRAP(self);
 
-    const CB_Nip_One_t nip_one = METHOD_PTR(iterator->vtable, Lucy_CB_Nip_One);
+    const CB_Nip_One_t nip_one = METHOD_PTR(iterator->vtable, Cfish_CB_Nip_One);
     while (iterator->size) {
         uint32_t code_point = (uint32_t)nip_one((CharBuf*)iterator);
         hashvalue = ((hashvalue << 5) + hashvalue) ^ code_point;

http://git-wip-us.apache.org/repos/asf/lucy/blob/9c65f940/core/Clownfish/CharBuf.cfh
----------------------------------------------------------------------
diff --git a/core/Clownfish/CharBuf.cfh b/core/Clownfish/CharBuf.cfh
index f9d9ab5..6eeca16 100644
--- a/core/Clownfish/CharBuf.cfh
+++ b/core/Clownfish/CharBuf.cfh
@@ -387,13 +387,13 @@ class Clownfish::ZombieCharBuf cnick ZCB
 
 __C__
 
-#define CFISH_ZCB_BLANK() lucy_ZCB_new(alloca(lucy_ZCB_size()))
+#define CFISH_ZCB_BLANK() cfish_ZCB_new(alloca(cfish_ZCB_size()))
 
 #define CFISH_ZCB_WRAP(source) \
-    lucy_ZCB_wrap(alloca(lucy_ZCB_size()), source)
+    cfish_ZCB_wrap(alloca(cfish_ZCB_size()), source)
 
 #define CFISH_ZCB_WRAP_STR(ptr, size) \
-    lucy_ZCB_wrap_str(alloca(lucy_ZCB_size()), ptr, size)
+    cfish_ZCB_wrap_str(alloca(cfish_ZCB_size()), ptr, size)
 
 #ifdef LUCY_USE_SHORT_NAMES
   #define ZCB_BLANK             CFISH_ZCB_BLANK

http://git-wip-us.apache.org/repos/asf/lucy/blob/9c65f940/core/Clownfish/Err.c
----------------------------------------------------------------------
diff --git a/core/Clownfish/Err.c b/core/Clownfish/Err.c
index ee9f930..0a6e979 100644
--- a/core/Clownfish/Err.c
+++ b/core/Clownfish/Err.c
@@ -68,7 +68,7 @@ Err_cat_mess(Err *self, const CharBuf *mess) {
 void
 THROW(VTable *vtable, char *pattern, ...) {
     va_list args;
-    Err_Make_t make = METHOD_PTR(CERTIFY(vtable, VTABLE), Lucy_Err_Make);
+    Err_Make_t make = METHOD_PTR(CERTIFY(vtable, VTABLE), Cfish_Err_Make);
     Err *err = (Err*)CERTIFY(make(NULL), ERR);
     CharBuf *mess = Err_Get_Mess(err);
 
@@ -171,7 +171,7 @@ void
 Err_throw_at(VTable *vtable, const char *file, int line,
              const char *func, const char *pattern, ...) {
     va_list args;
-    Err_Make_t make = METHOD_PTR(CERTIFY(vtable, VTABLE), Lucy_Err_Make);
+    Err_Make_t make = METHOD_PTR(CERTIFY(vtable, VTABLE), Cfish_Err_Make);
     Err *err = (Err*)CERTIFY(make(NULL), ERR);
     CharBuf *mess = Err_Get_Mess(err);
 

http://git-wip-us.apache.org/repos/asf/lucy/blob/9c65f940/core/Clownfish/Err.cfh
----------------------------------------------------------------------
diff --git a/core/Clownfish/Err.cfh b/core/Clownfish/Err.cfh
index 777aab2..80ca136 100644
--- a/core/Clownfish/Err.cfh
+++ b/core/Clownfish/Err.cfh
@@ -18,9 +18,8 @@ parcel Lucy;
 
 __C__
 typedef void 
-(*Lucy_Err_Attempt_t)(void *context);
+(*Cfish_Err_Attempt_t)(void *context);
 
-#define Cfish_Err_Attempt_t Lucy_Err_Attempt_t
 #ifdef LUCY_USE_SHORT_NAMES
   #define Err_Attempt_t Cfish_Err_Attempt_t
 #endif
@@ -181,66 +180,66 @@ __C__
 #endif
 
 #define CFISH_ERR_ADD_FRAME(_error) \
-    Lucy_Err_Add_Frame(_error, __FILE__, __LINE__, \
-                       CFISH_ERR_FUNC_MACRO)
+    Cfish_Err_Add_Frame(_error, __FILE__, __LINE__, \
+                        CFISH_ERR_FUNC_MACRO)
 
 #define CFISH_RETHROW(_error) \
-    lucy_Err_rethrow((lucy_Err*)_error, __FILE__, __LINE__, \
-                     CFISH_ERR_FUNC_MACRO)
+    cfish_Err_rethrow((cfish_Err*)_error, __FILE__, __LINE__, \
+                      CFISH_ERR_FUNC_MACRO)
 
-/** Macro version of lucy_Err_throw_at which inserts contextual information
+/** Macro version of cfish_Err_throw_at which inserts contextual information
  * automatically, provided that the compiler supports the necessary features.
  */
 #ifdef CHY_HAS_VARIADIC_MACROS
  #ifdef CHY_HAS_ISO_VARIADIC_MACROS
   #define CFISH_THROW(_vtable, ...) \
-    lucy_Err_throw_at(_vtable, __FILE__, __LINE__, CFISH_ERR_FUNC_MACRO, \
-                      __VA_ARGS__)
+    cfish_Err_throw_at(_vtable, __FILE__, __LINE__, CFISH_ERR_FUNC_MACRO, \
+                       __VA_ARGS__)
   #define CFISH_WARN(...) \
-    lucy_Err_warn_at(__FILE__, __LINE__, CFISH_ERR_FUNC_MACRO, __VA_ARGS__)
+    cfish_Err_warn_at(__FILE__, __LINE__, CFISH_ERR_FUNC_MACRO, __VA_ARGS__)
   #define CFISH_MAKE_MESS(...) \
-    lucy_Err_make_mess(__FILE__, __LINE__, CFISH_ERR_FUNC_MACRO, \
-                       __VA_ARGS__)
+    cfish_Err_make_mess(__FILE__, __LINE__, CFISH_ERR_FUNC_MACRO, \
+                        __VA_ARGS__)
  #elif defined(CHY_HAS_GNUC_VARIADIC_MACROS)
   #define CFISH_THROW(_vtable, args...) \
-    lucy_Err_throw_at(_vtable, __FILE__, __LINE__, \
-                      CFISH_ERR_FUNC_MACRO, ##args)
+    cfish_Err_throw_at(_vtable, __FILE__, __LINE__, \
+                       CFISH_ERR_FUNC_MACRO, ##args)
   #define CFISH_WARN(args...) \
-    lucy_Err_warn_at(__FILE__, __LINE__, CFISH_ERR_FUNC_MACRO, ##args)
+    cfish_Err_warn_at(__FILE__, __LINE__, CFISH_ERR_FUNC_MACRO, ##args)
   #define CFISH_MAKE_MESS(args...) \
-    lucy_Err_make_mess(__FILE__, __LINE__, CFISH_ERR_FUNC_MACRO, ##args)
+    cfish_Err_make_mess(__FILE__, __LINE__, CFISH_ERR_FUNC_MACRO, ##args)
  #endif
 #else
   void
-  CFISH_THROW(lucy_VTable *vtable, char* format, ...);
+  CFISH_THROW(cfish_VTable *vtable, char* format, ...);
   void
   CFISH_WARN(char* format, ...);
-  lucy_CharBuf*
+  cfish_CharBuf*
   CFISH_MAKE_MESS(char* format, ...);
 #endif
 
 #define CFISH_DOWNCAST(_obj, _vtable) \
-    lucy_Err_downcast((lucy_Obj*)(_obj), (_vtable), \
-                      __FILE__, __LINE__, CFISH_ERR_FUNC_MACRO)
+    cfish_Err_downcast((cfish_Obj*)(_obj), (_vtable), \
+                       __FILE__, __LINE__, CFISH_ERR_FUNC_MACRO)
 
 
 #define CFISH_CERTIFY(_obj, _vtable) \
-    lucy_Err_certify((lucy_Obj*)(_obj), (_vtable), \
-                     __FILE__, __LINE__, CFISH_ERR_FUNC_MACRO)
+    cfish_Err_certify((cfish_Obj*)(_obj), (_vtable), \
+                      __FILE__, __LINE__, CFISH_ERR_FUNC_MACRO)
 
 static CFISH_INLINE void
-lucy_Err_abstract_class_check(lucy_Obj *obj, lucy_VTable *vtable) {
-    lucy_VTable *const my_vtable = (lucy_VTable*)((cfish_Dummy*)obj)->vtable;
+cfish_Err_abstract_class_check(cfish_Obj *obj, cfish_VTable *vtable) {
+    cfish_VTable *const my_vtable = (cfish_VTable*)((cfish_Dummy*)obj)->vtable;
     if (my_vtable == vtable) {
-        lucy_CharBuf *mess = CFISH_MAKE_MESS("%o is an abstract class",
-                                             Lucy_Obj_Get_Class_Name(obj));
-        Lucy_Obj_Dec_RefCount(obj);
-        lucy_Err_throw_mess(LUCY_ERR, mess);
+        cfish_CharBuf *mess = CFISH_MAKE_MESS("%o is an abstract class",
+                                              Cfish_Obj_Get_Class_Name(obj));
+        Cfish_Obj_Dec_RefCount(obj);
+        cfish_Err_throw_mess(CFISH_ERR, mess);
     }
 }
 
 #define CFISH_ABSTRACT_CLASS_CHECK(_obj, _vtable) \
-    lucy_Err_abstract_class_check(((lucy_Obj*)_obj), _vtable)
+    cfish_Err_abstract_class_check(((cfish_Obj*)_obj), _vtable)
 
 #ifdef LUCY_USE_SHORT_NAMES
   #define THROW                 CFISH_THROW

http://git-wip-us.apache.org/repos/asf/lucy/blob/9c65f940/core/Clownfish/Hash.c
----------------------------------------------------------------------
diff --git a/core/Clownfish/Hash.c b/core/Clownfish/Hash.c
index 40c9a0b..59c4854 100644
--- a/core/Clownfish/Hash.c
+++ b/core/Clownfish/Hash.c
@@ -35,7 +35,7 @@
 
 static HashTombStone *TOMBSTONE;
 
-#define HashEntry lucy_HashEntry
+#define HashEntry cfish_HashEntry
 
 typedef struct HashEntry {
     Obj     *key;
@@ -144,7 +144,7 @@ Hash_load(Hash *self, Obj *dump) {
 
         // Dispatch to an alternate Load() method.
         if (vtable) {
-            Obj_Load_t load = METHOD_PTR(vtable, Lucy_Obj_Load);
+            Obj_Load_t load = METHOD_PTR(vtable, Cfish_Obj_Load);
             if (load == Obj_load) {
                 THROW(ERR, "Abstract method Load() not defined for %o",
                       VTable_Get_Name(vtable));

http://git-wip-us.apache.org/repos/asf/lucy/blob/9c65f940/core/Clownfish/LockFreeRegistry.c
----------------------------------------------------------------------
diff --git a/core/Clownfish/LockFreeRegistry.c b/core/Clownfish/LockFreeRegistry.c
index 519dc51..11ab071 100644
--- a/core/Clownfish/LockFreeRegistry.c
+++ b/core/Clownfish/LockFreeRegistry.c
@@ -24,13 +24,13 @@
 #include "Clownfish/Util/Atomic.h"
 #include "Clownfish/Util/Memory.h"
 
-typedef struct lucy_LFRegEntry {
+typedef struct cfish_LFRegEntry {
     Obj *key;
     Obj *value;
     int32_t hash_sum;
-    struct lucy_LFRegEntry *volatile next;
-} lucy_LFRegEntry;
-#define LFRegEntry lucy_LFRegEntry
+    struct cfish_LFRegEntry *volatile next;
+} cfish_LFRegEntry;
+#define LFRegEntry cfish_LFRegEntry
 
 LockFreeRegistry*
 LFReg_new(size_t capacity) {

http://git-wip-us.apache.org/repos/asf/lucy/blob/9c65f940/core/Clownfish/Num.c
----------------------------------------------------------------------
diff --git a/core/Clownfish/Num.c b/core/Clownfish/Num.c
index 8d49ab1..e40f825 100644
--- a/core/Clownfish/Num.c
+++ b/core/Clownfish/Num.c
@@ -438,7 +438,7 @@ Bool_deserialize(BoolNum *self, InStream *instream) {
     bool value = (bool)InStream_Read_U8(instream);
     if (self && self != CFISH_TRUE && self != CFISH_FALSE) {
         Bool_Dec_RefCount_t super_decref
-            = SUPER_METHOD_PTR(BOOLNUM, Lucy_Bool_Dec_RefCount);
+            = SUPER_METHOD_PTR(BOOLNUM, Cfish_Bool_Dec_RefCount);
         super_decref(self);
     }
     return value ? CFISH_TRUE : CFISH_FALSE;

http://git-wip-us.apache.org/repos/asf/lucy/blob/9c65f940/core/Clownfish/Num.cfh
----------------------------------------------------------------------
diff --git a/core/Clownfish/Num.cfh b/core/Clownfish/Num.cfh
index 0ff37be..a684fe1 100644
--- a/core/Clownfish/Num.cfh
+++ b/core/Clownfish/Num.cfh
@@ -300,8 +300,8 @@ class Clownfish::BoolNum cnick Bool inherits Clownfish::IntNum {
 
 __C__
 
-#define CFISH_TRUE  lucy_Bool_true_singleton
-#define CFISH_FALSE lucy_Bool_false_singleton
+#define CFISH_TRUE  cfish_Bool_true_singleton
+#define CFISH_FALSE cfish_Bool_false_singleton
 
 __END_C__
 

http://git-wip-us.apache.org/repos/asf/lucy/blob/9c65f940/core/Clownfish/Obj.cfh
----------------------------------------------------------------------
diff --git a/core/Clownfish/Obj.cfh b/core/Clownfish/Obj.cfh
index a801b48..a7370fb 100644
--- a/core/Clownfish/Obj.cfh
+++ b/core/Clownfish/Obj.cfh
@@ -188,33 +188,33 @@ public class Clownfish::Obj {
 
 __C__
 static CFISH_INLINE void
-lucy_Obj_super_destroy(lucy_Obj *self, lucy_VTable *vtable) {
-    Lucy_Obj_Destroy_t super_destroy
-        = CFISH_SUPER_METHOD_PTR(vtable, Lucy_Obj_Destroy);
+cfish_Obj_super_destroy(cfish_Obj *self, cfish_VTable *vtable) {
+    Cfish_Obj_Destroy_t super_destroy
+        = CFISH_SUPER_METHOD_PTR(vtable, Cfish_Obj_Destroy);
     super_destroy(self);
 }
 
-#define LUCY_SUPER_DESTROY(_self, _vtable) \
-    lucy_Obj_super_destroy((lucy_Obj*)_self, _vtable)
+#define CFISH_SUPER_DESTROY(_self, _vtable) \
+    cfish_Obj_super_destroy((cfish_Obj*)_self, _vtable)
 
-static CFISH_INLINE lucy_Obj*
-lucy_Obj_incref(lucy_Obj *self) {
-    if (self != NULL) { return Lucy_Obj_Inc_RefCount(self); }
+static CFISH_INLINE cfish_Obj*
+cfish_Obj_incref(cfish_Obj *self) {
+    if (self != NULL) { return Cfish_Obj_Inc_RefCount(self); }
     else { return NULL; }
 }
 
-#define CFISH_INCREF(_self) lucy_Obj_incref((lucy_Obj*)_self)
+#define CFISH_INCREF(_self) cfish_Obj_incref((cfish_Obj*)_self)
 
 static CFISH_INLINE uint32_t
-lucy_Obj_decref(lucy_Obj *self) {
-    if (self != NULL) { return Lucy_Obj_Dec_RefCount(self); }
+cfish_Obj_decref(cfish_Obj *self) {
+    if (self != NULL) { return Cfish_Obj_Dec_RefCount(self); }
     else { return 0; }
 }
 
-#define CFISH_DECREF(_self) lucy_Obj_decref((lucy_Obj*)_self)
+#define CFISH_DECREF(_self) cfish_Obj_decref((cfish_Obj*)_self)
 
 #ifdef LUCY_USE_SHORT_NAMES
-  #define SUPER_DESTROY(_self, _vtable)   LUCY_SUPER_DESTROY(_self, _vtable)
+  #define SUPER_DESTROY(_self, _vtable)   CFISH_SUPER_DESTROY(_self, _vtable)
   #define INCREF(_self)                   CFISH_INCREF(_self)
   #define DECREF(_self)                   CFISH_DECREF(_self)
 #endif

http://git-wip-us.apache.org/repos/asf/lucy/blob/9c65f940/core/Clownfish/Util/Atomic.c
----------------------------------------------------------------------
diff --git a/core/Clownfish/Util/Atomic.c b/core/Clownfish/Util/Atomic.c
index 62c43e2..8bf776a 100644
--- a/core/Clownfish/Util/Atomic.c
+++ b/core/Clownfish/Util/Atomic.c
@@ -23,7 +23,7 @@
 #include <windows.h>
 
 bool
-lucy_Atomic_wrapped_cas_ptr(void *volatile *target, void *old_value,
+cfish_Atomic_wrapped_cas_ptr(void *volatile *target, void *old_value,
                             void *new_value) {
     return InterlockedCompareExchangePointer(target, new_value, old_value)
            == old_value;
@@ -33,7 +33,7 @@ lucy_Atomic_wrapped_cas_ptr(void *volatile *target, void *old_value,
 #elif defined(CHY_HAS_PTHREAD_H)
 
 #include <pthread.h>
-pthread_mutex_t lucy_Atomic_mutex = PTHREAD_MUTEX_INITIALIZER;
+pthread_mutex_t cfish_Atomic_mutex = PTHREAD_MUTEX_INITIALIZER;
 
 #endif
 

http://git-wip-us.apache.org/repos/asf/lucy/blob/9c65f940/core/Clownfish/Util/Atomic.cfh
----------------------------------------------------------------------
diff --git a/core/Clownfish/Util/Atomic.cfh b/core/Clownfish/Util/Atomic.cfh
index 91d3d6b..da741ce 100644
--- a/core/Clownfish/Util/Atomic.cfh
+++ b/core/Clownfish/Util/Atomic.cfh
@@ -27,13 +27,13 @@ __C__
  * <code>new_value</code> and return true.  Otherwise, return false.
  */
 static CFISH_INLINE bool
-lucy_Atomic_cas_ptr(void *volatile *target, void *old_value, void *new_value);
+cfish_Atomic_cas_ptr(void *volatile *target, void *old_value, void *new_value);
 
 /************************** Single threaded *******************************/
 #ifdef LUCY_NOTHREADS
 
 static CFISH_INLINE bool
-lucy_Atomic_cas_ptr(void *volatile *target, void *old_value, void *new_value) {
+cfish_Atomic_cas_ptr(void *volatile *target, void *old_value, void *new_value) {
     if (*target == old_value) {
         *target = new_value;
         return true;
@@ -48,7 +48,7 @@ lucy_Atomic_cas_ptr(void *volatile *target, void *old_value, void *new_value) {
 #include <libkern/OSAtomic.h>
 
 static CFISH_INLINE bool
-lucy_Atomic_cas_ptr(void *volatile *target, void *old_value, void *new_value) {
+cfish_Atomic_cas_ptr(void *volatile *target, void *old_value, void *new_value) {
     return OSAtomicCompareAndSwapPtr(old_value, new_value, target);
 }
 
@@ -56,12 +56,12 @@ lucy_Atomic_cas_ptr(void *volatile *target, void *old_value, void *new_value) {
 #elif defined(CHY_HAS_WINDOWS_H)
 
 bool
-lucy_Atomic_wrapped_cas_ptr(void *volatile *target, void *old_value,
+cfish_Atomic_wrapped_cas_ptr(void *volatile *target, void *old_value,
                             void *new_value);
 
 static CFISH_INLINE bool
-lucy_Atomic_cas_ptr(void *volatile *target, void *old_value, void *new_value) {
-    return lucy_Atomic_wrapped_cas_ptr(target, old_value, new_value);
+cfish_Atomic_cas_ptr(void *volatile *target, void *old_value, void *new_value) {
+    return cfish_Atomic_wrapped_cas_ptr(target, old_value, new_value);
 }
 
 /**************************** Solaris 10 and later ************************/
@@ -69,7 +69,7 @@ lucy_Atomic_cas_ptr(void *volatile *target, void *old_value, void *new_value) {
 #include <sys/atomic.h>
 
 static CFISH_INLINE bool
-lucy_Atomic_cas_ptr(void *volatile *target, void *old_value, void *new_value) {
+cfish_Atomic_cas_ptr(void *volatile *target, void *old_value, void *new_value) {
     return atomic_cas_ptr(target, old_value, new_value) == old_value;
 }
 
@@ -77,18 +77,18 @@ lucy_Atomic_cas_ptr(void *volatile *target, void *old_value, void *new_value) {
 #elif defined(CHY_HAS_PTHREAD_H)
 #include <pthread.h>
 
-extern pthread_mutex_t lucy_Atomic_mutex;
+extern pthread_mutex_t cfish_Atomic_mutex;
 
 static CFISH_INLINE bool
-lucy_Atomic_cas_ptr(void *volatile *target, void *old_value, void *new_value) {
-    pthread_mutex_lock(&lucy_Atomic_mutex);
+cfish_Atomic_cas_ptr(void *volatile *target, void *old_value, void *new_value) {
+    pthread_mutex_lock(&cfish_Atomic_mutex);
     if (*target == old_value) {
         *target = new_value;
-        pthread_mutex_unlock(&lucy_Atomic_mutex);
+        pthread_mutex_unlock(&cfish_Atomic_mutex);
         return true;
     }
     else {
-        pthread_mutex_unlock(&lucy_Atomic_mutex);
+        pthread_mutex_unlock(&cfish_Atomic_mutex);
         return false;
     }
 }
@@ -101,7 +101,7 @@ lucy_Atomic_cas_ptr(void *volatile *target, void *old_value, void *new_value) {
 #endif // Big platform if-else chain.
 
 #ifdef LUCY_USE_SHORT_NAMES
-  #define Atomic_cas_ptr lucy_Atomic_cas_ptr
+  #define Atomic_cas_ptr cfish_Atomic_cas_ptr
 #endif
 
 __END_C__

http://git-wip-us.apache.org/repos/asf/lucy/blob/9c65f940/core/Clownfish/Util/Memory.cfh
----------------------------------------------------------------------
diff --git a/core/Clownfish/Util/Memory.cfh b/core/Clownfish/Util/Memory.cfh
index cd249b4..e5ed310 100644
--- a/core/Clownfish/Util/Memory.cfh
+++ b/core/Clownfish/Util/Memory.cfh
@@ -56,16 +56,16 @@ inert class Clownfish::Util::Memory {
 
 __C__
 
-#define LUCY_MALLOCATE    lucy_Memory_wrapped_malloc
-#define LUCY_CALLOCATE    lucy_Memory_wrapped_calloc
-#define LUCY_REALLOCATE   lucy_Memory_wrapped_realloc
-#define LUCY_FREEMEM      lucy_Memory_wrapped_free
+#define CFISH_MALLOCATE    cfish_Memory_wrapped_malloc
+#define CFISH_CALLOCATE    cfish_Memory_wrapped_calloc
+#define CFISH_REALLOCATE   cfish_Memory_wrapped_realloc
+#define CFISH_FREEMEM      cfish_Memory_wrapped_free
 
 #ifdef LUCY_USE_SHORT_NAMES
-  #define MALLOCATE                       LUCY_MALLOCATE
-  #define CALLOCATE                       LUCY_CALLOCATE
-  #define REALLOCATE                      LUCY_REALLOCATE
-  #define FREEMEM                         LUCY_FREEMEM
+  #define MALLOCATE                       CFISH_MALLOCATE
+  #define CALLOCATE                       CFISH_CALLOCATE
+  #define REALLOCATE                      CFISH_REALLOCATE
+  #define FREEMEM                         CFISH_FREEMEM
 #endif
 
 __END_C__

http://git-wip-us.apache.org/repos/asf/lucy/blob/9c65f940/core/Clownfish/Util/NumberUtils.cfh
----------------------------------------------------------------------
diff --git a/core/Clownfish/Util/NumberUtils.cfh b/core/Clownfish/Util/NumberUtils.cfh
index 11a5afd..e94b90c 100644
--- a/core/Clownfish/Util/NumberUtils.cfh
+++ b/core/Clownfish/Util/NumberUtils.cfh
@@ -181,7 +181,7 @@ __C__
 #include <string.h>
 
 static CFISH_INLINE void
-lucy_NumUtil_encode_bigend_u16(uint16_t value, void *dest_ptr) {
+cfish_NumUtil_encode_bigend_u16(uint16_t value, void *dest_ptr) {
     uint8_t *dest = *(uint8_t**)dest_ptr;
 #ifdef CHY_BIG_END
     memcpy(dest, &value, sizeof(uint16_t));
@@ -193,7 +193,7 @@ lucy_NumUtil_encode_bigend_u16(uint16_t value, void *dest_ptr) {
 }
 
 static CFISH_INLINE void
-lucy_NumUtil_encode_bigend_u32(uint32_t value, void *dest_ptr) {
+cfish_NumUtil_encode_bigend_u32(uint32_t value, void *dest_ptr) {
     uint8_t *dest = *(uint8_t**)dest_ptr;
 #ifdef CHY_BIG_END
     memcpy(dest, &value, sizeof(uint32_t));
@@ -207,7 +207,7 @@ lucy_NumUtil_encode_bigend_u32(uint32_t value, void *dest_ptr) {
 }
 
 static CFISH_INLINE void
-lucy_NumUtil_encode_bigend_u64(uint64_t value, void *dest_ptr) {
+cfish_NumUtil_encode_bigend_u64(uint64_t value, void *dest_ptr) {
     uint8_t *dest = *(uint8_t**)dest_ptr;
 #ifdef CHY_BIG_END
     memcpy(dest, &value, sizeof(uint64_t));
@@ -225,14 +225,14 @@ lucy_NumUtil_encode_bigend_u64(uint64_t value, void *dest_ptr) {
 }
 
 static CFISH_INLINE uint16_t
-lucy_NumUtil_decode_bigend_u16(void *source) {
+cfish_NumUtil_decode_bigend_u16(void *source) {
     uint8_t *const buf = (uint8_t*)source;
     return  (buf[0] << 8) |
             (buf[1]);
 }
 
 static CFISH_INLINE uint32_t
-lucy_NumUtil_decode_bigend_u32(void *source) {
+cfish_NumUtil_decode_bigend_u32(void *source) {
     uint8_t *const buf = (uint8_t*)source;
     return  (buf[0]  << 24) |
             (buf[1]  << 16) |
@@ -241,7 +241,7 @@ lucy_NumUtil_decode_bigend_u32(void *source) {
 }
 
 static CFISH_INLINE uint64_t
-lucy_NumUtil_decode_bigend_u64(void *source) {
+cfish_NumUtil_decode_bigend_u64(void *source) {
     uint8_t *const buf = (uint8_t*)source;
     uint64_t high_bits = (buf[0]  << 24) |
                          (buf[1]  << 16) |
@@ -257,55 +257,55 @@ lucy_NumUtil_decode_bigend_u64(void *source) {
 }
 
 static CFISH_INLINE void
-lucy_NumUtil_encode_bigend_f32(float value, void *dest_ptr) {
+cfish_NumUtil_encode_bigend_f32(float value, void *dest_ptr) {
     uint8_t *dest = *(uint8_t**)dest_ptr;
 #ifdef CHY_BIG_END
     memcpy(dest, &value, sizeof(float));
 #else
     union { float f; uint32_t u32; } duo;
     duo.f = value;
-    lucy_NumUtil_encode_bigend_u32(duo.u32, &dest);
+    cfish_NumUtil_encode_bigend_u32(duo.u32, &dest);
 #endif
 }
 
 static CFISH_INLINE void
-lucy_NumUtil_encode_bigend_f64(double value, void *dest_ptr) {
+cfish_NumUtil_encode_bigend_f64(double value, void *dest_ptr) {
     uint8_t *dest = *(uint8_t**)dest_ptr;
 #ifdef CHY_BIG_END
     memcpy(dest, &value, sizeof(double));
 #else
     union { double d; uint64_t u64; } duo;
     duo.d = value;
-    lucy_NumUtil_encode_bigend_u64(duo.u64, &dest);
+    cfish_NumUtil_encode_bigend_u64(duo.u64, &dest);
 #endif
 }
 
 static CFISH_INLINE float
-lucy_NumUtil_decode_bigend_f32(void *source) {
+cfish_NumUtil_decode_bigend_f32(void *source) {
     union { float f; uint32_t u32; } duo;
     memcpy(&duo, source, sizeof(float));
 #ifdef CHY_LITTLE_END
-    duo.u32 = lucy_NumUtil_decode_bigend_u32(&duo.u32);
+    duo.u32 = cfish_NumUtil_decode_bigend_u32(&duo.u32);
 #endif
     return duo.f;
 }
 
 static CFISH_INLINE double
-lucy_NumUtil_decode_bigend_f64(void *source) {
+cfish_NumUtil_decode_bigend_f64(void *source) {
     union { double d; uint64_t u64; } duo;
     memcpy(&duo, source, sizeof(double));
 #ifdef CHY_LITTLE_END
-    duo.u64 = lucy_NumUtil_decode_bigend_u64(&duo.u64);
+    duo.u64 = cfish_NumUtil_decode_bigend_u64(&duo.u64);
 #endif
     return duo.d;
 }
 
-#define LUCY_NUMUTIL_C32_MAX_BYTES  ((sizeof(uint32_t) * 8 / 7) + 1) // 5
-#define LUCY_NUMUTIL_C64_MAX_BYTES ((sizeof(uint64_t) * 8 / 7) + 1)  // 10
+#define CFISH_NUMUTIL_C32_MAX_BYTES  ((sizeof(uint32_t) * 8 / 7) + 1) // 5
+#define CFISH_NUMUTIL_C64_MAX_BYTES ((sizeof(uint64_t) * 8 / 7) + 1)  // 10
 
 static CFISH_INLINE void
-lucy_NumUtil_encode_c32(uint32_t value, char **out_buf) {
-    uint8_t   buf[LUCY_NUMUTIL_C32_MAX_BYTES];
+cfish_NumUtil_encode_c32(uint32_t value, char **out_buf) {
+    uint8_t   buf[CFISH_NUMUTIL_C32_MAX_BYTES];
     uint8_t  *const limit = buf + sizeof(buf);
     uint8_t  *ptr         = limit - 1;
     int       num_bytes;
@@ -323,8 +323,8 @@ lucy_NumUtil_encode_c32(uint32_t value, char **out_buf) {
 }
 
 static CFISH_INLINE void
-lucy_NumUtil_encode_c64(uint64_t value, char **out_buf) {
-    uint8_t   buf[LUCY_NUMUTIL_C64_MAX_BYTES];
+cfish_NumUtil_encode_c64(uint64_t value, char **out_buf) {
+    uint8_t   buf[CFISH_NUMUTIL_C64_MAX_BYTES];
     uint8_t  *const limit = buf + sizeof(buf);
     uint8_t  *ptr         = limit - 1;
     int       num_bytes;
@@ -342,8 +342,8 @@ lucy_NumUtil_encode_c64(uint64_t value, char **out_buf) {
 }
 
 static CFISH_INLINE void
-lucy_NumUtil_encode_padded_c32(uint32_t value, char **out_buf) {
-    uint8_t buf[LUCY_NUMUTIL_C32_MAX_BYTES]
+cfish_NumUtil_encode_padded_c32(uint32_t value, char **out_buf) {
+    uint8_t buf[CFISH_NUMUTIL_C32_MAX_BYTES]
         = { 0x80, 0x80, 0x80, 0x80, 0x80 };
     uint8_t *const limit = buf + sizeof(buf);
     uint8_t *ptr         = limit - 1;
@@ -355,12 +355,12 @@ lucy_NumUtil_encode_padded_c32(uint32_t value, char **out_buf) {
         *--ptr = ((value & 0x7f) | 0x80);
         value >>= 7;
     }
-    memcpy(*out_buf, buf, LUCY_NUMUTIL_C32_MAX_BYTES);
+    memcpy(*out_buf, buf, CFISH_NUMUTIL_C32_MAX_BYTES);
     *out_buf += sizeof(buf);
 }
 
 // Decode a compressed integer up to size of 'var', advancing 'source'
-#define LUCY_NUMUTIL_DECODE_CINT(var, source) \
+#define CFISH_NUMUTIL_DECODE_CINT(var, source) \
     do { \
         var = (*source & 0x7f); \
         while (*source++ & 0x80) { \
@@ -369,76 +369,76 @@ lucy_NumUtil_encode_padded_c32(uint32_t value, char **out_buf) {
     } while (0)
 
 static CFISH_INLINE uint32_t
-lucy_NumUtil_decode_c32(char **source_ptr) {
+cfish_NumUtil_decode_c32(char **source_ptr) {
     char *source = *source_ptr;
     uint32_t decoded;
-    LUCY_NUMUTIL_DECODE_CINT(decoded, source);
+    CFISH_NUMUTIL_DECODE_CINT(decoded, source);
     *source_ptr = source;
     return decoded;
 }
 
 static CFISH_INLINE uint64_t
-lucy_NumUtil_decode_c64(char **source_ptr) {
+cfish_NumUtil_decode_c64(char **source_ptr) {
     char *source = *source_ptr;
     uint64_t decoded;
-    LUCY_NUMUTIL_DECODE_CINT(decoded, source);
+    CFISH_NUMUTIL_DECODE_CINT(decoded, source);
     *source_ptr = source;
     return decoded;
 }
 
 static CFISH_INLINE void
-lucy_NumUtil_skip_cint(char **source_ptr) {
+cfish_NumUtil_skip_cint(char **source_ptr) {
     uint8_t *ptr = *(uint8_t**)source_ptr;
     while ((*ptr++ & 0x80) != 0) { }
     *source_ptr = (char*)ptr;
 }
 
 static CFISH_INLINE bool
-lucy_NumUtil_u1get(void *array, uint32_t tick) {
+cfish_NumUtil_u1get(void *array, uint32_t tick) {
     uint8_t *const u8bits      = (uint8_t*)array;
     const uint32_t byte_offset = tick >> 3;
-    const uint8_t  mask        = lucy_NumUtil_u1masks[tick & 0x7];
+    const uint8_t  mask        = cfish_NumUtil_u1masks[tick & 0x7];
     return !((u8bits[byte_offset] & mask) == 0);
 }
 
 static CFISH_INLINE void
-lucy_NumUtil_u1set(void *array, uint32_t tick) {
+cfish_NumUtil_u1set(void *array, uint32_t tick) {
     uint8_t *const u8bits      = (uint8_t*)array;
     const uint32_t byte_offset = tick >> 3;
-    const uint8_t  mask        = lucy_NumUtil_u1masks[tick & 0x7];
+    const uint8_t  mask        = cfish_NumUtil_u1masks[tick & 0x7];
     u8bits[byte_offset] |= mask;
 }
 
 static CFISH_INLINE void
-lucy_NumUtil_u1clear(void *array, uint32_t tick) {
+cfish_NumUtil_u1clear(void *array, uint32_t tick) {
     uint8_t *const u8bits      = (uint8_t*)array;
     const uint32_t byte_offset = tick >> 3;
-    const uint8_t  mask        = lucy_NumUtil_u1masks[tick & 0x7];
+    const uint8_t  mask        = cfish_NumUtil_u1masks[tick & 0x7];
     u8bits[byte_offset] &= ~mask;
 }
 
 static CFISH_INLINE void
-lucy_NumUtil_u1flip(void *array, uint32_t tick) {
+cfish_NumUtil_u1flip(void *array, uint32_t tick) {
     uint8_t *const u8bits      = (uint8_t*)array;
     const uint32_t byte_offset = tick >> 3;
-    const uint8_t  mask        = lucy_NumUtil_u1masks[tick & 0x7];
+    const uint8_t  mask        = cfish_NumUtil_u1masks[tick & 0x7];
     u8bits[byte_offset] ^= mask;
 }
 
 static CFISH_INLINE uint8_t
-lucy_NumUtil_u2get(void *array, uint32_t tick) {
+cfish_NumUtil_u2get(void *array, uint32_t tick) {
     uint8_t *ints  = (uint8_t*)array;
     uint8_t  byte  = ints[(tick >> 2)];
-    int      shift = lucy_NumUtil_u2shifts[tick & 0x3];
+    int      shift = cfish_NumUtil_u2shifts[tick & 0x3];
     return (byte >> shift) & 0x3;
 }
 
 static CFISH_INLINE void
-lucy_NumUtil_u2set(void *array, uint32_t tick, uint8_t value) {
+cfish_NumUtil_u2set(void *array, uint32_t tick, uint8_t value) {
     uint8_t *ints     = (uint8_t*)array;
     unsigned sub_tick = tick & 0x3;
-    int      shift    = lucy_NumUtil_u2shifts[sub_tick];
-    uint8_t  mask     = lucy_NumUtil_u2masks[sub_tick];
+    int      shift    = cfish_NumUtil_u2shifts[sub_tick];
+    uint8_t  mask     = cfish_NumUtil_u2masks[sub_tick];
     uint8_t  new_val  = value & 0x3;
     uint8_t  new_bits = new_val << shift;
     ints[(tick >> 2)]  = (ints[(tick >> 2)] & ~mask) | new_bits;
@@ -446,27 +446,27 @@ lucy_NumUtil_u2set(void *array, uint32_t tick, uint8_t value) {
 
 
 static CFISH_INLINE uint8_t
-lucy_NumUtil_u4get(void *array, uint32_t tick) {
+cfish_NumUtil_u4get(void *array, uint32_t tick) {
     uint8_t *ints  = (uint8_t*)array;
     uint8_t  byte  = ints[(tick >> 1)];
-    int      shift = lucy_NumUtil_u4shifts[(tick & 1)];
+    int      shift = cfish_NumUtil_u4shifts[(tick & 1)];
     return (byte >> shift) & 0xF;
 }
 
 static CFISH_INLINE void
-lucy_NumUtil_u4set(void *array, uint32_t tick, uint8_t value) {
+cfish_NumUtil_u4set(void *array, uint32_t tick, uint8_t value) {
     uint8_t  *ints     = (uint8_t*)array;
     unsigned  sub_tick = tick & 0x1;
-    int       shift    = lucy_NumUtil_u4shifts[sub_tick];
-    uint8_t   mask     = lucy_NumUtil_u4masks[sub_tick];
+    int       shift    = cfish_NumUtil_u4shifts[sub_tick];
+    uint8_t   mask     = cfish_NumUtil_u4masks[sub_tick];
     uint8_t   new_val  = value & 0xF;
     uint8_t   new_bits = new_val << shift;
     ints[(tick >> 1)]  = (ints[(tick >> 1)] & ~mask) | new_bits;
 }
 
 #ifdef LUCY_USE_SHORT_NAMES
-  #define C32_MAX_BYTES                LUCY_NUMUTIL_C32_MAX_BYTES
-  #define C64_MAX_BYTES                LUCY_NUMUTIL_C64_MAX_BYTES
+  #define C32_MAX_BYTES                CFISH_NUMUTIL_C32_MAX_BYTES
+  #define C64_MAX_BYTES                CFISH_NUMUTIL_C64_MAX_BYTES
 #endif
 
 __END_C__

http://git-wip-us.apache.org/repos/asf/lucy/blob/9c65f940/core/Clownfish/Util/SortUtils.c
----------------------------------------------------------------------
diff --git a/core/Clownfish/Util/SortUtils.c b/core/Clownfish/Util/SortUtils.c
index 3b17077..18eb88d 100644
--- a/core/Clownfish/Util/SortUtils.c
+++ b/core/Clownfish/Util/SortUtils.c
@@ -33,22 +33,22 @@
 // Recursive merge sorting functions.
 static void
 S_msort4(void *velems, void *vscratch, uint32_t left, uint32_t right,
-         Lucy_Sort_Compare_t compare, void *context);
+         Cfish_Sort_Compare_t compare, void *context);
 static void
 S_msort8(void *velems, void *vscratch, uint32_t left, uint32_t right,
-         Lucy_Sort_Compare_t compare, void *context);
+         Cfish_Sort_Compare_t compare, void *context);
 static void
 S_msort_any(void *velems, void *vscratch, uint32_t left, uint32_t right,
-            Lucy_Sort_Compare_t compare, void *context, size_t width);
+            Cfish_Sort_Compare_t compare, void *context, size_t width);
 
 static INLINE void
 SI_merge(void *left_vptr,  uint32_t left_size,
          void *right_vptr, uint32_t right_size,
-         void *vdest, size_t width, Lucy_Sort_Compare_t compare, void *context);
+         void *vdest, size_t width, Cfish_Sort_Compare_t compare, void *context);
 
 void
 Sort_mergesort(void *elems, void *scratch, uint32_t num_elems, uint32_t width,
-               Lucy_Sort_Compare_t compare, void *context) {
+               Cfish_Sort_Compare_t compare, void *context) {
     // Arrays of 0 or 1 items are already sorted.
     if (num_elems < 2) { return; }
 
@@ -79,7 +79,7 @@ Sort_mergesort(void *elems, void *scratch, uint32_t num_elems, uint32_t width,
 void
 Sort_merge(void *left_ptr,  uint32_t left_size,
            void *right_ptr, uint32_t right_size,
-           void *dest, size_t width, Lucy_Sort_Compare_t compare,
+           void *dest, size_t width, Cfish_Sort_Compare_t compare,
            void *context) {
     switch (width) {
         case 0:
@@ -103,7 +103,7 @@ Sort_merge(void *left_ptr,  uint32_t left_size,
 #define WIDTH 4
 static void
 S_msort4(void *velems, void *vscratch, uint32_t left, uint32_t right,
-         Lucy_Sort_Compare_t compare, void *context) {
+         Cfish_Sort_Compare_t compare, void *context) {
     uint8_t *elems   = (uint8_t*)velems;
     uint8_t *scratch = (uint8_t*)vscratch;
     if (right > left) {
@@ -121,7 +121,7 @@ S_msort4(void *velems, void *vscratch, uint32_t left, uint32_t right,
 #define WIDTH 8
 static void
 S_msort8(void *velems, void *vscratch, uint32_t left, uint32_t right,
-         Lucy_Sort_Compare_t compare, void *context) {
+         Cfish_Sort_Compare_t compare, void *context) {
     uint8_t *elems   = (uint8_t*)velems;
     uint8_t *scratch = (uint8_t*)vscratch;
     if (right > left) {
@@ -138,7 +138,7 @@ S_msort8(void *velems, void *vscratch, uint32_t left, uint32_t right,
 #undef WIDTH
 static void
 S_msort_any(void *velems, void *vscratch, uint32_t left, uint32_t right,
-            Lucy_Sort_Compare_t compare, void *context, size_t width) {
+            Cfish_Sort_Compare_t compare, void *context, size_t width) {
     uint8_t *elems   = (uint8_t*)velems;
     uint8_t *scratch = (uint8_t*)vscratch;
     if (right > left) {
@@ -155,7 +155,7 @@ S_msort_any(void *velems, void *vscratch, uint32_t left, uint32_t right,
 static INLINE void
 SI_merge(void *left_vptr,  uint32_t left_size,
          void *right_vptr, uint32_t right_size,
-         void *vdest, size_t width, Lucy_Sort_Compare_t compare,
+         void *vdest, size_t width, Cfish_Sort_Compare_t compare,
          void *context) {
     uint8_t *left_ptr    = (uint8_t*)left_vptr;
     uint8_t *right_ptr   = (uint8_t*)right_vptr;
@@ -188,10 +188,10 @@ SI_merge(void *left_vptr,  uint32_t left_size,
 // Quicksort implementations optimized for four-byte and eight-byte elements.
 static void
 S_qsort4(FOUR_BYTE_TYPE *elems, int32_t left, int32_t right,
-         Lucy_Sort_Compare_t compare, void *context);
+         Cfish_Sort_Compare_t compare, void *context);
 static void
 S_qsort8(EIGHT_BYTE_TYPE *elems, int32_t left, int32_t right,
-         Lucy_Sort_Compare_t compare, void *context);
+         Cfish_Sort_Compare_t compare, void *context);
 
 // Swap two elements.
 static INLINE void
@@ -221,14 +221,14 @@ SI_exchange8(EIGHT_BYTE_TYPE *elems, int32_t left, int32_t right);
  */
 static INLINE FOUR_BYTE_TYPE*
 SI_choose_pivot4(FOUR_BYTE_TYPE *elems, int32_t left, int32_t right,
-                 Lucy_Sort_Compare_t compare, void *context);
+                 Cfish_Sort_Compare_t compare, void *context);
 static INLINE EIGHT_BYTE_TYPE*
 SI_choose_pivot8(EIGHT_BYTE_TYPE *elems, int32_t left, int32_t right,
-                 Lucy_Sort_Compare_t compare, void *context);
+                 Cfish_Sort_Compare_t compare, void *context);
 
 void
 Sort_quicksort(void *elems, size_t num_elems, size_t width,
-               Lucy_Sort_Compare_t compare, void *context) {
+               Cfish_Sort_Compare_t compare, void *context) {
     // Arrays of 0 or 1 items are already sorted.
     if (num_elems < 2) { return; }
 
@@ -260,7 +260,7 @@ SI_exchange4(FOUR_BYTE_TYPE *elems, int32_t left, int32_t right) {
 
 static INLINE FOUR_BYTE_TYPE*
 SI_choose_pivot4(FOUR_BYTE_TYPE *elems, int32_t left, int32_t right,
-                 Lucy_Sort_Compare_t compare, void *context) {
+                 Cfish_Sort_Compare_t compare, void *context) {
     if (right - left > 1) {
         int32_t mid = left + (right - left) / 2;
         if (compare(context, elems + left, elems + mid) > 0) {
@@ -278,7 +278,7 @@ SI_choose_pivot4(FOUR_BYTE_TYPE *elems, int32_t left, int32_t right,
 
 static void
 S_qsort4(FOUR_BYTE_TYPE *elems, int32_t left, int32_t right,
-         Lucy_Sort_Compare_t compare, void *context) {
+         Cfish_Sort_Compare_t compare, void *context) {
     FOUR_BYTE_TYPE *const pivot
         = SI_choose_pivot4(elems, left, right, compare, context);
     int32_t i = left - 1;
@@ -365,7 +365,7 @@ SI_exchange8(EIGHT_BYTE_TYPE *elems, int32_t left, int32_t right) {
 
 static INLINE EIGHT_BYTE_TYPE*
 SI_choose_pivot8(EIGHT_BYTE_TYPE *elems, int32_t left, int32_t right,
-                 Lucy_Sort_Compare_t compare, void *context) {
+                 Cfish_Sort_Compare_t compare, void *context) {
     if (right - left > 1) {
         int32_t mid = left + (right - left) / 2;
         if (compare(context, elems + left, elems + mid) > 0) {
@@ -383,7 +383,7 @@ SI_choose_pivot8(EIGHT_BYTE_TYPE *elems, int32_t left, int32_t right,
 
 static void
 S_qsort8(EIGHT_BYTE_TYPE *elems, int32_t left, int32_t right,
-         Lucy_Sort_Compare_t compare, void *context) {
+         Cfish_Sort_Compare_t compare, void *context) {
     EIGHT_BYTE_TYPE *const pivot
         = SI_choose_pivot8(elems, left, right, compare, context);
     int32_t i = left - 1;

http://git-wip-us.apache.org/repos/asf/lucy/blob/9c65f940/core/Clownfish/Util/SortUtils.cfh
----------------------------------------------------------------------
diff --git a/core/Clownfish/Util/SortUtils.cfh b/core/Clownfish/Util/SortUtils.cfh
index 4071a32..7667e81 100644
--- a/core/Clownfish/Util/SortUtils.cfh
+++ b/core/Clownfish/Util/SortUtils.cfh
@@ -18,7 +18,7 @@ parcel Lucy;
 
 __C__
 typedef int
-(*Lucy_Sort_Compare_t)(void *context, const void *va, const void *vb);
+(*Cfish_Sort_Compare_t)(void *context, const void *va, const void *vb);
 __END_C__
 
 /** Specialized sorting routines.
@@ -38,7 +38,7 @@ inert class Clownfish::Util::SortUtils cnick Sort {
      */
     inert void
     mergesort(void *elems, void *scratch, uint32_t num_elems, uint32_t width,
-              Lucy_Sort_Compare_t compare, void *context);
+              Cfish_Sort_Compare_t compare, void *context);
 
     /** Merge two source arrays together using the classic mergesort merge
      * algorithm, storing the result in <code>dest</code>.
@@ -56,13 +56,13 @@ inert class Clownfish::Util::SortUtils cnick Sort {
     inert void
     merge(void *left_ptr,  uint32_t left_num_elems,
           void *right_ptr, uint32_t right_num_elems,
-          void *dest, size_t width, Lucy_Sort_Compare_t compare, void *context);
+          void *dest, size_t width, Cfish_Sort_Compare_t compare, void *context);
 
     /** Quicksort.
      */
     inert void
     quicksort(void *elems, size_t num_elems, size_t width,
-              Lucy_Sort_Compare_t compare, void *context);
+              Cfish_Sort_Compare_t compare, void *context);
 }
 
 

http://git-wip-us.apache.org/repos/asf/lucy/blob/9c65f940/core/Clownfish/Util/StringHelper.c
----------------------------------------------------------------------
diff --git a/core/Clownfish/Util/StringHelper.c b/core/Clownfish/Util/StringHelper.c
index 58f278d..7726f9d 100644
--- a/core/Clownfish/Util/StringHelper.c
+++ b/core/Clownfish/Util/StringHelper.c
@@ -24,7 +24,7 @@
 #include "Clownfish/Err.h"
 #include "Clownfish/Util/Memory.h"
 
-const uint8_t lucy_StrHelp_UTF8_COUNT[] = {
+const uint8_t cfish_StrHelp_UTF8_COUNT[] = {
     1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
     1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
     1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,

http://git-wip-us.apache.org/repos/asf/lucy/blob/9c65f940/core/Clownfish/Util/StringHelper.cfh
----------------------------------------------------------------------
diff --git a/core/Clownfish/Util/StringHelper.cfh b/core/Clownfish/Util/StringHelper.cfh
index 60d6d78..9d7f4e0 100644
--- a/core/Clownfish/Util/StringHelper.cfh
+++ b/core/Clownfish/Util/StringHelper.cfh
@@ -74,9 +74,9 @@ __C__
 /** The maximum number of bytes encoded by to_base36(), including the
  * terminating NULL.
  */
-#define lucy_StrHelp_MAX_BASE36_BYTES 14
+#define cfish_StrHelp_MAX_BASE36_BYTES 14
 #ifdef LUCY_USE_SHORT_NAMES
-  #define StrHelp_MAX_BASE36_BYTES lucy_StrHelp_MAX_BASE36_BYTES
+  #define StrHelp_MAX_BASE36_BYTES cfish_StrHelp_MAX_BASE36_BYTES
 #endif
 __END_C__
 

http://git-wip-us.apache.org/repos/asf/lucy/blob/9c65f940/core/Clownfish/VArray.c
----------------------------------------------------------------------
diff --git a/core/Clownfish/VArray.c b/core/Clownfish/VArray.c
index 08314cf..7da0d33 100644
--- a/core/Clownfish/VArray.c
+++ b/core/Clownfish/VArray.c
@@ -307,7 +307,7 @@ S_default_compare(void *context, const void *va, const void *vb) {
 }
 
 void
-VA_sort(VArray *self, Lucy_Sort_Compare_t compare, void *context) {
+VA_sort(VArray *self, Cfish_Sort_Compare_t compare, void *context) {
     if (!compare) { compare = S_default_compare; }
     Sort_quicksort(self->elems, self->size, sizeof(void*), compare, context);
 }
@@ -332,7 +332,7 @@ VA_equals(VArray *self, Obj *other) {
 }
 
 VArray*
-VA_gather(VArray *self, Lucy_VA_Gather_Test_t test, void *data) {
+VA_gather(VArray *self, VA_Gather_Test_t test, void *data) {
     VArray *gathered = VA_new(self->size);
     for (uint32_t i = 0, max = self->size; i < max; i++) {
         if (test(self, i, data)) {

http://git-wip-us.apache.org/repos/asf/lucy/blob/9c65f940/core/Clownfish/VArray.cfh
----------------------------------------------------------------------
diff --git a/core/Clownfish/VArray.cfh b/core/Clownfish/VArray.cfh
index e6f8741..f36e31d 100644
--- a/core/Clownfish/VArray.cfh
+++ b/core/Clownfish/VArray.cfh
@@ -20,10 +20,10 @@ __C__
 #include "Clownfish/Util/SortUtils.h"
 
 typedef bool
-(*Lucy_VA_Gather_Test_t)(lucy_VArray *self, uint32_t tick, void *data);
+(*Cfish_VA_Gather_Test_t)(cfish_VArray *self, uint32_t tick, void *data);
 
 #ifdef LUCY_USE_SHORT_NAMES
-  #define Lucy_VA_Gather_Test_t Lucy_VA_Gather_Test_t
+  #define VA_Gather_Test_t Cfish_VA_Gather_Test_t
 #endif
 __END_C__
 
@@ -119,7 +119,7 @@ class Clownfish::VArray cnick VA inherits Clownfish::Obj {
      * @param context Argument supplied to the comparison routine.
      */
     void
-    Sort(VArray *self, Lucy_Sort_Compare_t compare = NULL,
+    Sort(VArray *self, Cfish_Sort_Compare_t compare = NULL,
          void *context = NULL);
 
     /** Set the size for the VArray.  If the new size is larger than the
@@ -147,7 +147,7 @@ class Clownfish::VArray cnick VA inherits Clownfish::Obj {
     /** Return all elements for which <code>test</code> returns true.
      */
     public incremented VArray*
-    Gather(VArray *self, Lucy_VA_Gather_Test_t test, void *data);
+    Gather(VArray *self, Cfish_VA_Gather_Test_t test, void *data);
 
     /** Return a new array consisting of elements from a contiguous slice.  If
      * the specified range is out of bounds, return an array with fewer

http://git-wip-us.apache.org/repos/asf/lucy/blob/9c65f940/core/Clownfish/VTable.c
----------------------------------------------------------------------
diff --git a/core/Clownfish/VTable.c b/core/Clownfish/VTable.c
index 7abdb8e..dbc5715 100644
--- a/core/Clownfish/VTable.c
+++ b/core/Clownfish/VTable.c
@@ -278,7 +278,7 @@ VTable_singleton(const CharBuf *class_name, VTable *parent) {
 
 Obj*
 VTable_load_obj(VTable *self, Obj *dump) {
-    Obj_Load_t load = METHOD_PTR(self, Lucy_Obj_Load);
+    Obj_Load_t load = METHOD_PTR(self, Cfish_Obj_Load);
     if (load == Obj_load) {
         THROW(ERR, "Abstract method Load() not defined for %o", self->name);
     }

http://git-wip-us.apache.org/repos/asf/lucy/blob/9c65f940/core/Lucy/Plan/FieldType.cfh
----------------------------------------------------------------------
diff --git a/core/Lucy/Plan/FieldType.cfh b/core/Lucy/Plan/FieldType.cfh
index 7f3df32..bad2186 100644
--- a/core/Lucy/Plan/FieldType.cfh
+++ b/core/Lucy/Plan/FieldType.cfh
@@ -169,7 +169,7 @@ __C__
 
 static CFISH_INLINE int32_t
 lucy_FType_null_back_compare_values(lucy_FieldType *self,
-                                    lucy_Obj *a, lucy_Obj *b) {
+                                    cfish_Obj *a, cfish_Obj *b) {
     if (a == NULL) {
         if (b == NULL) { return 0; }
         else { return 1; }

http://git-wip-us.apache.org/repos/asf/lucy/blob/9c65f940/core/Lucy/Test.cfh
----------------------------------------------------------------------
diff --git a/core/Lucy/Test.cfh b/core/Lucy/Test.cfh
index 34775fa..661b6a0 100644
--- a/core/Lucy/Test.cfh
+++ b/core/Lucy/Test.cfh
@@ -28,14 +28,14 @@ inert class Lucy::Test {
 
 __C__
 #ifdef LUCY_USE_SHORT_NAMES
-  #define TEST_TRUE                    lucy_TestBatch_test_true
-  #define TEST_FALSE                   lucy_TestBatch_test_false
-  #define TEST_INT_EQ                  lucy_TestBatch_test_int_equals
-  #define TEST_FLOAT_EQ                lucy_TestBatch_test_float_equals
-  #define TEST_STR_EQ                  lucy_TestBatch_test_string_equals
-  #define PASS                         lucy_TestBatch_pass
-  #define FAIL                         lucy_TestBatch_fail
-  #define SKIP                         lucy_TestBatch_skip
+  #define TEST_TRUE                    cfish_TestBatch_test_true
+  #define TEST_FALSE                   cfish_TestBatch_test_false
+  #define TEST_INT_EQ                  cfish_TestBatch_test_int_equals
+  #define TEST_FLOAT_EQ                cfish_TestBatch_test_float_equals
+  #define TEST_STR_EQ                  cfish_TestBatch_test_string_equals
+  #define PASS                         cfish_TestBatch_pass
+  #define FAIL                         cfish_TestBatch_fail
+  #define SKIP                         cfish_TestBatch_skip
 #endif
 __END_C__
 

http://git-wip-us.apache.org/repos/asf/lucy/blob/9c65f940/core/Lucy/Test/Index/TestTermInfo.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Test/Index/TestTermInfo.c b/core/Lucy/Test/Index/TestTermInfo.c
index c6f996b..9de3a08 100644
--- a/core/Lucy/Test/Index/TestTermInfo.c
+++ b/core/Lucy/Test/Index/TestTermInfo.c
@@ -42,7 +42,7 @@ test_freqfilepos(TestBatch *batch) {
 
     TermInfo* cloned_tinfo = TInfo_Clone(tinfo);
 
-    TEST_FALSE(batch, Lucy_TInfo_Equals(tinfo, (lucy_Obj*)cloned_tinfo),"the clone should be a separate C struct");
+    TEST_FALSE(batch, Lucy_TInfo_Equals(tinfo, (Obj*)cloned_tinfo),"the clone should be a separate C struct");
     TEST_INT_EQ(batch, TInfo_Get_Doc_Freq(tinfo), 10, "new sets doc_freq correctly" );
     TEST_INT_EQ(batch, TInfo_Get_Doc_Freq(tinfo), 10, "... doc_freq cloned" );
     TEST_INT_EQ(batch, TInfo_Get_Post_FilePos(tinfo), 20, "... post_filepos cloned" );

http://git-wip-us.apache.org/repos/asf/lucy/blob/9c65f940/core/Lucy/Util/Json.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Util/Json.c b/core/Lucy/Util/Json.c
index c0885c8..154c38d 100644
--- a/core/Lucy/Util/Json.c
+++ b/core/Lucy/Util/Json.c
@@ -30,7 +30,7 @@
 void*
 LucyParseJsonAlloc(void * (*allocate)(size_t));
 void
-LucyParseJson(void *json_parser, int token_type, lucy_Obj *value,
+LucyParseJson(void *json_parser, int token_type, Obj *value,
               lucy_JsonParserState *state);
 void
 LucyParseJsonFree(void *json_parser, void(*freemem)(void*));
@@ -368,14 +368,14 @@ S_to_json(Obj *dump, CharBuf *json, int32_t depth) {
 
 static Obj*
 S_parse_json(char *text, size_t size) {
-    void *json_parser = LucyParseJsonAlloc(lucy_Memory_wrapped_malloc);
+    void *json_parser = LucyParseJsonAlloc(Memory_wrapped_malloc);
     if (json_parser == NULL) {
         CharBuf *mess = MAKE_MESS("Failed to allocate JSON parser");
         Err_set_error(Err_new(mess));
         return NULL;
     }
     Obj *dump = S_do_parse_json(json_parser, text, size);
-    LucyParseJsonFree(json_parser, lucy_Memory_wrapped_free);
+    LucyParseJsonFree(json_parser, Memory_wrapped_free);
     return dump;
 }
 

http://git-wip-us.apache.org/repos/asf/lucy/blob/9c65f940/core/Lucy/Util/Json.cfh
----------------------------------------------------------------------
diff --git a/core/Lucy/Util/Json.cfh b/core/Lucy/Util/Json.cfh
index 3dcd0a9..f872438 100644
--- a/core/Lucy/Util/Json.cfh
+++ b/core/Lucy/Util/Json.cfh
@@ -62,8 +62,8 @@ __C__
 
 struct lucy_JsonParserState 
 {
-    lucy_Obj   *result;
-    bool    errors;
+    cfish_Obj *result;
+    bool       errors;
 };
 typedef struct lucy_JsonParserState lucy_JsonParserState;
 

http://git-wip-us.apache.org/repos/asf/lucy/blob/9c65f940/core/Lucy/Util/SortExternal.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Util/SortExternal.c b/core/Lucy/Util/SortExternal.c
index 4f530f7..1a220ed 100644
--- a/core/Lucy/Util/SortExternal.c
+++ b/core/Lucy/Util/SortExternal.c
@@ -125,8 +125,8 @@ SortEx_sort_cache(SortExternal *self) {
     }
     if (self->cache_max != 0) {
         VTable *vtable = SortEx_Get_VTable(self);
-        Lucy_Sort_Compare_t compare
-            = (Lucy_Sort_Compare_t)METHOD_PTR(vtable, Lucy_SortEx_Compare);
+        Cfish_Sort_Compare_t compare
+            = (Cfish_Sort_Compare_t)METHOD_PTR(vtable, Lucy_SortEx_Compare);
         if (self->scratch_cap < self->cache_cap) {
             self->scratch_cap = self->cache_cap;
             self->scratch = (uint8_t*)REALLOCATE(
@@ -219,8 +219,8 @@ S_absorb_slices(SortExternal *self, uint8_t *endpost) {
     uint8_t   **slice_starts = self->slice_starts;
     uint32_t   *slice_sizes  = self->slice_sizes;
     VTable     *vtable       = SortEx_Get_VTable(self);
-    Lucy_Sort_Compare_t compare
-        = (Lucy_Sort_Compare_t)METHOD_PTR(vtable, Lucy_SortEx_Compare);
+    Cfish_Sort_Compare_t compare
+        = (Cfish_Sort_Compare_t)METHOD_PTR(vtable, Lucy_SortEx_Compare);
 
     if (self->cache_max != 0) { THROW(ERR, "Can't refill unless empty"); }
 

http://git-wip-us.apache.org/repos/asf/lucy/blob/9c65f940/perl/buildlib/Lucy/Build/Binding/Object.pm
----------------------------------------------------------------------
diff --git a/perl/buildlib/Lucy/Build/Binding/Object.pm b/perl/buildlib/Lucy/Build/Binding/Object.pm
index 8adbbfe..ba9f957 100644
--- a/perl/buildlib/Lucy/Build/Binding/Object.pm
+++ b/perl/buildlib/Lucy/Build/Binding/Object.pm
@@ -333,7 +333,7 @@ CODE:
     }
     if (ints_av && SvTYPE(ints_av) == SVt_PVAV) {
         int32_t size  = av_len(ints_av) + 1;
-        int32_t *ints = (int32_t*)LUCY_MALLOCATE(size * sizeof(int32_t));
+        int32_t *ints = (int32_t*)CFISH_MALLOCATE(size * sizeof(int32_t));
         int32_t i;
 
         for (i = 0; i < size; i++) {

http://git-wip-us.apache.org/repos/asf/lucy/blob/9c65f940/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 6820869..237e93d 100644
--- a/perl/buildlib/Lucy/Build/Binding/Util.pm
+++ b/perl/buildlib/Lucy/Build/Binding/Util.pm
@@ -221,7 +221,7 @@ to_base36(num)
     uint64_t num;
 CODE:
 {
-    char base36[lucy_StrHelp_MAX_BASE36_BYTES];
+    char base36[cfish_StrHelp_MAX_BASE36_BYTES];
     size_t size = lucy_StrHelp_to_base36(num, &base36);
     RETVAL = newSVpvn(base36, size);
 }

http://git-wip-us.apache.org/repos/asf/lucy/blob/9c65f940/perl/xs/Lucy/Analysis/RegexTokenizer.c
----------------------------------------------------------------------
diff --git a/perl/xs/Lucy/Analysis/RegexTokenizer.c b/perl/xs/Lucy/Analysis/RegexTokenizer.c
index e386cf6..211e461 100644
--- a/perl/xs/Lucy/Analysis/RegexTokenizer.c
+++ b/perl/xs/Lucy/Analysis/RegexTokenizer.c
@@ -127,7 +127,7 @@ void
 lucy_RegexTokenizer_destroy(lucy_RegexTokenizer *self) {
     CFISH_DECREF(self->pattern);
     ReREFCNT_dec(((REGEXP*)self->token_re));
-    LUCY_SUPER_DESTROY(self, LUCY_REGEXTOKENIZER);
+    CFISH_SUPER_DESTROY(self, LUCY_REGEXTOKENIZER);
 }
 
 void

http://git-wip-us.apache.org/repos/asf/lucy/blob/9c65f940/perl/xs/Lucy/Document/Doc.c
----------------------------------------------------------------------
diff --git a/perl/xs/Lucy/Document/Doc.c b/perl/xs/Lucy/Document/Doc.c
index 0f0de76..aa3e4df 100644
--- a/perl/xs/Lucy/Document/Doc.c
+++ b/perl/xs/Lucy/Document/Doc.c
@@ -237,7 +237,7 @@ lucy_Doc_equals(lucy_Doc *self, lucy_Obj *other) {
 void
 lucy_Doc_destroy(lucy_Doc *self) {
     if (self->fields) { SvREFCNT_dec((SV*)self->fields); }
-    LUCY_SUPER_DESTROY(self, LUCY_DOC);
+    CFISH_SUPER_DESTROY(self, LUCY_DOC);
 }
 
 

http://git-wip-us.apache.org/repos/asf/lucy/blob/9c65f940/perl/xs/XSBind.c
----------------------------------------------------------------------
diff --git a/perl/xs/XSBind.c b/perl/xs/XSBind.c
index 3261069..8352355 100644
--- a/perl/xs/XSBind.c
+++ b/perl/xs/XSBind.c
@@ -542,7 +542,7 @@ XSBind_allot_params(SV** stack, int32_t start, int32_t num_stack_elems, ...) {
             if (SvCUR(key_sv) == (STRLEN)label_len) {
                 if (memcmp(SvPVX(key_sv), label, label_len) == 0) {
                     found_arg = tick;
-                    lucy_NumUtil_u1set(verified_labels, tick);
+                    cfish_NumUtil_u1set(verified_labels, tick);
                 }
             }
         }
@@ -573,7 +573,7 @@ XSBind_allot_params(SV** stack, int32_t start, int32_t num_stack_elems, ...) {
 
     // Ensure that all parameter labels were valid.
     for (int32_t tick = start; tick < num_stack_elems; tick += 2) {
-        if (!lucy_NumUtil_u1get(verified_labels, tick)) {
+        if (!cfish_NumUtil_u1get(verified_labels, tick)) {
             SV *const key_sv = stack[tick];
             char *key = SvPV_nolen(key_sv);
             cfish_CharBuf *mess
@@ -594,7 +594,7 @@ XSBind_allot_params(SV** stack, int32_t start, int32_t num_stack_elems, ...) {
 /**************************** Clownfish::Obj *******************************/
 
 static void
-S_lazy_init_host_obj(lucy_Obj *self) {
+S_lazy_init_host_obj(cfish_Obj *self) {
     SV *inner_obj = newSV(0);
     SvOBJECT_on(inner_obj);
 #if (PERL_VERSION <= 16)
@@ -604,9 +604,9 @@ S_lazy_init_host_obj(lucy_Obj *self) {
     sv_setiv(inner_obj, PTR2IV(self));
 
     // Connect class association.
-    lucy_CharBuf *class_name = Lucy_VTable_Get_Name(self->vtable);
-    HV *stash = gv_stashpvn((char*)Lucy_CB_Get_Ptr8(class_name),
-                            Lucy_CB_Get_Size(class_name), TRUE);
+    cfish_CharBuf *class_name = Cfish_VTable_Get_Name(self->vtable);
+    HV *stash = gv_stashpvn((char*)Cfish_CB_Get_Ptr8(class_name),
+                            Cfish_CB_Get_Size(class_name), TRUE);
     SvSTASH_set(inner_obj, (HV*)SvREFCNT_inc(stash));
 
     /* Up till now we've been keeping track of the refcount in
@@ -620,17 +620,17 @@ S_lazy_init_host_obj(lucy_Obj *self) {
 }
 
 uint32_t
-lucy_Obj_get_refcount(lucy_Obj *self) {
+cfish_Obj_get_refcount(cfish_Obj *self) {
     return self->ref.count & XSBIND_REFCOUNT_FLAG
            ? self->ref.count >> XSBIND_REFCOUNT_SHIFT
            : SvREFCNT((SV*)self->ref.host_obj);
 }
 
-lucy_Obj*
-lucy_Obj_inc_refcount(lucy_Obj *self) {
+cfish_Obj*
+cfish_Obj_inc_refcount(cfish_Obj *self) {
     if (self->ref.count & XSBIND_REFCOUNT_FLAG) {
         if (self->ref.count == XSBIND_REFCOUNT_FLAG) {
-            CFISH_THROW(LUCY_ERR, "Illegal refcount of 0");
+            CFISH_THROW(CFISH_ERR, "Illegal refcount of 0");
         }
         self->ref.count += 1 << XSBIND_REFCOUNT_SHIFT;
     }
@@ -641,16 +641,16 @@ lucy_Obj_inc_refcount(lucy_Obj *self) {
 }
 
 uint32_t
-lucy_Obj_dec_refcount(lucy_Obj *self) {
+cfish_Obj_dec_refcount(cfish_Obj *self) {
     uint32_t modified_refcount = I32_MAX;
     if (self->ref.count & XSBIND_REFCOUNT_FLAG) {
         if (self->ref.count == XSBIND_REFCOUNT_FLAG) {
-            CFISH_THROW(LUCY_ERR, "Illegal refcount of 0");
+            CFISH_THROW(CFISH_ERR, "Illegal refcount of 0");
         }
         if (self->ref.count
             == ((1 << XSBIND_REFCOUNT_SHIFT) | XSBIND_REFCOUNT_FLAG)) {
             modified_refcount = 0;
-            Lucy_Obj_Destroy(self);
+            Cfish_Obj_Destroy(self);
         }
         else {
             self->ref.count -= 1 << XSBIND_REFCOUNT_SHIFT;
@@ -667,34 +667,34 @@ lucy_Obj_dec_refcount(lucy_Obj *self) {
 }
 
 void*
-lucy_Obj_to_host(lucy_Obj *self) {
+cfish_Obj_to_host(cfish_Obj *self) {
     if (self->ref.count & XSBIND_REFCOUNT_FLAG) { S_lazy_init_host_obj(self); }
     return newRV_inc((SV*)self->ref.host_obj);
 }
 
 /*************************** Clownfish::VTable ******************************/
 
-lucy_Obj*
-lucy_VTable_make_obj(lucy_VTable *self) {
-    lucy_Obj *obj
-        = (lucy_Obj*)lucy_Memory_wrapped_calloc(self->obj_alloc_size, 1);
+cfish_Obj*
+cfish_VTable_make_obj(cfish_VTable *self) {
+    cfish_Obj *obj
+        = (cfish_Obj*)cfish_Memory_wrapped_calloc(self->obj_alloc_size, 1);
     obj->vtable = self;
     obj->ref.count = (1 << XSBIND_REFCOUNT_SHIFT) | XSBIND_REFCOUNT_FLAG;
     return obj;
 }
 
-lucy_Obj*
-lucy_VTable_init_obj(lucy_VTable *self, void *allocation) {
-    lucy_Obj *obj = (lucy_Obj*)allocation;
+cfish_Obj*
+cfish_VTable_init_obj(cfish_VTable *self, void *allocation) {
+    cfish_Obj *obj = (cfish_Obj*)allocation;
     obj->vtable = self;
     obj->ref.count = (1 << XSBIND_REFCOUNT_SHIFT) | XSBIND_REFCOUNT_FLAG;
     return obj;
 }
 
-lucy_Obj*
-lucy_VTable_foster_obj(lucy_VTable *self, void *host_obj) {
-    lucy_Obj *obj
-        = (lucy_Obj*)lucy_Memory_wrapped_calloc(self->obj_alloc_size, 1);
+cfish_Obj*
+cfish_VTable_foster_obj(cfish_VTable *self, void *host_obj) {
+    cfish_Obj *obj
+        = (cfish_Obj*)cfish_Memory_wrapped_calloc(self->obj_alloc_size, 1);
     SV *inner_obj = SvRV((SV*)host_obj);
     obj->vtable = self;
     sv_setiv(inner_obj, PTR2IV(obj));
@@ -703,22 +703,22 @@ lucy_VTable_foster_obj(lucy_VTable *self, void *host_obj) {
 }
 
 void
-lucy_VTable_register_with_host(lucy_VTable *singleton, lucy_VTable *parent) {
+cfish_VTable_register_with_host(cfish_VTable *singleton, cfish_VTable *parent) {
     dSP;
     ENTER;
     SAVETMPS;
     EXTEND(SP, 2);
     PUSHMARK(SP);
-    mPUSHs((SV*)Lucy_VTable_To_Host(singleton));
-    mPUSHs((SV*)Lucy_VTable_To_Host(parent));
+    mPUSHs((SV*)Cfish_VTable_To_Host(singleton));
+    mPUSHs((SV*)Cfish_VTable_To_Host(parent));
     PUTBACK;
     call_pv("Clownfish::VTable::_register", G_VOID | G_DISCARD);
     FREETMPS;
     LEAVE;
 }
 
-lucy_VArray*
-lucy_VTable_fresh_host_methods(const lucy_CharBuf *class_name) {
+cfish_VArray*
+cfish_VTable_fresh_host_methods(const cfish_CharBuf *class_name) {
     dSP;
     ENTER;
     SAVETMPS;
@@ -735,8 +735,8 @@ lucy_VTable_fresh_host_methods(const lucy_CharBuf *class_name) {
     return methods;
 }
 
-lucy_CharBuf*
-lucy_VTable_find_parent_class(const lucy_CharBuf *class_name) {
+cfish_CharBuf*
+cfish_VTable_find_parent_class(const cfish_CharBuf *class_name) {
     dSP;
     ENTER;
     SAVETMPS;
@@ -756,10 +756,10 @@ lucy_VTable_find_parent_class(const lucy_CharBuf *class_name) {
 }
 
 void*
-lucy_VTable_to_host(lucy_VTable *self) {
+cfish_VTable_to_host(cfish_VTable *self) {
     bool first_time = self->ref.count & XSBIND_REFCOUNT_FLAG ? true : false;
-    Lucy_VTable_To_Host_t to_host
-        = CFISH_SUPER_METHOD_PTR(LUCY_VTABLE, Lucy_VTable_To_Host);
+    Cfish_VTable_To_Host_t to_host
+        = CFISH_SUPER_METHOD_PTR(CFISH_VTABLE, Cfish_VTable_To_Host);
     SV *host_obj = (SV*)to_host(self);
     if (first_time) {
         SvSHARE((SV*)self->ref.host_obj);
@@ -774,7 +774,7 @@ lucy_VTable_to_host(lucy_VTable *self) {
 // so that it can be run inside a Perl eval block.
 static SV *attempt_xsub = NULL;
 
-XS(lucy_Err_attempt_via_xs) {
+XS(cfish_Err_attempt_via_xs) {
     dXSARGS;
     CHY_UNUSED_VAR(cv);
     SP -= items;
@@ -790,13 +790,13 @@ XS(lucy_Err_attempt_via_xs) {
 }
 
 void
-lucy_Err_init_class(void) {
+cfish_Err_init_class(void) {
     char *file = (char*)__FILE__;
-    attempt_xsub = (SV*)newXS(NULL, lucy_Err_attempt_via_xs, file);
+    attempt_xsub = (SV*)newXS(NULL, cfish_Err_attempt_via_xs, file);
 }
 
-lucy_Err*
-lucy_Err_get_error() {
+cfish_Err*
+cfish_Err_get_error() {
     dSP;
     ENTER;
     SAVETMPS;
@@ -812,7 +812,7 @@ lucy_Err_get_error() {
 }
 
 void
-lucy_Err_set_error(lucy_Err *error) {
+cfish_Err_set_error(cfish_Err *error) {
     dSP;
     ENTER;
     SAVETMPS;
@@ -820,7 +820,7 @@ lucy_Err_set_error(lucy_Err *error) {
     PUSHMARK(SP);
     PUSHmortal;
     if (error) {
-        mPUSHs((SV*)Lucy_Err_To_Host(error));
+        mPUSHs((SV*)Cfish_Err_To_Host(error));
     }
     else {
         PUSHmortal;
@@ -832,9 +832,9 @@ lucy_Err_set_error(lucy_Err *error) {
 }
 
 void
-lucy_Err_do_throw(lucy_Err *err) {
+cfish_Err_do_throw(cfish_Err *err) {
     dSP;
-    SV *error_sv = (SV*)Lucy_Err_To_Host(err);
+    SV *error_sv = (SV*)Cfish_Err_To_Host(err);
     CFISH_DECREF(err);
     ENTER;
     SAVETMPS;
@@ -847,35 +847,35 @@ lucy_Err_do_throw(lucy_Err *err) {
 }
 
 void*
-lucy_Err_to_host(lucy_Err *self) {
-    Lucy_Err_To_Host_t super_to_host
-        = CFISH_SUPER_METHOD_PTR(LUCY_ERR, Lucy_Err_To_Host);
+cfish_Err_to_host(cfish_Err *self) {
+    Cfish_Err_To_Host_t super_to_host
+        = CFISH_SUPER_METHOD_PTR(CFISH_ERR, Cfish_Err_To_Host);
     SV *perl_obj = (SV*)super_to_host(self);
     XSBind_enable_overload(perl_obj);
     return perl_obj;
 }
 
 void
-lucy_Err_throw_mess(lucy_VTable *vtable, lucy_CharBuf *message) {
-    Lucy_Err_Make_t make
-        = CFISH_METHOD_PTR(CFISH_CERTIFY(vtable, LUCY_VTABLE), Lucy_Err_Make);
-    lucy_Err *err = (lucy_Err*)CFISH_CERTIFY(make(NULL), LUCY_ERR);
-    Lucy_Err_Cat_Mess(err, message);
+cfish_Err_throw_mess(cfish_VTable *vtable, cfish_CharBuf *message) {
+    Cfish_Err_Make_t make
+        = CFISH_METHOD_PTR(CFISH_CERTIFY(vtable, CFISH_VTABLE), Cfish_Err_Make);
+    cfish_Err *err = (cfish_Err*)CFISH_CERTIFY(make(NULL), CFISH_ERR);
+    Cfish_Err_Cat_Mess(err, message);
     CFISH_DECREF(message);
-    lucy_Err_do_throw(err);
+    cfish_Err_do_throw(err);
 }
 
 void
-lucy_Err_warn_mess(lucy_CharBuf *message) {
+cfish_Err_warn_mess(cfish_CharBuf *message) {
     SV *error_sv = XSBind_cb_to_sv(message);
     CFISH_DECREF(message);
     warn("%s", SvPV_nolen(error_sv));
     SvREFCNT_dec(error_sv);
 }
 
-lucy_Err*
-lucy_Err_trap(Cfish_Err_Attempt_t routine, void *context) {
-    lucy_Err *error = NULL;
+cfish_Err*
+cfish_Err_trap(Cfish_Err_Attempt_t routine, void *context) {
+    cfish_Err *error = NULL;
     SV *routine_sv = newSViv(PTR2IV(routine));
     SV *context_sv = newSViv(PTR2IV(context));
     dSP;
@@ -889,10 +889,10 @@ lucy_Err_trap(Cfish_Err_Attempt_t routine, void *context) {
 
     int count = call_sv(attempt_xsub, G_EVAL | G_DISCARD);
     if (count != 0) {
-        lucy_CharBuf *mess
-            = lucy_CB_newf("'attempt' returned too many values: %i32",
+        cfish_CharBuf *mess
+            = cfish_CB_newf("'attempt' returned too many values: %i32",
                            (int32_t)count);
-        error = lucy_Err_new(mess);
+        error = cfish_Err_new(mess);
     }
     else {
         SV *dollar_at = get_sv("@", FALSE);
@@ -901,14 +901,14 @@ lucy_Err_trap(Cfish_Err_Attempt_t routine, void *context) {
                 && sv_derived_from(dollar_at,"Clownfish::Err")
                ) {
                 IV error_iv = SvIV(SvRV(dollar_at));
-                error = INT2PTR(lucy_Err*, error_iv);
+                error = INT2PTR(cfish_Err*, error_iv);
                 CFISH_INCREF(error);
             }
             else {
                 STRLEN len;
                 char *ptr = SvPVutf8(dollar_at, len);
-                lucy_CharBuf *mess = lucy_CB_new_from_trusted_utf8(ptr, len);
-                error = lucy_Err_new(mess);
+                cfish_CharBuf *mess = cfish_CB_new_from_trusted_utf8(ptr, len);
+                error = cfish_Err_new(mess);
             }
         }
     }
@@ -921,10 +921,10 @@ lucy_Err_trap(Cfish_Err_Attempt_t routine, void *context) {
 /*********************** Clownfish::LockFreeRegistry ************************/
 
 void*
-lucy_LFReg_to_host(lucy_LockFreeRegistry *self) {
+cfish_LFReg_to_host(cfish_LockFreeRegistry *self) {
     bool first_time = self->ref.count & XSBIND_REFCOUNT_FLAG ? true : false;
-    Lucy_LFReg_To_Host_t to_host
-        = CFISH_SUPER_METHOD_PTR(LUCY_LOCKFREEREGISTRY, Lucy_LFReg_To_Host);
+    Cfish_LFReg_To_Host_t to_host
+        = CFISH_SUPER_METHOD_PTR(CFISH_LOCKFREEREGISTRY, Cfish_LFReg_To_Host);
     SV *host_obj = (SV*)to_host(self);
     if (first_time) {
         SvSHARE((SV*)self->ref.host_obj);