You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucy.apache.org by ma...@apache.org on 2013/08/22 03:33:39 UTC
[lucy-commits] [6/8] git commit: refs/heads/method-imp-names-wip3 - Change "Cfish_"
to "CFISH_".
Change "Cfish_" to "CFISH_".
Change all mixed-case "Cfish_" method prefixes to all-caps "CFISH_".
Project: http://git-wip-us.apache.org/repos/asf/lucy/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy/commit/5ac44dc1
Tree: http://git-wip-us.apache.org/repos/asf/lucy/tree/5ac44dc1
Diff: http://git-wip-us.apache.org/repos/asf/lucy/diff/5ac44dc1
Branch: refs/heads/method-imp-names-wip3
Commit: 5ac44dc10ad891e6ac41302efee80bfd63304120
Parents: 522abc1
Author: Marvin Humphrey <ma...@rectangular.com>
Authored: Wed Aug 21 17:34:53 2013 -0700
Committer: Marvin Humphrey <ma...@rectangular.com>
Committed: Wed Aug 21 18:29:43 2013 -0700
----------------------------------------------------------------------
c/t/test_lucy.c | 2 +-
clownfish/compiler/src/CFCBindMethod.c | 2 +-
clownfish/compiler/src/CFCPerl.c | 4 +-
clownfish/compiler/src/CFCPerlClass.c | 4 +-
clownfish/compiler/src/CFCPerlConstructor.c | 4 +-
clownfish/compiler/src/CFCPerlMethod.c | 2 +-
clownfish/compiler/src/CFCPerlTypeMap.c | 2 +-
clownfish/runtime/c/t/test_cfish.c | 2 +-
clownfish/runtime/core/Clownfish/ByteBuf.c | 2 +-
clownfish/runtime/core/Clownfish/CharBuf.c | 2 +-
clownfish/runtime/core/Clownfish/Err.cfh | 12 +-
clownfish/runtime/core/Clownfish/Obj.cfh | 8 +-
.../runtime/core/Clownfish/Util/SortUtils.c | 38 +++---
.../runtime/core/Clownfish/Util/SortUtils.cfh | 8 +-
clownfish/runtime/core/Clownfish/VArray.c | 2 +-
clownfish/runtime/core/Clownfish/VArray.cfh | 8 +-
.../perl/buildlib/Clownfish/Build/Binding.pm | 42 +++---
clownfish/runtime/perl/xs/XSBind.c | 132 +++++++++----------
clownfish/runtime/perl/xs/XSBind.h | 6 +-
clownfish/runtime/ruby/ext/Bind.c | 10 +-
core/Lucy/Search/NoMatchQuery.c | 2 +-
core/Lucy/Util/Freezer.c | 2 +-
core/Lucy/Util/Json/JsonParser.y | 16 +--
core/Lucy/Util/SortExternal.c | 8 +-
perl/buildlib/Lucy/Build/Binding/Index.pm | 2 +-
perl/buildlib/Lucy/Build/Binding/Misc.pm | 4 +-
perl/xs/Lucy/Analysis/RegexTokenizer.c | 8 +-
perl/xs/Lucy/Document/Doc.c | 34 ++---
perl/xs/Lucy/Index/DocReader.c | 2 +-
perl/xs/Lucy/Index/Inverter.c | 16 +--
30 files changed, 193 insertions(+), 193 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucy/blob/5ac44dc1/c/t/test_lucy.c
----------------------------------------------------------------------
diff --git a/c/t/test_lucy.c b/c/t/test_lucy.c
index c1fb9b6..5df52b2 100644
--- a/c/t/test_lucy.c
+++ b/c/t/test_lucy.c
@@ -30,7 +30,7 @@ main() {
formatter = (cfish_TestFormatter*)cfish_TestFormatterCF_new();
suite = testlucy_Test_create_test_suite();
- success = Cfish_TestSuite_Run_All_Batches(suite, formatter);
+ success = CFISH_TestSuite_Run_All_Batches(suite, formatter);
CFISH_DECREF(formatter);
CFISH_DECREF(suite);
http://git-wip-us.apache.org/repos/asf/lucy/blob/5ac44dc1/clownfish/compiler/src/CFCBindMethod.c
----------------------------------------------------------------------
diff --git a/clownfish/compiler/src/CFCBindMethod.c b/clownfish/compiler/src/CFCBindMethod.c
index 605e5cd..bece42f 100644
--- a/clownfish/compiler/src/CFCBindMethod.c
+++ b/clownfish/compiler/src/CFCBindMethod.c
@@ -298,7 +298,7 @@ CFCBindMeth_abstract_method_def(CFCMethod *method) {
char pattern[] =
"%s\n"
"%s(%s) {\n"
- " cfish_CharBuf *klass = self ? Cfish_Obj_Get_Class_Name((cfish_Obj*)self) : %s->name;%s\n"
+ " cfish_CharBuf *klass = self ? CFISH_Obj_Get_Class_Name((cfish_Obj*)self) : %s->name;%s\n"
" CFISH_THROW(CFISH_ERR, \"Abstract method '%s' not defined by %%o\", klass);%s\n"
"}\n";
char *abstract_def
http://git-wip-us.apache.org/repos/asf/lucy/blob/5ac44dc1/clownfish/compiler/src/CFCPerl.c
----------------------------------------------------------------------
diff --git a/clownfish/compiler/src/CFCPerl.c b/clownfish/compiler/src/CFCPerl.c
index 2c72883..0b58fbf 100644
--- a/clownfish/compiler/src/CFCPerl.c
+++ b/clownfish/compiler/src/CFCPerl.c
@@ -251,7 +251,7 @@ S_write_boot_c(CFCPerl *self) {
size_t alias_len = strlen(alias);
const char pattern[] =
"%s"
- " Cfish_ZCB_Assign_Str(alias, \"%s\", %u);\n"
+ " CFISH_ZCB_Assign_Str(alias, \"%s\", %u);\n"
" cfish_VTable_add_alias_to_registry(%s,\n"
" (cfish_CharBuf*)alias);\n";
char *new_alias_adds
@@ -567,7 +567,7 @@ S_write_callbacks_c(CFCPerl *self) {
" LEAVE;\n"
" if (!nullable && !retval) {\n"
" CFISH_THROW(CFISH_ERR, \"%%o#%%s cannot return NULL\",\n"
- " Cfish_Obj_Get_Class_Name((cfish_Obj*)vself),\n"
+ " CFISH_Obj_Get_Class_Name((cfish_Obj*)vself),\n"
" meth_name);\n"
" }\n"
" return retval;\n"
http://git-wip-us.apache.org/repos/asf/lucy/blob/5ac44dc1/clownfish/compiler/src/CFCPerlClass.c
----------------------------------------------------------------------
diff --git a/clownfish/compiler/src/CFCPerlClass.c b/clownfish/compiler/src/CFCPerlClass.c
index f90d5fa..ca44a3b 100644
--- a/clownfish/compiler/src/CFCPerlClass.c
+++ b/clownfish/compiler/src/CFCPerlClass.c
@@ -565,12 +565,12 @@ CFCPerlClass_method_metadata_code(CFCPerlClass *self) {
const char *macro_sym = CFCMethod_get_macro_sym(method);
const char *alias = CFCMethod_get_host_alias(method);
if (alias) {
- code = CFCUtil_cat(code, " Cfish_VTable_Add_Host_Method_Alias(",
+ code = CFCUtil_cat(code, " CFISH_VTable_Add_Host_Method_Alias(",
vtable_var, ", \"", alias, "\", \"", macro_sym,
"\");\n", NULL);
}
if (CFCMethod_excluded_from_host(method)) {
- code = CFCUtil_cat(code, " Cfish_VTable_Exclude_Host_Method(",
+ code = CFCUtil_cat(code, " CFISH_VTable_Exclude_Host_Method(",
vtable_var, ", \"", macro_sym, "\");\n", NULL);
}
}
http://git-wip-us.apache.org/repos/asf/lucy/blob/5ac44dc1/clownfish/compiler/src/CFCPerlConstructor.c
----------------------------------------------------------------------
diff --git a/clownfish/compiler/src/CFCPerlConstructor.c b/clownfish/compiler/src/CFCPerlConstructor.c
index 114b5cd..eeaec24 100644
--- a/clownfish/compiler/src/CFCPerlConstructor.c
+++ b/clownfish/compiler/src/CFCPerlConstructor.c
@@ -126,8 +126,8 @@ CFCPerlConstructor_xsub_def(CFCPerlConstructor *self) {
"\n"
" %s retval = %s(%s);\n"
" if (retval) {\n"
- " ST(0) = (SV*)Cfish_Obj_To_Host((cfish_Obj*)retval);\n"
- " Cfish_Obj_Dec_RefCount((cfish_Obj*)retval);\n"
+ " ST(0) = (SV*)CFISH_Obj_To_Host((cfish_Obj*)retval);\n"
+ " CFISH_Obj_Dec_RefCount((cfish_Obj*)retval);\n"
" }\n"
" else {\n"
" ST(0) = newSV(0);\n"
http://git-wip-us.apache.org/repos/asf/lucy/blob/5ac44dc1/clownfish/compiler/src/CFCPerlMethod.c
----------------------------------------------------------------------
diff --git a/clownfish/compiler/src/CFCPerlMethod.c b/clownfish/compiler/src/CFCPerlMethod.c
index 895f904..7e378ca 100644
--- a/clownfish/compiler/src/CFCPerlMethod.c
+++ b/clownfish/compiler/src/CFCPerlMethod.c
@@ -448,7 +448,7 @@ S_callback_start(CFCMethod *method) {
" ENTER;\n"
" SAVETMPS;\n"
" PUSHMARK(SP);\n"
- " mPUSHs((SV*)Cfish_Obj_To_Host((cfish_Obj*)self));\n";
+ " mPUSHs((SV*)CFISH_Obj_To_Host((cfish_Obj*)self));\n";
int num_args = (int)CFCParamList_num_vars(param_list) - 1;
int num_to_extend = num_args == 0 ? 1
: num_args == 1 ? 2
http://git-wip-us.apache.org/repos/asf/lucy/blob/5ac44dc1/clownfish/compiler/src/CFCPerlTypeMap.c
----------------------------------------------------------------------
diff --git a/clownfish/compiler/src/CFCPerlTypeMap.c b/clownfish/compiler/src/CFCPerlTypeMap.c
index 2d02195..bcd17c1 100644
--- a/clownfish/compiler/src/CFCPerlTypeMap.c
+++ b/clownfish/compiler/src/CFCPerlTypeMap.c
@@ -281,7 +281,7 @@ CFCPerlTypeMap_write_xs_typemap(CFCHierarchy *hierarchy) {
", NULL);\n\n", NULL);
output = CFCUtil_cat(output, vtable_var, "_\n"
- " $arg = (SV*)Cfish_Obj_To_Host((cfish_Obj*)$var);\n"
+ " $arg = (SV*)CFISH_Obj_To_Host((cfish_Obj*)$var);\n"
" CFISH_DECREF($var);\n"
"\n", NULL);
}
http://git-wip-us.apache.org/repos/asf/lucy/blob/5ac44dc1/clownfish/runtime/c/t/test_cfish.c
----------------------------------------------------------------------
diff --git a/clownfish/runtime/c/t/test_cfish.c b/clownfish/runtime/c/t/test_cfish.c
index 52f8662..0e3152d 100644
--- a/clownfish/runtime/c/t/test_cfish.c
+++ b/clownfish/runtime/c/t/test_cfish.c
@@ -30,7 +30,7 @@ main() {
formatter = (cfish_TestFormatter*)cfish_TestFormatterCF_new();
suite = testcfish_Test_create_test_suite();
- success = Cfish_TestSuite_Run_All_Batches(suite, formatter);
+ success = CFISH_TestSuite_Run_All_Batches(suite, formatter);
CFISH_DECREF(formatter);
CFISH_DECREF(suite);
http://git-wip-us.apache.org/repos/asf/lucy/blob/5ac44dc1/clownfish/runtime/core/Clownfish/ByteBuf.c
----------------------------------------------------------------------
diff --git a/clownfish/runtime/core/Clownfish/ByteBuf.c b/clownfish/runtime/core/Clownfish/ByteBuf.c
index 8d9f79e..ceb97ee 100644
--- a/clownfish/runtime/core/Clownfish/ByteBuf.c
+++ b/clownfish/runtime/core/Clownfish/ByteBuf.c
@@ -235,7 +235,7 @@ ViewBB_init(ViewByteBuf *self, char *buf, size_t size) {
void
ViewBB_Destroy_IMP(ViewByteBuf *self) {
- Obj_Destroy_t super_duper_destroy = METHOD_PTR(OBJ, Cfish_Obj_Destroy);
+ Obj_Destroy_t super_duper_destroy = METHOD_PTR(OBJ, CFISH_Obj_Destroy);
super_duper_destroy((Obj*)self);
}
http://git-wip-us.apache.org/repos/asf/lucy/blob/5ac44dc1/clownfish/runtime/core/Clownfish/CharBuf.c
----------------------------------------------------------------------
diff --git a/clownfish/runtime/core/Clownfish/CharBuf.c b/clownfish/runtime/core/Clownfish/CharBuf.c
index 043dedf..c26c25a 100644
--- a/clownfish/runtime/core/Clownfish/CharBuf.c
+++ b/clownfish/runtime/core/Clownfish/CharBuf.c
@@ -138,7 +138,7 @@ CB_Hash_Sum_IMP(CharBuf *self) {
uint32_t hashvalue = 5381;
ZombieCharBuf *iterator = ZCB_WRAP(self);
- const CB_Nibble_t nibble = METHOD_PTR(iterator->vtable, Cfish_CB_Nibble);
+ const CB_Nibble_t nibble = METHOD_PTR(iterator->vtable, CFISH_CB_Nibble);
while (iterator->size) {
uint32_t code_point = (uint32_t)nibble((CharBuf*)iterator);
hashvalue = ((hashvalue << 5) + hashvalue) ^ code_point;
http://git-wip-us.apache.org/repos/asf/lucy/blob/5ac44dc1/clownfish/runtime/core/Clownfish/Err.cfh
----------------------------------------------------------------------
diff --git a/clownfish/runtime/core/Clownfish/Err.cfh b/clownfish/runtime/core/Clownfish/Err.cfh
index 470f08f..aa25b3e 100644
--- a/clownfish/runtime/core/Clownfish/Err.cfh
+++ b/clownfish/runtime/core/Clownfish/Err.cfh
@@ -18,10 +18,10 @@ parcel Clownfish;
__C__
typedef void
-(*Cfish_Err_Attempt_t)(void *context);
+(*CFISH_Err_Attempt_t)(void *context);
#ifdef CFISH_USE_SHORT_NAMES
- #define Err_Attempt_t Cfish_Err_Attempt_t
+ #define Err_Attempt_t CFISH_Err_Attempt_t
#endif
__END_C__
@@ -90,7 +90,7 @@ public class Clownfish::Err inherits Clownfish::Obj {
* @return an Err, or NULL if no exception occurs.
*/
public inert incremented nullable Err*
- trap(Cfish_Err_Attempt_t routine, void *context);
+ trap(CFISH_Err_Attempt_t routine, void *context);
/** Print an error message to stderr with some C contextual information.
* Usually invoked via the WARN(pattern, ...) macro.
@@ -177,7 +177,7 @@ __C__
#endif
#define CFISH_ERR_ADD_FRAME(_error) \
- Cfish_Err_Add_Frame(_error, __FILE__, __LINE__, \
+ CFISH_Err_Add_Frame(_error, __FILE__, __LINE__, \
CFISH_ERR_FUNC_MACRO)
#define CFISH_RETHROW(_error) \
@@ -229,8 +229,8 @@ 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) {
cfish_CharBuf *mess = CFISH_MAKE_MESS("%o is an abstract class",
- Cfish_Obj_Get_Class_Name(obj));
- Cfish_Obj_Dec_RefCount(obj);
+ CFISH_Obj_Get_Class_Name(obj));
+ CFISH_Obj_Dec_RefCount(obj);
cfish_Err_throw_mess(CFISH_ERR, mess);
}
}
http://git-wip-us.apache.org/repos/asf/lucy/blob/5ac44dc1/clownfish/runtime/core/Clownfish/Obj.cfh
----------------------------------------------------------------------
diff --git a/clownfish/runtime/core/Clownfish/Obj.cfh b/clownfish/runtime/core/Clownfish/Obj.cfh
index 88e9055..a755d5d 100644
--- a/clownfish/runtime/core/Clownfish/Obj.cfh
+++ b/clownfish/runtime/core/Clownfish/Obj.cfh
@@ -157,8 +157,8 @@ public class Clownfish::Obj {
__C__
static CFISH_INLINE void
cfish_Obj_super_destroy(cfish_Obj *self, cfish_VTable *vtable) {
- Cfish_Obj_Destroy_t super_destroy
- = CFISH_SUPER_METHOD_PTR(vtable, Cfish_Obj_Destroy);
+ CFISH_Obj_Destroy_t super_destroy
+ = CFISH_SUPER_METHOD_PTR(vtable, CFISH_Obj_Destroy);
super_destroy(self);
}
@@ -167,7 +167,7 @@ cfish_Obj_super_destroy(cfish_Obj *self, cfish_VTable *vtable) {
static CFISH_INLINE cfish_Obj*
cfish_Obj_incref(cfish_Obj *self) {
- if (self != NULL) { return Cfish_Obj_Inc_RefCount(self); }
+ if (self != NULL) { return CFISH_Obj_Inc_RefCount(self); }
else { return NULL; }
}
@@ -175,7 +175,7 @@ cfish_Obj_incref(cfish_Obj *self) {
static CFISH_INLINE uint32_t
cfish_Obj_decref(cfish_Obj *self) {
- if (self != NULL) { return Cfish_Obj_Dec_RefCount(self); }
+ if (self != NULL) { return CFISH_Obj_Dec_RefCount(self); }
else { return 0; }
}
http://git-wip-us.apache.org/repos/asf/lucy/blob/5ac44dc1/clownfish/runtime/core/Clownfish/Util/SortUtils.c
----------------------------------------------------------------------
diff --git a/clownfish/runtime/core/Clownfish/Util/SortUtils.c b/clownfish/runtime/core/Clownfish/Util/SortUtils.c
index 1ff7e87..a778122 100644
--- a/clownfish/runtime/core/Clownfish/Util/SortUtils.c
+++ b/clownfish/runtime/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,
- Cfish_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,
- Cfish_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,
- Cfish_Sort_Compare_t compare, void *context, size_t width);
+ CFISH_Sort_Compare_t compare, void *context, size_t width);
static CFISH_INLINE void
SI_merge(void *left_vptr, uint32_t left_size,
void *right_vptr, uint32_t right_size,
- void *vdest, size_t width, Cfish_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,
- Cfish_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, Cfish_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,
- Cfish_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,
- Cfish_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,
- Cfish_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 CFISH_INLINE void
SI_merge(void *left_vptr, uint32_t left_size,
void *right_vptr, uint32_t right_size,
- void *vdest, size_t width, Cfish_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,
- Cfish_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,
- Cfish_Sort_Compare_t compare, void *context);
+ CFISH_Sort_Compare_t compare, void *context);
// Swap two elements.
static CFISH_INLINE void
@@ -221,14 +221,14 @@ SI_exchange8(EIGHT_BYTE_TYPE *elems, int32_t left, int32_t right);
*/
static CFISH_INLINE FOUR_BYTE_TYPE*
SI_choose_pivot4(FOUR_BYTE_TYPE *elems, int32_t left, int32_t right,
- Cfish_Sort_Compare_t compare, void *context);
+ CFISH_Sort_Compare_t compare, void *context);
static CFISH_INLINE EIGHT_BYTE_TYPE*
SI_choose_pivot8(EIGHT_BYTE_TYPE *elems, int32_t left, int32_t right,
- Cfish_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,
- Cfish_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 CFISH_INLINE FOUR_BYTE_TYPE*
SI_choose_pivot4(FOUR_BYTE_TYPE *elems, int32_t left, int32_t right,
- Cfish_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,
- Cfish_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 CFISH_INLINE EIGHT_BYTE_TYPE*
SI_choose_pivot8(EIGHT_BYTE_TYPE *elems, int32_t left, int32_t right,
- Cfish_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,
- Cfish_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/5ac44dc1/clownfish/runtime/core/Clownfish/Util/SortUtils.cfh
----------------------------------------------------------------------
diff --git a/clownfish/runtime/core/Clownfish/Util/SortUtils.cfh b/clownfish/runtime/core/Clownfish/Util/SortUtils.cfh
index 39ac2d1..a238163 100644
--- a/clownfish/runtime/core/Clownfish/Util/SortUtils.cfh
+++ b/clownfish/runtime/core/Clownfish/Util/SortUtils.cfh
@@ -18,7 +18,7 @@ parcel Clownfish;
__C__
typedef int
-(*Cfish_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,
- Cfish_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, Cfish_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,
- Cfish_Sort_Compare_t compare, void *context);
+ CFISH_Sort_Compare_t compare, void *context);
}
http://git-wip-us.apache.org/repos/asf/lucy/blob/5ac44dc1/clownfish/runtime/core/Clownfish/VArray.c
----------------------------------------------------------------------
diff --git a/clownfish/runtime/core/Clownfish/VArray.c b/clownfish/runtime/core/Clownfish/VArray.c
index 4ca7033..e3d49d3 100644
--- a/clownfish/runtime/core/Clownfish/VArray.c
+++ b/clownfish/runtime/core/Clownfish/VArray.c
@@ -249,7 +249,7 @@ S_default_compare(void *context, const void *va, const void *vb) {
}
void
-VA_Sort_IMP(VArray *self, Cfish_Sort_Compare_t compare, void *context) {
+VA_Sort_IMP(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);
}
http://git-wip-us.apache.org/repos/asf/lucy/blob/5ac44dc1/clownfish/runtime/core/Clownfish/VArray.cfh
----------------------------------------------------------------------
diff --git a/clownfish/runtime/core/Clownfish/VArray.cfh b/clownfish/runtime/core/Clownfish/VArray.cfh
index 3029332..6776b57 100644
--- a/clownfish/runtime/core/Clownfish/VArray.cfh
+++ b/clownfish/runtime/core/Clownfish/VArray.cfh
@@ -20,10 +20,10 @@ __C__
#include "Clownfish/Util/SortUtils.h"
typedef bool
-(*Cfish_VA_Gather_Test_t)(cfish_VArray *self, uint32_t tick, void *data);
+(*CFISH_VA_Gather_Test_t)(cfish_VArray *self, uint32_t tick, void *data);
#ifdef CFISH_USE_SHORT_NAMES
- #define VA_Gather_Test_t Cfish_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, Cfish_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, Cfish_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/5ac44dc1/clownfish/runtime/perl/buildlib/Clownfish/Build/Binding.pm
----------------------------------------------------------------------
diff --git a/clownfish/runtime/perl/buildlib/Clownfish/Build/Binding.pm b/clownfish/runtime/perl/buildlib/Clownfish/Build/Binding.pm
index b63c7d0..150e570 100644
--- a/clownfish/runtime/perl/buildlib/Clownfish/Build/Binding.pm
+++ b/clownfish/runtime/perl/buildlib/Clownfish/Build/Binding.pm
@@ -97,7 +97,7 @@ CODE:
cfish_TestFormatter *formatter
= (cfish_TestFormatter*)cfish_TestFormatterTAP_new();
cfish_TestSuite *suite = testcfish_Test_create_test_suite();
- bool result = Cfish_TestSuite_Run_Batch(suite, class_name, formatter);
+ bool result = CFISH_TestSuite_Run_Batch(suite, class_name, formatter);
CFISH_DECREF(class_name);
CFISH_DECREF(formatter);
CFISH_DECREF(suite);
@@ -129,7 +129,7 @@ CODE:
char *ptr = SvPV(sv, size);
cfish_ByteBuf *self = (cfish_ByteBuf*)XSBind_new_blank_obj(either_sv);
cfish_BB_init(self, size);
- Cfish_BB_Mimic_Bytes(self, ptr, size);
+ CFISH_BB_Mimic_Bytes(self, ptr, size);
RETVAL = CFISH_OBJ_TO_SV_NOINC(self);
}
OUTPUT: RETVAL
@@ -159,7 +159,7 @@ CODE:
char *ptr = SvPVutf8(sv, size);
cfish_CharBuf *self = (cfish_CharBuf*)XSBind_new_blank_obj(either_sv);
cfish_CB_init(self, size);
- Cfish_CB_Cat_Trusted_Str(self, ptr, size);
+ CFISH_CB_Cat_Trusted_Str(self, ptr, size);
RETVAL = CFISH_OBJ_TO_SV_NOINC(self);
}
OUTPUT: RETVAL
@@ -168,7 +168,7 @@ SV*
_clone(self)
cfish_CharBuf *self;
CODE:
- RETVAL = CFISH_OBJ_TO_SV_NOINC(Cfish_CB_Clone_IMP(self));
+ RETVAL = CFISH_OBJ_TO_SV_NOINC(CFISH_CB_Clone_IMP(self));
OUTPUT: RETVAL
SV*
@@ -268,7 +268,7 @@ _fetch(self, key)
cfish_Hash *self;
const cfish_CharBuf *key;
CODE:
- RETVAL = CFISH_OBJ_TO_SV(Cfish_Hash_Fetch_IMP(self, (cfish_Obj*)key));
+ RETVAL = CFISH_OBJ_TO_SV(CFISH_Hash_Fetch_IMP(self, (cfish_Obj*)key));
OUTPUT: RETVAL
void
@@ -279,7 +279,7 @@ store(self, key, value);
PPCODE:
{
if (value) { CFISH_INCREF(value); }
- Cfish_Hash_Store_IMP(self, (cfish_Obj*)key, value);
+ CFISH_Hash_Store_IMP(self, (cfish_Obj*)key, value);
}
void
@@ -290,9 +290,9 @@ PPCODE:
cfish_Obj *key;
cfish_Obj *val;
- if (Cfish_Hash_Next(self, &key, &val)) {
- SV *key_sv = (SV*)Cfish_Obj_To_Host(key);
- SV *val_sv = (SV*)Cfish_Obj_To_Host(val);
+ if (CFISH_Hash_Next(self, &key, &val)) {
+ SV *key_sv = (SV*)CFISH_Obj_To_Host(key);
+ SV *val_sv = (SV*)CFISH_Obj_To_Host(val);
XPUSHs(sv_2mortal(key_sv));
XPUSHs(sv_2mortal(val_sv));
@@ -476,7 +476,7 @@ is_a(self, class_name)
CODE:
{
cfish_VTable *target = cfish_VTable_fetch_vtable(class_name);
- RETVAL = Cfish_Obj_Is_A(self, target);
+ RETVAL = CFISH_Obj_Is_A(self, target);
}
OUTPUT: RETVAL
END_XS_CODE
@@ -509,28 +509,28 @@ SV*
shallow_copy(self)
cfish_VArray *self;
CODE:
- RETVAL = CFISH_OBJ_TO_SV_NOINC(Cfish_VA_Shallow_Copy(self));
+ RETVAL = CFISH_OBJ_TO_SV_NOINC(CFISH_VA_Shallow_Copy(self));
OUTPUT: RETVAL
SV*
_clone(self)
cfish_VArray *self;
CODE:
- RETVAL = CFISH_OBJ_TO_SV_NOINC(Cfish_VA_Clone(self));
+ RETVAL = CFISH_OBJ_TO_SV_NOINC(CFISH_VA_Clone(self));
OUTPUT: RETVAL
SV*
shift(self)
cfish_VArray *self;
CODE:
- RETVAL = CFISH_OBJ_TO_SV_NOINC(Cfish_VA_Shift(self));
+ RETVAL = CFISH_OBJ_TO_SV_NOINC(CFISH_VA_Shift(self));
OUTPUT: RETVAL
SV*
pop(self)
cfish_VArray *self;
CODE:
- RETVAL = CFISH_OBJ_TO_SV_NOINC(Cfish_VA_Pop(self));
+ RETVAL = CFISH_OBJ_TO_SV_NOINC(CFISH_VA_Pop(self));
OUTPUT: RETVAL
SV*
@@ -538,7 +538,7 @@ delete(self, tick)
cfish_VArray *self;
uint32_t tick;
CODE:
- RETVAL = CFISH_OBJ_TO_SV_NOINC(Cfish_VA_Delete(self, tick));
+ RETVAL = CFISH_OBJ_TO_SV_NOINC(CFISH_VA_Delete(self, tick));
OUTPUT: RETVAL
void
@@ -549,7 +549,7 @@ store(self, tick, value);
PPCODE:
{
if (value) { CFISH_INCREF(value); }
- Cfish_VA_Store_IMP(self, tick, value);
+ CFISH_VA_Store_IMP(self, tick, value);
}
SV*
@@ -557,7 +557,7 @@ fetch(self, tick)
cfish_VArray *self;
uint32_t tick;
CODE:
- RETVAL = CFISH_OBJ_TO_SV(Cfish_VA_Fetch(self, tick));
+ RETVAL = CFISH_OBJ_TO_SV(CFISH_VA_Fetch(self, tick));
OUTPUT: RETVAL
END_XS_CODE
@@ -583,7 +583,7 @@ CODE:
if (cfish_VTable_registry == NULL) {
cfish_VTable_init_registry();
}
- RETVAL = (SV*)Cfish_Obj_To_Host((cfish_Obj*)cfish_VTable_registry);
+ RETVAL = (SV*)CFISH_Obj_To_Host((cfish_Obj*)cfish_VTable_registry);
OUTPUT: RETVAL
SV*
@@ -598,7 +598,7 @@ CODE:
cfish_ZombieCharBuf *class_name = CFISH_ZCB_WRAP_STR(ptr, size);
cfish_VTable *vtable
= cfish_VTable_fetch_vtable((cfish_CharBuf*)class_name);
- RETVAL = vtable ? (SV*)Cfish_VTable_To_Host(vtable) : &PL_sv_undef;
+ RETVAL = vtable ? (SV*)CFISH_VTable_To_Host(vtable) : &PL_sv_undef;
}
OUTPUT: RETVAL
@@ -621,7 +621,7 @@ CODE:
CFISH_RETHROW(CFISH_INCREF(cfish_Err_get_error()));
}
cfish_VTable *singleton = cfish_VTable_singleton(class_name, parent);
- RETVAL = (SV*)Cfish_VTable_To_Host(singleton);
+ RETVAL = (SV*)CFISH_VTable_To_Host(singleton);
}
OUTPUT: RETVAL
@@ -629,7 +629,7 @@ SV*
make_obj(self)
cfish_VTable *self;
CODE:
- cfish_Obj *blank = Cfish_VTable_Make_Obj(self);
+ cfish_Obj *blank = CFISH_VTable_Make_Obj(self);
RETVAL = CFISH_OBJ_TO_SV_NOINC(blank);
OUTPUT: RETVAL
END_XS_CODE
http://git-wip-us.apache.org/repos/asf/lucy/blob/5ac44dc1/clownfish/runtime/perl/xs/XSBind.c
----------------------------------------------------------------------
diff --git a/clownfish/runtime/perl/xs/XSBind.c b/clownfish/runtime/perl/xs/XSBind.c
index 3ab80e0..6a0da1f 100644
--- a/clownfish/runtime/perl/xs/XSBind.c
+++ b/clownfish/runtime/perl/xs/XSBind.c
@@ -69,14 +69,14 @@ XSBind_new_blank_obj(SV *either_sv) {
}
// Use the VTable to allocate a new blank object of the right size.
- return Cfish_VTable_Make_Obj(vtable);
+ return CFISH_VTable_Make_Obj(vtable);
}
cfish_Obj*
XSBind_sv_to_cfish_obj(SV *sv, cfish_VTable *vtable, void *allocation) {
cfish_Obj *retval = XSBind_maybe_sv_to_cfish_obj(sv, vtable, allocation);
if (!retval) {
- THROW(CFISH_ERR, "Not a %o", Cfish_VTable_Get_Name(vtable));
+ THROW(CFISH_ERR, "Not a %o", CFISH_VTable_Get_Name(vtable));
}
return retval;
}
@@ -86,7 +86,7 @@ XSBind_maybe_sv_to_cfish_obj(SV *sv, cfish_VTable *vtable, void *allocation) {
cfish_Obj *retval = NULL;
if (XSBind_sv_defined(sv)) {
if (sv_isobject(sv)
- && sv_derived_from(sv, (char*)Cfish_CB_Get_Ptr8(Cfish_VTable_Get_Name(vtable)))
+ && sv_derived_from(sv, (char*)CFISH_CB_Get_Ptr8(CFISH_VTable_Get_Name(vtable)))
) {
// Unwrap a real Clownfish object.
IV tmp = SvIV(SvRV(sv));
@@ -119,7 +119,7 @@ XSBind_maybe_sv_to_cfish_obj(SV *sv, cfish_VTable *vtable, void *allocation) {
// Mortalize the converted object -- which is somewhat
// dangerous, but is the only way to avoid requiring that the
// caller take responsibility for a refcount.
- SV *mortal = (SV*)Cfish_Obj_To_Host(retval);
+ SV *mortal = (SV*)CFISH_Obj_To_Host(retval);
CFISH_DECREF(retval);
sv_2mortal(mortal);
}
@@ -134,20 +134,20 @@ XSBind_cfish_to_perl(cfish_Obj *obj) {
if (obj == NULL) {
return newSV(0);
}
- else if (Cfish_Obj_Is_A(obj, CFISH_CHARBUF)) {
+ else if (CFISH_Obj_Is_A(obj, CFISH_CHARBUF)) {
return XSBind_cb_to_sv((cfish_CharBuf*)obj);
}
- else if (Cfish_Obj_Is_A(obj, CFISH_BYTEBUF)) {
+ else if (CFISH_Obj_Is_A(obj, CFISH_BYTEBUF)) {
return XSBind_bb_to_sv((cfish_ByteBuf*)obj);
}
- else if (Cfish_Obj_Is_A(obj, CFISH_VARRAY)) {
+ else if (CFISH_Obj_Is_A(obj, CFISH_VARRAY)) {
return S_cfish_array_to_perl_array((cfish_VArray*)obj);
}
- else if (Cfish_Obj_Is_A(obj, CFISH_HASH)) {
+ else if (CFISH_Obj_Is_A(obj, CFISH_HASH)) {
return S_cfish_hash_to_perl_hash((cfish_Hash*)obj);
}
- else if (Cfish_Obj_Is_A(obj, CFISH_FLOATNUM)) {
- return newSVnv(Cfish_Obj_To_F64(obj));
+ else if (CFISH_Obj_Is_A(obj, CFISH_FLOATNUM)) {
+ return newSVnv(CFISH_Obj_To_F64(obj));
}
else if (obj == (cfish_Obj*)CFISH_TRUE) {
return newSViv(1);
@@ -155,20 +155,20 @@ XSBind_cfish_to_perl(cfish_Obj *obj) {
else if (obj == (cfish_Obj*)CFISH_FALSE) {
return newSViv(0);
}
- else if (sizeof(IV) == 8 && Cfish_Obj_Is_A(obj, CFISH_INTNUM)) {
- int64_t num = Cfish_Obj_To_I64(obj);
+ else if (sizeof(IV) == 8 && CFISH_Obj_Is_A(obj, CFISH_INTNUM)) {
+ int64_t num = CFISH_Obj_To_I64(obj);
return newSViv((IV)num);
}
- else if (sizeof(IV) == 4 && Cfish_Obj_Is_A(obj, CFISH_INTEGER32)) {
- int32_t num = (int32_t)Cfish_Obj_To_I64(obj);
+ else if (sizeof(IV) == 4 && CFISH_Obj_Is_A(obj, CFISH_INTEGER32)) {
+ int32_t num = (int32_t)CFISH_Obj_To_I64(obj);
return newSViv((IV)num);
}
- else if (sizeof(IV) == 4 && Cfish_Obj_Is_A(obj, CFISH_INTEGER64)) {
- int64_t num = Cfish_Obj_To_I64(obj);
+ else if (sizeof(IV) == 4 && CFISH_Obj_Is_A(obj, CFISH_INTEGER64)) {
+ int64_t num = CFISH_Obj_To_I64(obj);
return newSVnv((double)num); // lossy
}
else {
- return (SV*)Cfish_Obj_To_Host(obj);
+ return (SV*)CFISH_Obj_To_Host(obj);
}
}
@@ -219,7 +219,7 @@ XSBind_perl_to_cfish(SV *sv) {
SV*
XSBind_bb_to_sv(const cfish_ByteBuf *bb) {
return bb
- ? newSVpvn(Cfish_BB_Get_Buf(bb), Cfish_BB_Get_Size(bb))
+ ? newSVpvn(CFISH_BB_Get_Buf(bb), CFISH_BB_Get_Size(bb))
: newSV(0);
}
@@ -229,7 +229,7 @@ XSBind_cb_to_sv(const cfish_CharBuf *cb) {
return newSV(0);
}
else {
- SV *sv = newSVpvn((char*)Cfish_CB_Get_Ptr8(cb), Cfish_CB_Get_Size(cb));
+ SV *sv = newSVpvn((char*)CFISH_CB_Get_Ptr8(cb), CFISH_CB_Get_Size(cb));
SvUTF8_on(sv);
return sv;
}
@@ -253,12 +253,12 @@ S_perl_hash_to_cfish_hash(HV *phash) {
// this.
SV *key_sv = HeKEY_sv(entry);
char *key_str = SvPVutf8(key_sv, key_len);
- Cfish_ZCB_Assign_Trusted_Str(key, key_str, key_len);
- Cfish_Hash_Store(retval, (cfish_Obj*)key, value);
+ CFISH_ZCB_Assign_Trusted_Str(key, key_str, key_len);
+ CFISH_Hash_Store(retval, (cfish_Obj*)key, value);
}
else if (HeKUTF8(entry)) {
- Cfish_ZCB_Assign_Trusted_Str(key, HeKEY(entry), key_len);
- Cfish_Hash_Store(retval, (cfish_Obj*)key, value);
+ CFISH_ZCB_Assign_Trusted_Str(key, HeKEY(entry), key_len);
+ CFISH_Hash_Store(retval, (cfish_Obj*)key, value);
}
else {
char *key_str = HeKEY(entry);
@@ -267,14 +267,14 @@ S_perl_hash_to_cfish_hash(HV *phash) {
if ((key_str[i] & 0x80) == 0x80) { pure_ascii = false; }
}
if (pure_ascii) {
- Cfish_ZCB_Assign_Trusted_Str(key, key_str, key_len);
- Cfish_Hash_Store(retval, (cfish_Obj*)key, value);
+ CFISH_ZCB_Assign_Trusted_Str(key, key_str, key_len);
+ CFISH_Hash_Store(retval, (cfish_Obj*)key, value);
}
else {
SV *key_sv = HeSVKEY_force(entry);
key_str = SvPVutf8(key_sv, key_len);
- Cfish_ZCB_Assign_Trusted_Str(key, key_str, key_len);
- Cfish_Hash_Store(retval, (cfish_Obj*)key, value);
+ CFISH_ZCB_Assign_Trusted_Str(key, key_str, key_len);
+ CFISH_Hash_Store(retval, (cfish_Obj*)key, value);
}
}
}
@@ -292,10 +292,10 @@ S_perl_array_to_cfish_array(AV *parray) {
SV **elem_sv = av_fetch(parray, i, false);
if (elem_sv) {
cfish_Obj *elem = XSBind_perl_to_cfish(*elem_sv);
- if (elem) { Cfish_VA_Store(retval, i, elem); }
+ if (elem) { CFISH_VA_Store(retval, i, elem); }
}
}
- Cfish_VA_Resize(retval, size); // needed if last elem is NULL
+ CFISH_VA_Resize(retval, size); // needed if last elem is NULL
return retval;
}
@@ -303,13 +303,13 @@ S_perl_array_to_cfish_array(AV *parray) {
static SV*
S_cfish_array_to_perl_array(cfish_VArray *varray) {
AV *perl_array = newAV();
- uint32_t num_elems = Cfish_VA_Get_Size(varray);
+ uint32_t num_elems = CFISH_VA_Get_Size(varray);
// Iterate over array elems.
if (num_elems) {
av_fill(perl_array, num_elems - 1);
for (uint32_t i = 0; i < num_elems; i++) {
- cfish_Obj *val = Cfish_VA_Fetch(varray, i);
+ cfish_Obj *val = CFISH_VA_Fetch(varray, i);
if (val == NULL) {
continue;
}
@@ -336,19 +336,19 @@ S_cfish_hash_to_perl_hash(cfish_Hash *hash) {
SvUTF8_on(key_sv);
// Iterate over key-value pairs.
- Cfish_Hash_Iterate(hash);
- while (Cfish_Hash_Next(hash, (cfish_Obj**)&key, &val)) {
+ CFISH_Hash_Iterate(hash);
+ while (CFISH_Hash_Next(hash, (cfish_Obj**)&key, &val)) {
// Recurse for each value.
SV *val_sv = XSBind_cfish_to_perl(val);
- if (!Cfish_Obj_Is_A((cfish_Obj*)key, CFISH_CHARBUF)) {
+ if (!CFISH_Obj_Is_A((cfish_Obj*)key, CFISH_CHARBUF)) {
CFISH_THROW(CFISH_ERR,
"Can't convert a key of class %o to a Perl hash key",
- Cfish_Obj_Get_Class_Name((cfish_Obj*)key));
+ CFISH_Obj_Get_Class_Name((cfish_Obj*)key));
}
else {
- STRLEN key_size = Cfish_CB_Get_Size(key);
+ STRLEN key_size = CFISH_CB_Get_Size(key);
char *key_sv_ptr = SvGROW(key_sv, key_size + 1);
- memcpy(key_sv_ptr, Cfish_CB_Get_Ptr8(key), key_size);
+ memcpy(key_sv_ptr, CFISH_CB_Get_Ptr8(key), key_size);
SvCUR_set(key_sv, key_size);
*SvEND(key_sv) = '\0';
(void)hv_store_ent(perl_hash, key_sv, val_sv, 0);
@@ -474,7 +474,7 @@ S_extract_from_sv(SV *value, void *target, const char *label,
cfish_CharBuf *mess
= CFISH_MAKE_MESS(
"Invalid value for '%s' - not a %o",
- label, Cfish_VTable_Get_Name(vtable));
+ label, CFISH_VTable_Get_Name(vtable));
cfish_Err_set_error(cfish_Err_new(mess));
return false;
}
@@ -605,9 +605,9 @@ S_lazy_init_host_obj(cfish_Obj *self) {
sv_setiv(inner_obj, PTR2IV(self));
// Connect class association.
- 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);
+ 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
@@ -621,14 +621,14 @@ S_lazy_init_host_obj(cfish_Obj *self) {
}
uint32_t
-Cfish_Obj_Get_RefCount_IMP(cfish_Obj *self) {
+CFISH_Obj_Get_RefCount_IMP(cfish_Obj *self) {
return self->ref.count & XSBIND_REFCOUNT_FLAG
? self->ref.count >> XSBIND_REFCOUNT_SHIFT
: SvREFCNT((SV*)self->ref.host_obj);
}
cfish_Obj*
-Cfish_Obj_Inc_RefCount_IMP(cfish_Obj *self) {
+CFISH_Obj_Inc_RefCount_IMP(cfish_Obj *self) {
if (self->ref.count & XSBIND_REFCOUNT_FLAG) {
if (self->ref.count == XSBIND_REFCOUNT_FLAG) {
CFISH_THROW(CFISH_ERR, "Illegal refcount of 0");
@@ -642,7 +642,7 @@ Cfish_Obj_Inc_RefCount_IMP(cfish_Obj *self) {
}
uint32_t
-Cfish_Obj_Dec_RefCount_IMP(cfish_Obj *self) {
+CFISH_Obj_Dec_RefCount_IMP(cfish_Obj *self) {
uint32_t modified_refcount = I32_MAX;
if (self->ref.count & XSBIND_REFCOUNT_FLAG) {
if (self->ref.count == XSBIND_REFCOUNT_FLAG) {
@@ -651,7 +651,7 @@ Cfish_Obj_Dec_RefCount_IMP(cfish_Obj *self) {
if (self->ref.count
== ((1 << XSBIND_REFCOUNT_SHIFT) | XSBIND_REFCOUNT_FLAG)) {
modified_refcount = 0;
- Cfish_Obj_Destroy(self);
+ CFISH_Obj_Destroy(self);
}
else {
self->ref.count -= 1 << XSBIND_REFCOUNT_SHIFT;
@@ -668,7 +668,7 @@ Cfish_Obj_Dec_RefCount_IMP(cfish_Obj *self) {
}
void*
-Cfish_Obj_To_Host_IMP(cfish_Obj *self) {
+CFISH_Obj_To_Host_IMP(cfish_Obj *self) {
if (self->ref.count & XSBIND_REFCOUNT_FLAG) { S_lazy_init_host_obj(self); }
return newRV_inc((SV*)self->ref.host_obj);
}
@@ -676,7 +676,7 @@ Cfish_Obj_To_Host_IMP(cfish_Obj *self) {
/*************************** Clownfish::VTable ******************************/
cfish_Obj*
-Cfish_VTable_Make_Obj_IMP(cfish_VTable *self) {
+CFISH_VTable_Make_Obj_IMP(cfish_VTable *self) {
cfish_Obj *obj
= (cfish_Obj*)cfish_Memory_wrapped_calloc(self->obj_alloc_size, 1);
obj->vtable = self;
@@ -685,7 +685,7 @@ Cfish_VTable_Make_Obj_IMP(cfish_VTable *self) {
}
cfish_Obj*
-Cfish_VTable_Init_Obj_IMP(cfish_VTable *self, void *allocation) {
+CFISH_VTable_Init_Obj_IMP(cfish_VTable *self, void *allocation) {
cfish_Obj *obj = (cfish_Obj*)allocation;
obj->vtable = self;
obj->ref.count = (1 << XSBIND_REFCOUNT_SHIFT) | XSBIND_REFCOUNT_FLAG;
@@ -693,7 +693,7 @@ Cfish_VTable_Init_Obj_IMP(cfish_VTable *self, void *allocation) {
}
cfish_Obj*
-Cfish_VTable_Foster_Obj_IMP(cfish_VTable *self, void *host_obj) {
+CFISH_VTable_Foster_Obj_IMP(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);
@@ -710,8 +710,8 @@ cfish_VTable_register_with_host(cfish_VTable *singleton, cfish_VTable *parent) {
SAVETMPS;
EXTEND(SP, 2);
PUSHMARK(SP);
- mPUSHs((SV*)Cfish_VTable_To_Host(singleton));
- mPUSHs((SV*)Cfish_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;
@@ -757,10 +757,10 @@ cfish_VTable_find_parent_class(const cfish_CharBuf *class_name) {
}
void*
-Cfish_VTable_To_Host_IMP(cfish_VTable *self) {
+CFISH_VTable_To_Host_IMP(cfish_VTable *self) {
bool first_time = self->ref.count & XSBIND_REFCOUNT_FLAG ? true : false;
- Cfish_VTable_To_Host_t to_host
- = CFISH_SUPER_METHOD_PTR(CFISH_VTABLE, Cfish_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);
@@ -784,7 +784,7 @@ XS(cfish_Err_attempt_via_xs) {
};
IV routine_iv = SvIV(ST(0));
IV context_iv = SvIV(ST(1));
- Cfish_Err_Attempt_t routine = INT2PTR(Cfish_Err_Attempt_t, routine_iv);
+ CFISH_Err_Attempt_t routine = INT2PTR(CFISH_Err_Attempt_t, routine_iv);
void *context = INT2PTR(void*, context_iv);
routine(context);
XSRETURN(0);
@@ -821,7 +821,7 @@ cfish_Err_set_error(cfish_Err *error) {
PUSHMARK(SP);
PUSHmortal;
if (error) {
- mPUSHs((SV*)Cfish_Err_To_Host(error));
+ mPUSHs((SV*)CFISH_Err_To_Host(error));
}
else {
PUSHmortal;
@@ -835,7 +835,7 @@ cfish_Err_set_error(cfish_Err *error) {
void
cfish_Err_do_throw(cfish_Err *err) {
dSP;
- SV *error_sv = (SV*)Cfish_Err_To_Host(err);
+ SV *error_sv = (SV*)CFISH_Err_To_Host(err);
CFISH_DECREF(err);
ENTER;
SAVETMPS;
@@ -848,9 +848,9 @@ cfish_Err_do_throw(cfish_Err *err) {
}
void*
-Cfish_Err_To_Host_IMP(cfish_Err *self) {
- Cfish_Err_To_Host_t super_to_host
- = CFISH_SUPER_METHOD_PTR(CFISH_ERR, Cfish_Err_To_Host);
+CFISH_Err_To_Host_IMP(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;
@@ -858,9 +858,9 @@ Cfish_Err_To_Host_IMP(cfish_Err *self) {
void
cfish_Err_throw_mess(cfish_VTable *vtable, cfish_CharBuf *message) {
- cfish_Err *err = (cfish_Err*)Cfish_VTable_Make_Obj(vtable);
+ cfish_Err *err = (cfish_Err*)CFISH_VTable_Make_Obj(vtable);
cfish_Err_init(err, cfish_CB_new(0));
- Cfish_Err_Cat_Mess(err, message);
+ CFISH_Err_Cat_Mess(err, message);
CFISH_DECREF(message);
cfish_Err_do_throw(err);
}
@@ -874,7 +874,7 @@ cfish_Err_warn_mess(cfish_CharBuf *message) {
}
cfish_Err*
-cfish_Err_trap(Cfish_Err_Attempt_t routine, void *context) {
+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));
@@ -921,10 +921,10 @@ cfish_Err_trap(Cfish_Err_Attempt_t routine, void *context) {
/*********************** Clownfish::LockFreeRegistry ************************/
void*
-Cfish_LFReg_To_Host_IMP(cfish_LockFreeRegistry *self) {
+CFISH_LFReg_To_Host_IMP(cfish_LockFreeRegistry *self) {
bool first_time = self->ref.count & XSBIND_REFCOUNT_FLAG ? true : false;
- Cfish_LFReg_To_Host_t to_host
- = CFISH_SUPER_METHOD_PTR(CFISH_LOCKFREEREGISTRY, Cfish_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);
http://git-wip-us.apache.org/repos/asf/lucy/blob/5ac44dc1/clownfish/runtime/perl/xs/XSBind.h
----------------------------------------------------------------------
diff --git a/clownfish/runtime/perl/xs/XSBind.h b/clownfish/runtime/perl/xs/XSBind.h
index 2b207cd..a3dffce 100644
--- a/clownfish/runtime/perl/xs/XSBind.h
+++ b/clownfish/runtime/perl/xs/XSBind.h
@@ -82,7 +82,7 @@ cfish_XSBind_maybe_sv_to_cfish_obj(SV *sv, cfish_VTable *vtable,
*/
static CFISH_INLINE SV*
cfish_XSBind_cfish_obj_to_sv(cfish_Obj *obj) {
- return obj ? (SV*)Cfish_Obj_To_Host(obj) : newSV(0);
+ return obj ? (SV*)CFISH_Obj_To_Host(obj) : newSV(0);
}
/** XSBind_cfish_obj_to_sv, with a cast.
@@ -97,8 +97,8 @@ static CFISH_INLINE SV*
cfish_XSBind_cfish_obj_to_sv_noinc(cfish_Obj *obj) {
SV *retval;
if (obj) {
- retval = (SV*)Cfish_Obj_To_Host(obj);
- Cfish_Obj_Dec_RefCount(obj);
+ retval = (SV*)CFISH_Obj_To_Host(obj);
+ CFISH_Obj_Dec_RefCount(obj);
}
else {
retval = newSV(0);
http://git-wip-us.apache.org/repos/asf/lucy/blob/5ac44dc1/clownfish/runtime/ruby/ext/Bind.c
----------------------------------------------------------------------
diff --git a/clownfish/runtime/ruby/ext/Bind.c b/clownfish/runtime/ruby/ext/Bind.c
index efa068f..ec11e7e 100644
--- a/clownfish/runtime/ruby/ext/Bind.c
+++ b/clownfish/runtime/ruby/ext/Bind.c
@@ -21,10 +21,10 @@
VALUE
Bind_cfish_to_ruby(cfish_Obj *obj) {
- if (Cfish_Obj_Is_A(obj, CFISH_CHARBUF)) {
+ if (CFISH_Obj_Is_A(obj, CFISH_CHARBUF)) {
return Bind_cb_to_ruby((cfish_CharBuf*)obj);
}
- else if (Cfish_Obj_Is_A(obj, CFISH_VARRAY)) {
+ else if (CFISH_Obj_Is_A(obj, CFISH_VARRAY)) {
return S_cfish_array_to_ruby_array((cfish_VArray*)obj);
}
}
@@ -35,13 +35,13 @@ Bind_cb_to_ruby(const cfish_CharBuf *cb) {
return rb_str_new2("");
}
else {
- return rb_str_new((char*)Cfish_CB_Get_Ptr8(cb), Cfish_CB_Get_Size(cb));
+ return rb_str_new((char*)CFISH_CB_Get_Ptr8(cb), CFISH_CB_Get_Size(cb));
}
}
static VALUE
S_cfish_array_to_ruby_array(cfish_VArray *varray) {
- uint32_t num_elems = Cfish_VA_Get_Size(varray);
+ uint32_t num_elems = CFISH_VA_Get_Size(varray);
VALUE ruby_array = rb_ary_new2(num_elems - 1);
@@ -49,7 +49,7 @@ S_cfish_array_to_ruby_array(cfish_VArray *varray) {
//TODO Need to determine why c99 mode is not being honored
uint32_t i;
for (uint32_t i = 0; i < num_elems; i++) {
- cfish_Obj *val = Cfish_VA_Fetch(varray, i);
+ cfish_Obj *val = CFISH_VA_Fetch(varray, i);
if (val == NULL) {
continue;
}
http://git-wip-us.apache.org/repos/asf/lucy/blob/5ac44dc1/core/Lucy/Search/NoMatchQuery.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Search/NoMatchQuery.c b/core/Lucy/Search/NoMatchQuery.c
index ec1c2df..ce09145 100644
--- a/core/Lucy/Search/NoMatchQuery.c
+++ b/core/Lucy/Search/NoMatchQuery.c
@@ -94,7 +94,7 @@ NoMatchQuery_Load_IMP(NoMatchQuery *self, Obj *dump) {
NoMatchQuery_Load_t super_load
= SUPER_METHOD_PTR(NOMATCHQUERY, Lucy_NoMatchQuery_Load);
NoMatchQuery *loaded = super_load(self, dump);
- Obj *fails = Cfish_Hash_Fetch_Str(source, "fails_to_match", 14);
+ Obj *fails = CFISH_Hash_Fetch_Str(source, "fails_to_match", 14);
NoMatchQuery_IVARS(loaded)->fails_to_match
= fails ? Obj_To_Bool(fails) : true;
return loaded;
http://git-wip-us.apache.org/repos/asf/lucy/blob/5ac44dc1/core/Lucy/Util/Freezer.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Util/Freezer.c b/core/Lucy/Util/Freezer.c
index 56928c9..44a241e 100644
--- a/core/Lucy/Util/Freezer.c
+++ b/core/Lucy/Util/Freezer.c
@@ -142,7 +142,7 @@ Freezer_deserialize(Obj *obj, InStream *instream) {
BoolNum *self = (BoolNum*)obj;
if (self && self != CFISH_TRUE && self != CFISH_FALSE) {
Bool_Dec_RefCount_t super_decref
- = SUPER_METHOD_PTR(BOOLNUM, Cfish_Bool_Dec_RefCount);
+ = SUPER_METHOD_PTR(BOOLNUM, CFISH_Bool_Dec_RefCount);
super_decref(self);
}
obj = value ? (Obj*)CFISH_TRUE : (Obj*)CFISH_FALSE;
http://git-wip-us.apache.org/repos/asf/lucy/blob/5ac44dc1/core/Lucy/Util/Json/JsonParser.y
----------------------------------------------------------------------
diff --git a/core/Lucy/Util/Json/JsonParser.y b/core/Lucy/Util/Json/JsonParser.y
index 15e4048..aa3ddcf 100644
--- a/core/Lucy/Util/Json/JsonParser.y
+++ b/core/Lucy/Util/Json/JsonParser.y
@@ -85,28 +85,28 @@ empty_object(A) ::= LEFT_CURLY_BRACKET RIGHT_CURLY_BRACKET.
single_pair_object(A) ::= LEFT_CURLY_BRACKET STRING(B) COLON value(C) RIGHT_CURLY_BRACKET.
{
A = cfish_Hash_new(1);
- Cfish_Hash_Store(A, (cfish_Obj*)B, C);
+ CFISH_Hash_Store(A, (cfish_Obj*)B, C);
CFISH_DECREF(B);
}
multi_pair_object(A) ::= LEFT_CURLY_BRACKET key_value_pair_list(B) STRING(C) COLON value(D) RIGHT_CURLY_BRACKET.
{
A = B;
- Cfish_Hash_Store(A, (cfish_Obj*)C, D);
+ CFISH_Hash_Store(A, (cfish_Obj*)C, D);
CFISH_DECREF(C);
}
key_value_pair_list(A) ::= key_value_pair_list(B) STRING(C) COLON value(D) COMMA.
{
A = B;
- Cfish_Hash_Store(A, (cfish_Obj*)C, D);
+ CFISH_Hash_Store(A, (cfish_Obj*)C, D);
CFISH_DECREF(C);
}
key_value_pair_list(A) ::= STRING(B) COLON value(C) COMMA.
{
A = cfish_Hash_new(0);
- Cfish_Hash_Store(A, (cfish_Obj*)B, C);
+ CFISH_Hash_Store(A, (cfish_Obj*)B, C);
CFISH_DECREF(B);
}
@@ -133,24 +133,24 @@ empty_array(A) ::= LEFT_SQUARE_BRACKET RIGHT_SQUARE_BRACKET.
single_elem_array(A) ::= LEFT_SQUARE_BRACKET value(B) RIGHT_SQUARE_BRACKET.
{
A = cfish_VA_new(1);
- Cfish_VA_Push(A, B);
+ CFISH_VA_Push(A, B);
}
multi_elem_array(A) ::= LEFT_SQUARE_BRACKET array_elem_list(B) value(C) RIGHT_SQUARE_BRACKET.
{
A = B;
- Cfish_VA_Push(A, C);
+ CFISH_VA_Push(A, C);
}
array_elem_list(A) ::= array_elem_list(B) value(C) COMMA.
{
A = B;
- Cfish_VA_Push(A, C);
+ CFISH_VA_Push(A, C);
}
array_elem_list(A) ::= value(B) COMMA.
{
A = cfish_VA_new(1);
- Cfish_VA_Push(A, B);
+ CFISH_VA_Push(A, B);
}
http://git-wip-us.apache.org/repos/asf/lucy/blob/5ac44dc1/core/Lucy/Util/SortExternal.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Util/SortExternal.c b/core/Lucy/Util/SortExternal.c
index 00a0447..e2648dc 100644
--- a/core/Lucy/Util/SortExternal.c
+++ b/core/Lucy/Util/SortExternal.c
@@ -134,8 +134,8 @@ SortEx_Sort_Cache_IMP(SortExternal *self) {
}
if (ivars->cache_max != 0) {
VTable *vtable = SortEx_Get_VTable(self);
- Cfish_Sort_Compare_t compare
- = (Cfish_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 (ivars->scratch_cap < ivars->cache_cap) {
ivars->scratch_cap = ivars->cache_cap;
ivars->scratch
@@ -231,8 +231,8 @@ S_absorb_slices(SortExternal *self, SortExternalIVARS *ivars,
uint8_t **slice_starts = ivars->slice_starts;
uint32_t *slice_sizes = ivars->slice_sizes;
VTable *vtable = SortEx_Get_VTable(self);
- Cfish_Sort_Compare_t compare
- = (Cfish_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 (ivars->cache_max != 0) { THROW(ERR, "Can't refill unless empty"); }
http://git-wip-us.apache.org/repos/asf/lucy/blob/5ac44dc1/perl/buildlib/Lucy/Build/Binding/Index.pm
----------------------------------------------------------------------
diff --git a/perl/buildlib/Lucy/Build/Binding/Index.pm b/perl/buildlib/Lucy/Build/Binding/Index.pm
index 165ad20..9f84043 100644
--- a/perl/buildlib/Lucy/Build/Binding/Index.pm
+++ b/perl/buildlib/Lucy/Build/Binding/Index.pm
@@ -499,7 +499,7 @@ PPCODE:
}
if (!doc) {
THROW(CFISH_ERR, "Need either a hashref or a %o",
- Cfish_VTable_Get_Name(LUCY_DOC));
+ CFISH_VTable_Get_Name(LUCY_DOC));
}
Lucy_Indexer_Add_Doc(self, doc, boost);
http://git-wip-us.apache.org/repos/asf/lucy/blob/5ac44dc1/perl/buildlib/Lucy/Build/Binding/Misc.pm
----------------------------------------------------------------------
diff --git a/perl/buildlib/Lucy/Build/Binding/Misc.pm b/perl/buildlib/Lucy/Build/Binding/Misc.pm
index 30de332..83fc45e 100644
--- a/perl/buildlib/Lucy/Build/Binding/Misc.pm
+++ b/perl/buildlib/Lucy/Build/Binding/Misc.pm
@@ -151,7 +151,7 @@ PPCODE:
lucy_RAMFileHandle *file_handle
= lucy_RAMFH_open(NULL, LUCY_FH_READ_ONLY, ram_file);
lucy_InStream *instream = lucy_InStream_open((cfish_Obj*)file_handle);
- cfish_Obj *self = Cfish_VTable_Foster_Obj(vtable, blank_obj);
+ cfish_Obj *self = CFISH_VTable_Foster_Obj(vtable, blank_obj);
cfish_Obj *deserialized = lucy_Freezer_deserialize(self, instream);
CFISH_UNUSED_VAR(cloning);
@@ -188,7 +188,7 @@ CODE:
cfish_TestFormatter *formatter
= (cfish_TestFormatter*)cfish_TestFormatterTAP_new();
cfish_TestSuite *suite = testlucy_Test_create_test_suite();
- bool result = Cfish_TestSuite_Run_Batch(suite, class_name, formatter);
+ bool result = CFISH_TestSuite_Run_Batch(suite, class_name, formatter);
CFISH_DECREF(class_name);
CFISH_DECREF(formatter);
CFISH_DECREF(suite);
http://git-wip-us.apache.org/repos/asf/lucy/blob/5ac44dc1/perl/xs/Lucy/Analysis/RegexTokenizer.c
----------------------------------------------------------------------
diff --git a/perl/xs/Lucy/Analysis/RegexTokenizer.c b/perl/xs/Lucy/Analysis/RegexTokenizer.c
index 0a5f5eb..eb6c015 100644
--- a/perl/xs/Lucy/Analysis/RegexTokenizer.c
+++ b/perl/xs/Lucy/Analysis/RegexTokenizer.c
@@ -45,13 +45,13 @@ lucy_RegexTokenizer_init(lucy_RegexTokenizer *self,
lucy_RegexTokenizerIVARS *const ivars = lucy_RegexTokenizer_IVARS(self);
#define DEFAULT_PATTERN "\\w+(?:['\\x{2019}]\\w+)*"
if (pattern) {
- if (Cfish_CB_Find_Str(pattern, "\\p", 2) != -1
- || Cfish_CB_Find_Str(pattern, "\\P", 2) != -1
+ if (CFISH_CB_Find_Str(pattern, "\\p", 2) != -1
+ || CFISH_CB_Find_Str(pattern, "\\P", 2) != -1
) {
CFISH_DECREF(self);
THROW(CFISH_ERR, "\\p and \\P constructs forbidden");
}
- ivars->pattern = Cfish_CB_Clone(pattern);
+ ivars->pattern = CFISH_CB_Clone(pattern);
}
else {
ivars->pattern = cfish_CB_new_from_trusted_utf8(
@@ -115,7 +115,7 @@ S_set_pattern_from_token_re(lucy_RegexTokenizer *self, void *token_re) {
SV *rv = newRV((SV*)token_re);
STRLEN len = 0;
char *ptr = SvPVutf8((SV*)rv, len);
- Cfish_CB_Mimic_Str(ivars->pattern, ptr, len);
+ CFISH_CB_Mimic_Str(ivars->pattern, ptr, len);
SvREFCNT_dec(rv);
}
http://git-wip-us.apache.org/repos/asf/lucy/blob/5ac44dc1/perl/xs/Lucy/Document/Doc.c
----------------------------------------------------------------------
diff --git a/perl/xs/Lucy/Document/Doc.c b/perl/xs/Lucy/Document/Doc.c
index afe78a9..c460cdf 100644
--- a/perl/xs/Lucy/Document/Doc.c
+++ b/perl/xs/Lucy/Document/Doc.c
@@ -54,14 +54,14 @@ Lucy_Doc_Get_Size_IMP(lucy_Doc *self) {
void
Lucy_Doc_Store_IMP(lucy_Doc *self, const cfish_CharBuf *field, cfish_Obj *value) {
lucy_DocIVARS *const ivars = lucy_Doc_IVARS(self);
- char *key = (char*)Cfish_CB_Get_Ptr8(field);
- size_t key_size = Cfish_CB_Get_Size(field);
+ char *key = (char*)CFISH_CB_Get_Ptr8(field);
+ size_t key_size = CFISH_CB_Get_Size(field);
SV *key_sv = newSVpvn(key, key_size);
SV *val_sv = value == NULL
? newSV(0)
- : Cfish_Obj_Is_A(value, CFISH_CHARBUF)
+ : CFISH_Obj_Is_A(value, CFISH_CHARBUF)
? XSBind_cb_to_sv((cfish_CharBuf*)value)
- : (SV*)Cfish_Obj_To_Host(value);
+ : (SV*)CFISH_Obj_To_Host(value);
SvUTF8_on(key_sv);
(void)hv_store_ent((HV*)ivars->fields, key_sv, val_sv, 0);
// TODO: make this a thread-local instead of creating it every time?
@@ -147,8 +147,8 @@ Lucy_Doc_Extract_IMP(lucy_Doc *self, cfish_CharBuf *field,
cfish_ViewCharBuf *target) {
lucy_DocIVARS *const ivars = lucy_Doc_IVARS(self);
cfish_Obj *retval = NULL;
- SV **sv_ptr = hv_fetch((HV*)ivars->fields, (char*)Cfish_CB_Get_Ptr8(field),
- Cfish_CB_Get_Size(field), 0);
+ SV **sv_ptr = hv_fetch((HV*)ivars->fields, (char*)CFISH_CB_Get_Ptr8(field),
+ CFISH_CB_Get_Size(field), 0);
if (sv_ptr && XSBind_sv_defined(*sv_ptr)) {
SV *const sv = *sv_ptr;
@@ -159,7 +159,7 @@ Lucy_Doc_Extract_IMP(lucy_Doc *self, cfish_CharBuf *field,
else {
STRLEN size;
char *ptr = SvPVutf8(sv, size);
- Cfish_ViewCB_Assign_Str(target, ptr, size);
+ CFISH_ViewCB_Assign_Str(target, ptr, size);
retval = (cfish_Obj*)target;
}
}
@@ -180,11 +180,11 @@ cfish_Hash*
Lucy_Doc_Dump_IMP(lucy_Doc *self) {
lucy_DocIVARS *const ivars = lucy_Doc_IVARS(self);
cfish_Hash *dump = cfish_Hash_new(0);
- Cfish_Hash_Store_Str(dump, "_class", 6,
- (cfish_Obj*)Cfish_CB_Clone(Lucy_Doc_Get_Class_Name(self)));
- Cfish_Hash_Store_Str(dump, "doc_id", 7,
+ CFISH_Hash_Store_Str(dump, "_class", 6,
+ (cfish_Obj*)CFISH_CB_Clone(Lucy_Doc_Get_Class_Name(self)));
+ CFISH_Hash_Store_Str(dump, "doc_id", 7,
(cfish_Obj*)cfish_CB_newf("%i32", ivars->doc_id));
- Cfish_Hash_Store_Str(dump, "fields", 6,
+ CFISH_Hash_Store_Str(dump, "fields", 6,
XSBind_perl_to_cfish((SV*)ivars->fields));
return dump;
}
@@ -193,21 +193,21 @@ lucy_Doc*
Lucy_Doc_Load_IMP(lucy_Doc *self, cfish_Obj *dump) {
cfish_Hash *source = (cfish_Hash*)CFISH_CERTIFY(dump, CFISH_HASH);
cfish_CharBuf *class_name = (cfish_CharBuf*)CFISH_CERTIFY(
- Cfish_Hash_Fetch_Str(source, "_class", 6),
+ CFISH_Hash_Fetch_Str(source, "_class", 6),
CFISH_CHARBUF);
cfish_VTable *vtable = cfish_VTable_singleton(class_name, NULL);
- lucy_Doc *loaded = (lucy_Doc*)Cfish_VTable_Make_Obj(vtable);
+ lucy_Doc *loaded = (lucy_Doc*)CFISH_VTable_Make_Obj(vtable);
cfish_Obj *doc_id = CFISH_CERTIFY(
- Cfish_Hash_Fetch_Str(source, "doc_id", 7),
+ CFISH_Hash_Fetch_Str(source, "doc_id", 7),
CFISH_OBJ);
cfish_Hash *fields = (cfish_Hash*)CFISH_CERTIFY(
- Cfish_Hash_Fetch_Str(source, "fields", 6),
+ CFISH_Hash_Fetch_Str(source, "fields", 6),
CFISH_HASH);
SV *fields_sv = XSBind_cfish_to_perl((cfish_Obj*)fields);
CHY_UNUSED_VAR(self);
lucy_DocIVARS *const loaded_ivars = lucy_Doc_IVARS(loaded);
- loaded_ivars->doc_id = (int32_t)Cfish_Obj_To_I64(doc_id);
+ loaded_ivars->doc_id = (int32_t)CFISH_Obj_To_I64(doc_id);
loaded_ivars->fields = SvREFCNT_inc(SvRV(fields_sv));
SvREFCNT_dec(fields_sv);
@@ -217,7 +217,7 @@ Lucy_Doc_Load_IMP(lucy_Doc *self, cfish_Obj *dump) {
bool
Lucy_Doc_Equals_IMP(lucy_Doc *self, cfish_Obj *other) {
if ((lucy_Doc*)other == self) { return true; }
- if (!Cfish_Obj_Is_A(other, LUCY_DOC)) { return false; }
+ if (!CFISH_Obj_Is_A(other, LUCY_DOC)) { return false; }
lucy_DocIVARS *const ivars = lucy_Doc_IVARS(self);
lucy_DocIVARS *const ovars = lucy_Doc_IVARS((lucy_Doc*)other);
http://git-wip-us.apache.org/repos/asf/lucy/blob/5ac44dc1/perl/xs/Lucy/Index/DocReader.c
----------------------------------------------------------------------
diff --git a/perl/xs/Lucy/Index/DocReader.c b/perl/xs/Lucy/Index/DocReader.c
index 089717d..55104b2 100644
--- a/perl/xs/Lucy/Index/DocReader.c
+++ b/perl/xs/Lucy/Index/DocReader.c
@@ -63,7 +63,7 @@ Lucy_DefDocReader_Fetch_Doc_IMP(lucy_DefaultDocReader *self, int32_t doc_id) {
// Find the Field's FieldType.
cfish_ZombieCharBuf *field_name_zcb
= CFISH_ZCB_WRAP_STR(field_name_ptr, field_name_len);
- Cfish_ZCB_Assign_Str(field_name_zcb, field_name_ptr, field_name_len);
+ CFISH_ZCB_Assign_Str(field_name_zcb, field_name_ptr, field_name_len);
type = Lucy_Schema_Fetch_Type(schema, (cfish_CharBuf*)field_name_zcb);
// Read the field value.
http://git-wip-us.apache.org/repos/asf/lucy/blob/5ac44dc1/perl/xs/Lucy/Index/Inverter.c
----------------------------------------------------------------------
diff --git a/perl/xs/Lucy/Index/Inverter.c b/perl/xs/Lucy/Index/Inverter.c
index 3fd88b3..8eeb3d4 100644
--- a/perl/xs/Lucy/Index/Inverter.c
+++ b/perl/xs/Lucy/Index/Inverter.c
@@ -69,10 +69,10 @@ S_fetch_entry(lucy_Inverter *self, HE *hash_entry) {
}
lucy_InverterEntry *entry
- = (lucy_InverterEntry*)Cfish_VA_Fetch(ivars->entry_pool, field_num);
+ = (lucy_InverterEntry*)CFISH_VA_Fetch(ivars->entry_pool, field_num);
if (!entry) {
entry = lucy_InvEntry_new(schema, (cfish_CharBuf*)field, field_num);
- Cfish_VA_Store(ivars->entry_pool, field_num, (cfish_Obj*)entry);
+ CFISH_VA_Store(ivars->entry_pool, field_num, (cfish_Obj*)entry);
}
return entry;
}
@@ -101,7 +101,7 @@ Lucy_Inverter_Invert_Doc_IMP(lucy_Inverter *self, lucy_Doc *doc) {
char *val_ptr = SvPVutf8(value_sv, val_len);
cfish_ViewCharBuf *value
= (cfish_ViewCharBuf*)entry_ivars->value;
- Cfish_ViewCB_Assign_Str(value, val_ptr, val_len);
+ CFISH_ViewCB_Assign_Str(value, val_ptr, val_len);
break;
}
case lucy_FType_BLOB: {
@@ -109,12 +109,12 @@ Lucy_Inverter_Invert_Doc_IMP(lucy_Inverter *self, lucy_Doc *doc) {
char *val_ptr = SvPV(value_sv, val_len);
cfish_ViewByteBuf *value
= (cfish_ViewByteBuf*)entry_ivars->value;
- Cfish_ViewBB_Assign_Bytes(value, val_ptr, val_len);
+ CFISH_ViewBB_Assign_Bytes(value, val_ptr, val_len);
break;
}
case lucy_FType_INT32: {
cfish_Integer32* value = (cfish_Integer32*)entry_ivars->value;
- Cfish_Int32_Set_Value(value, SvIV(value_sv));
+ CFISH_Int32_Set_Value(value, SvIV(value_sv));
break;
}
case lucy_FType_INT64: {
@@ -122,17 +122,17 @@ Lucy_Inverter_Invert_Doc_IMP(lucy_Inverter *self, lucy_Doc *doc) {
int64_t val = sizeof(IV) == 8
? SvIV(value_sv)
: (int64_t)SvNV(value_sv); // lossy
- Cfish_Int64_Set_Value(value, val);
+ CFISH_Int64_Set_Value(value, val);
break;
}
case lucy_FType_FLOAT32: {
cfish_Float32* value = (cfish_Float32*)entry_ivars->value;
- Cfish_Float32_Set_Value(value, (float)SvNV(value_sv));
+ CFISH_Float32_Set_Value(value, (float)SvNV(value_sv));
break;
}
case lucy_FType_FLOAT64: {
cfish_Float64* value = (cfish_Float64*)entry_ivars->value;
- Cfish_Float64_Set_Value(value, SvNV(value_sv));
+ CFISH_Float64_Set_Value(value, SvNV(value_sv));
break;
}
default: