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/23 01:56:01 UTC

[lucy-commits] [1/3] git commit: refs/heads/master - Default VA_new to a capacity of 0.

Updated Branches:
  refs/heads/master c667fd8f7 -> 63a978114


Default VA_new to a capacity of 0.


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

Branch: refs/heads/master
Commit: 63a9781144ac84a8b9692afbd313bc86c55d3fd8
Parents: 4ac715c
Author: Marvin Humphrey <ma...@rectangular.com>
Authored: Tue Aug 20 17:04:01 2013 -0700
Committer: Marvin Humphrey <ma...@rectangular.com>
Committed: Thu Aug 22 16:52:09 2013 -0700

----------------------------------------------------------------------
 clownfish/runtime/core/Clownfish/VArray.cfh   | 4 ++--
 clownfish/runtime/perl/t/binding/016-varray.t | 2 +-
 clownfish/runtime/perl/t/binding/019-obj.t    | 2 +-
 perl/t/028-sortexrun.t                        | 2 +-
 perl/t/213-segment_merging.t                  | 2 +-
 perl/t/221-sort_writer.t                      | 2 +-
 perl/t/binding/016-varray.t                   | 2 +-
 perl/t/binding/019-obj.t                      | 2 +-
 8 files changed, 9 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucy/blob/63a97811/clownfish/runtime/core/Clownfish/VArray.cfh
----------------------------------------------------------------------
diff --git a/clownfish/runtime/core/Clownfish/VArray.cfh b/clownfish/runtime/core/Clownfish/VArray.cfh
index e287bc7..3029332 100644
--- a/clownfish/runtime/core/Clownfish/VArray.cfh
+++ b/clownfish/runtime/core/Clownfish/VArray.cfh
@@ -36,14 +36,14 @@ class Clownfish::VArray cnick VA inherits Clownfish::Obj {
     uint32_t   cap;
 
     inert incremented VArray*
-    new(uint32_t capacity);
+    new(uint32_t capacity = 0);
 
     /**
      * @param capacity Initial number of elements that the object will be able
      * to hold before reallocation.
      */
     inert VArray*
-    init(VArray *self, uint32_t capacity);
+    init(VArray *self, uint32_t capacity = 0);
 
     /** Push an item onto the end of a VArray.
      */

http://git-wip-us.apache.org/repos/asf/lucy/blob/63a97811/clownfish/runtime/perl/t/binding/016-varray.t
----------------------------------------------------------------------
diff --git a/clownfish/runtime/perl/t/binding/016-varray.t b/clownfish/runtime/perl/t/binding/016-varray.t
index 2137f2e..3638716 100644
--- a/clownfish/runtime/perl/t/binding/016-varray.t
+++ b/clownfish/runtime/perl/t/binding/016-varray.t
@@ -21,7 +21,7 @@ use Clownfish;
 
 my ( $varray, $twin );
 
-$varray = Clownfish::VArray->new( capacity => 5 );
+$varray = Clownfish::VArray->new;
 $varray->push( Clownfish::CharBuf->new($_) ) for 1 .. 5;
 $varray->delete(3);
 $twin = $varray->_clone;

http://git-wip-us.apache.org/repos/asf/lucy/blob/63a97811/clownfish/runtime/perl/t/binding/019-obj.t
----------------------------------------------------------------------
diff --git a/clownfish/runtime/perl/t/binding/019-obj.t b/clownfish/runtime/perl/t/binding/019-obj.t
index 1088035..5560f48 100644
--- a/clownfish/runtime/perl/t/binding/019-obj.t
+++ b/clownfish/runtime/perl/t/binding/019-obj.t
@@ -89,7 +89,7 @@ SKIP: {
     # non-`nullable` return values correctly, by ensuring that the Perl
     # callback wrapper for inc_refcount() checks the return value and throws
     # an exception if a Perl-space implementation returns undef.
-    my $array = Clownfish::VArray->new( capacity => 3 );
+    my $array = Clownfish::VArray->new;
     eval { $array->store( 1, BadRefCount->new ); };
     like( $@, qr/NULL/,
         "Don't allow methods without nullable return values to return NULL" );

http://git-wip-us.apache.org/repos/asf/lucy/blob/63a97811/perl/t/028-sortexrun.t
----------------------------------------------------------------------
diff --git a/perl/t/028-sortexrun.t b/perl/t/028-sortexrun.t
index a9a075b..f0df52a 100644
--- a/perl/t/028-sortexrun.t
+++ b/perl/t/028-sortexrun.t
@@ -22,7 +22,7 @@ use Test::More skip_all => 'Disabled until test ported to C';
 use Lucy::Test;
 use Clownfish qw( to_perl );
 
-my $letters = Clownfish::VArray->new( capacity => 26 );
+my $letters = Clownfish::VArray->new;
 $letters->push( Clownfish::ByteBuf->new($_) ) for 'a' .. 'z';
 my $run = Lucy::Util::BBSortEx->new( external => $letters );
 $run->set_mem_thresh(5);

http://git-wip-us.apache.org/repos/asf/lucy/blob/63a97811/perl/t/213-segment_merging.t
----------------------------------------------------------------------
diff --git a/perl/t/213-segment_merging.t b/perl/t/213-segment_merging.t
index 3a1931b..eabe5ba 100644
--- a/perl/t/213-segment_merging.t
+++ b/perl/t/213-segment_merging.t
@@ -23,7 +23,7 @@ package NonMergingIndexManager;
 use base qw( Lucy::Index::IndexManager );
 
 sub recycle {
-    return Clownfish::VArray->new( capacity => 0 );
+    return Clownfish::VArray->new;
 }
 
 # BiggerSchema is like TestSchema, but it has an extra field named "aux".

http://git-wip-us.apache.org/repos/asf/lucy/blob/63a97811/perl/t/221-sort_writer.t
----------------------------------------------------------------------
diff --git a/perl/t/221-sort_writer.t b/perl/t/221-sort_writer.t
index 02f981e..45fb341 100644
--- a/perl/t/221-sort_writer.t
+++ b/perl/t/221-sort_writer.t
@@ -21,7 +21,7 @@ package NonMergingIndexManager;
 use base qw( Lucy::Index::IndexManager );
 
 sub recycle {
-    return Clownfish::VArray->new( capacity => 0 );
+    return Clownfish::VArray->new;
 }
 
 package SortSchema;

http://git-wip-us.apache.org/repos/asf/lucy/blob/63a97811/perl/t/binding/016-varray.t
----------------------------------------------------------------------
diff --git a/perl/t/binding/016-varray.t b/perl/t/binding/016-varray.t
index ce8401f..a6b3534 100644
--- a/perl/t/binding/016-varray.t
+++ b/perl/t/binding/016-varray.t
@@ -21,7 +21,7 @@ use Lucy::Test;
 
 my ( $varray, $twin );
 
-$varray = Clownfish::VArray->new( capacity => 5 );
+$varray = Clownfish::VArray->new;
 $varray->push( Clownfish::CharBuf->new($_) ) for 1 .. 5;
 $varray->delete(3);
 $twin = $varray->_clone;

http://git-wip-us.apache.org/repos/asf/lucy/blob/63a97811/perl/t/binding/019-obj.t
----------------------------------------------------------------------
diff --git a/perl/t/binding/019-obj.t b/perl/t/binding/019-obj.t
index c5f3b01..70865f9 100644
--- a/perl/t/binding/019-obj.t
+++ b/perl/t/binding/019-obj.t
@@ -130,7 +130,7 @@ SKIP: {
     # non-`nullable` return values correctly, by ensuring that the Perl
     # callback wrapper for inc_refcount() checks the return value and throws
     # an exception if a Perl-space implementation returns undef.
-    my $array = Clownfish::VArray->new( capacity => 3 );
+    my $array = Clownfish::VArray->new;
     eval { $array->store( 1, BadRefCount->new ); };
     like( $@, qr/NULL/,
         "Don't allow methods without nullable return values to return NULL" );


[lucy-commits] [3/3] git commit: refs/heads/master - Remove Make() method from Obj.

Posted by ma...@apache.org.
Remove Make() method from Obj.

Make() was flawed and underused, so remove it.


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

Branch: refs/heads/master
Commit: 89e36ec19a6a8e5be05e87da20917c0c9d68e1ee
Parents: c667fd8
Author: Marvin Humphrey <ma...@rectangular.com>
Authored: Tue Aug 20 16:13:48 2013 -0700
Committer: Marvin Humphrey <ma...@rectangular.com>
Committed: Thu Aug 22 16:52:09 2013 -0700

----------------------------------------------------------------------
 clownfish/runtime/c/src/Clownfish/Err.c         |  6 +++---
 clownfish/runtime/core/Clownfish/Err.c          | 20 ++++++--------------
 clownfish/runtime/core/Clownfish/Err.cfh        |  3 ---
 clownfish/runtime/core/Clownfish/Obj.cfh        |  5 -----
 clownfish/runtime/core/Clownfish/Test/TestObj.c |  8 +-------
 clownfish/runtime/perl/xs/XSBind.c              |  5 ++---
 core/Lucy/Store/Lock.c                          |  7 -------
 core/Lucy/Store/Lock.cfh                        |  3 ---
 8 files changed, 12 insertions(+), 45 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucy/blob/89e36ec1/clownfish/runtime/c/src/Clownfish/Err.c
----------------------------------------------------------------------
diff --git a/clownfish/runtime/c/src/Clownfish/Err.c b/clownfish/runtime/c/src/Clownfish/Err.c
index c455a17..5240a87 100644
--- a/clownfish/runtime/c/src/Clownfish/Err.c
+++ b/clownfish/runtime/c/src/Clownfish/Err.c
@@ -16,6 +16,7 @@
 
 #define CHY_USE_SHORT_NAMES
 #define CFISH_USE_SHORT_NAMES
+#define C_CFISH_ERR
 
 #include "charmony.h"
 
@@ -71,9 +72,8 @@ Err_To_Host_IMP(Err *self) {
 
 void
 Err_throw_mess(VTable *vtable, CharBuf *message) {
-    Err_Make_t make
-        = METHOD_PTR(CERTIFY(vtable, VTABLE), Cfish_Err_Make);
-    Err *err = (Err*)CERTIFY(make(NULL), ERR);
+    Err *err = (Err*)VTable_Make_Obj(vtable);
+    Err_init(err, CB_new(0));
     Err_Cat_Mess(err, message);
     DECREF(message);
     Err_do_throw(err);

http://git-wip-us.apache.org/repos/asf/lucy/blob/89e36ec1/clownfish/runtime/core/Clownfish/Err.c
----------------------------------------------------------------------
diff --git a/clownfish/runtime/core/Clownfish/Err.c b/clownfish/runtime/core/Clownfish/Err.c
index 6f853d4..fbf883f 100644
--- a/clownfish/runtime/core/Clownfish/Err.c
+++ b/clownfish/runtime/core/Clownfish/Err.c
@@ -49,12 +49,6 @@ Err_Destroy_IMP(Err *self) {
     SUPER_DESTROY(self, ERR);
 }
 
-Err*
-Err_Make_IMP(Err *self) {
-    UNUSED_VAR(self);
-    return Err_new(CB_new(0));
-}
-
 CharBuf*
 Err_To_String_IMP(Err *self) {
     return (CharBuf*)INCREF(self->mess);
@@ -70,12 +64,11 @@ Err_Cat_Mess_IMP(Err *self, const CharBuf *mess) {
 void
 THROW(VTable *vtable, char *pattern, ...) {
     va_list args;
-    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);
+    Err *err = (Err*)VTable_Make_Obj(vtable);
+    err = Err_init(err, CB_new(0));
 
     va_start(args, pattern);
-    CB_VCatF(mess, pattern, args);
+    CB_VCatF(err->mess, pattern, args);
     va_end(args);
 
     Err_do_throw(err);
@@ -173,12 +166,11 @@ 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), Cfish_Err_Make);
-    Err *err = (Err*)CERTIFY(make(NULL), ERR);
-    CharBuf *mess = Err_Get_Mess(err);
+    Err *err = (Err*)VTable_Make_Obj(vtable);
+    err = Err_init(err, CB_new(0));
 
     va_start(args, pattern);
-    S_vcat_mess(mess, file, line, func, pattern, args);
+    S_vcat_mess(err->mess, file, line, func, pattern, args);
     va_end(args);
 
     Err_do_throw(err);

http://git-wip-us.apache.org/repos/asf/lucy/blob/89e36ec1/clownfish/runtime/core/Clownfish/Err.cfh
----------------------------------------------------------------------
diff --git a/clownfish/runtime/core/Clownfish/Err.cfh b/clownfish/runtime/core/Clownfish/Err.cfh
index 00c53d4..470f08f 100644
--- a/clownfish/runtime/core/Clownfish/Err.cfh
+++ b/clownfish/runtime/core/Clownfish/Err.cfh
@@ -71,9 +71,6 @@ public class Clownfish::Err inherits Clownfish::Obj {
     void
     Add_Frame(Err *self, const char *file, int line, const char *func);
 
-    public incremented Err*
-    Make(Err *self);
-
     /** Set the value of "error", a per-thread Err shared variable.
      */
     public inert void

http://git-wip-us.apache.org/repos/asf/lucy/blob/89e36ec1/clownfish/runtime/core/Clownfish/Obj.cfh
----------------------------------------------------------------------
diff --git a/clownfish/runtime/core/Clownfish/Obj.cfh b/clownfish/runtime/core/Clownfish/Obj.cfh
index 09818bf..88e9055 100644
--- a/clownfish/runtime/core/Clownfish/Obj.cfh
+++ b/clownfish/runtime/core/Clownfish/Obj.cfh
@@ -28,11 +28,6 @@ public class Clownfish::Obj {
     public inert Obj*
     init(Obj* self);
 
-    /** Zero argument factory constructor.
-     */
-    public abstract incremented Obj*
-    Make(Obj *self);
-
     /** Return an object's refcount.
      */
     uint32_t

http://git-wip-us.apache.org/repos/asf/lucy/blob/89e36ec1/clownfish/runtime/core/Clownfish/Test/TestObj.c
----------------------------------------------------------------------
diff --git a/clownfish/runtime/core/Clownfish/Test/TestObj.c b/clownfish/runtime/core/Clownfish/Test/TestObj.c
index fb915f2..83f154b 100644
--- a/clownfish/runtime/core/Clownfish/Test/TestObj.c
+++ b/clownfish/runtime/core/Clownfish/Test/TestObj.c
@@ -127,11 +127,6 @@ S_attempt_Clone(void *context) {
 }
 
 static void
-S_attempt_Make(void *context) {
-    Obj_Make((Obj*)context);
-}
-
-static void
 S_attempt_Compare_To(void *context) {
     Obj_Compare_To((Obj*)context, (Obj*)context);
 }
@@ -171,7 +166,6 @@ test_abstract_routines(TestBatchRunner *runner) {
 
     Obj *obj = S_new_testobj();
     S_verify_abstract_error(runner, S_attempt_Clone,      obj, "Clone");
-    S_verify_abstract_error(runner, S_attempt_Make,       obj, "Make");
     S_verify_abstract_error(runner, S_attempt_Compare_To, obj, "Compare_To");
     S_verify_abstract_error(runner, S_attempt_To_I64,     obj, "To_I64");
     S_verify_abstract_error(runner, S_attempt_To_F64,     obj, "To_F64");
@@ -181,7 +175,7 @@ test_abstract_routines(TestBatchRunner *runner) {
 
 void
 TestObj_Run_IMP(TestObj *self, TestBatchRunner *runner) {
-    TestBatchRunner_Plan(runner, (TestBatch*)self, 18);
+    TestBatchRunner_Plan(runner, (TestBatch*)self, 17);
     test_refcounts(runner);
     test_To_String(runner);
     test_Equals(runner);

http://git-wip-us.apache.org/repos/asf/lucy/blob/89e36ec1/clownfish/runtime/perl/xs/XSBind.c
----------------------------------------------------------------------
diff --git a/clownfish/runtime/perl/xs/XSBind.c b/clownfish/runtime/perl/xs/XSBind.c
index e60524b..3ab80e0 100644
--- a/clownfish/runtime/perl/xs/XSBind.c
+++ b/clownfish/runtime/perl/xs/XSBind.c
@@ -858,9 +858,8 @@ Cfish_Err_To_Host_IMP(cfish_Err *self) {
 
 void
 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 *err = (cfish_Err*)Cfish_VTable_Make_Obj(vtable);
+    cfish_Err_init(err, cfish_CB_new(0));
     Cfish_Err_Cat_Mess(err, message);
     CFISH_DECREF(message);
     cfish_Err_do_throw(err);

http://git-wip-us.apache.org/repos/asf/lucy/blob/89e36ec1/core/Lucy/Store/Lock.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Store/Lock.c b/core/Lucy/Store/Lock.c
index e0675af..9d56377 100644
--- a/core/Lucy/Store/Lock.c
+++ b/core/Lucy/Store/Lock.c
@@ -302,10 +302,3 @@ LockErr_init(LockErr *self, CharBuf *message) {
     return self;
 }
 
-LockErr*
-LockErr_Make_IMP(LockErr *self) {
-    UNUSED_VAR(self);
-    return LockErr_new(CB_new(0));
-}
-
-

http://git-wip-us.apache.org/repos/asf/lucy/blob/89e36ec1/core/Lucy/Store/Lock.cfh
----------------------------------------------------------------------
diff --git a/core/Lucy/Store/Lock.cfh b/core/Lucy/Store/Lock.cfh
index b9187d8..0c95617 100644
--- a/core/Lucy/Store/Lock.cfh
+++ b/core/Lucy/Store/Lock.cfh
@@ -167,9 +167,6 @@ public class Lucy::Store::LockErr inherits Clownfish::Err {
 
     public inert LockErr*
     init(LockErr *self, CharBuf *message);
-
-    public incremented LockErr*
-    Make(LockErr *self);
 }
 
 


[lucy-commits] [2/3] git commit: refs/heads/master - Rename CharBuf#Nip_One to Nibble.

Posted by ma...@apache.org.
Rename CharBuf#Nip_One to Nibble.


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

Branch: refs/heads/master
Commit: 4ac715cc537f0e395d3d032ac3d9d9f3eaf84979
Parents: 89e36ec
Author: Marvin Humphrey <ma...@rectangular.com>
Authored: Tue Aug 20 16:41:14 2013 -0700
Committer: Marvin Humphrey <ma...@rectangular.com>
Committed: Thu Aug 22 16:52:09 2013 -0700

----------------------------------------------------------------------
 clownfish/runtime/core/Clownfish/CharBuf.c      | 16 ++++++++--------
 clownfish/runtime/core/Clownfish/CharBuf.cfh    |  4 ++--
 clownfish/runtime/core/Clownfish/Test/TestObj.c |  2 +-
 clownfish/runtime/core/Clownfish/VTable.c       |  2 +-
 core/Lucy/Highlight/Highlighter.c               |  6 +++---
 core/Lucy/Index/Segment.c                       |  2 +-
 core/Lucy/Search/QueryParser.c                  |  4 ++--
 core/Lucy/Search/QueryParser/QueryLexer.c       | 10 +++++-----
 core/Lucy/Store/FSFolder.c                      |  2 +-
 core/Lucy/Store/Folder.c                        |  2 +-
 core/Lucy/Store/Lock.c                          |  2 +-
 core/Lucy/Util/IndexFileNames.c                 |  2 +-
 core/Lucy/Util/Json.c                           |  2 +-
 13 files changed, 28 insertions(+), 28 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucy/blob/4ac715cc/clownfish/runtime/core/Clownfish/CharBuf.c
----------------------------------------------------------------------
diff --git a/clownfish/runtime/core/Clownfish/CharBuf.c b/clownfish/runtime/core/Clownfish/CharBuf.c
index 6890d8b..043dedf 100644
--- a/clownfish/runtime/core/Clownfish/CharBuf.c
+++ b/clownfish/runtime/core/Clownfish/CharBuf.c
@@ -138,9 +138,9 @@ CB_Hash_Sum_IMP(CharBuf *self) {
     uint32_t hashvalue = 5381;
     ZombieCharBuf *iterator = ZCB_WRAP(self);
 
-    const CB_Nip_One_t nip_one = METHOD_PTR(iterator->vtable, Cfish_CB_Nip_One);
+    const CB_Nibble_t nibble = METHOD_PTR(iterator->vtable, Cfish_CB_Nibble);
     while (iterator->size) {
-        uint32_t code_point = (uint32_t)nip_one((CharBuf*)iterator);
+        uint32_t code_point = (uint32_t)nibble((CharBuf*)iterator);
         hashvalue = ((hashvalue << 5) + hashvalue) ^ code_point;
     }
 
@@ -391,13 +391,13 @@ CB_BaseX_To_I64_IMP(CharBuf *self, uint32_t base) {
 
     // Advance past minus sign.
     if (ZCB_Code_Point_At(iterator, 0) == '-') {
-        ZCB_Nip_One(iterator);
+        ZCB_Nibble(iterator);
         is_negative = true;
     }
 
     // Accumulate.
     while (iterator->size) {
-        int32_t code_point = ZCB_Nip_One(iterator);
+        int32_t code_point = ZCB_Nibble(iterator);
         if (isalnum(code_point)) {
             int32_t addend = isdigit(code_point)
                              ? code_point - '0'
@@ -641,7 +641,7 @@ CB_Nip_IMP(CharBuf *self, size_t count) {
 }
 
 int32_t
-CB_Nip_One_IMP(CharBuf *self) {
+CB_Nibble_IMP(CharBuf *self) {
     if (self->size == 0) {
         return 0;
     }
@@ -747,8 +747,8 @@ CB_compare(const void *va, const void *vb) {
     ZombieCharBuf *iterator_a = ZCB_WRAP(a);
     ZombieCharBuf *iterator_b = ZCB_WRAP(b);
     while (iterator_a->size && iterator_b->size) {
-        int32_t code_point_a = ZCB_Nip_One(iterator_a);
-        int32_t code_point_b = ZCB_Nip_One(iterator_b);
+        int32_t code_point_a = ZCB_Nibble(iterator_a);
+        int32_t code_point_b = ZCB_Nibble(iterator_b);
         const int32_t comparison = code_point_a - code_point_b;
         if (comparison != 0) { return comparison; }
     }
@@ -874,7 +874,7 @@ ViewCB_Nip_IMP(ViewCharBuf *self, size_t count) {
 }
 
 int32_t
-ViewCB_Nip_One_IMP(ViewCharBuf *self) {
+ViewCB_Nibble_IMP(ViewCharBuf *self) {
     if (self->size == 0) {
         return 0;
     }

http://git-wip-us.apache.org/repos/asf/lucy/blob/4ac715cc/clownfish/runtime/core/Clownfish/CharBuf.cfh
----------------------------------------------------------------------
diff --git a/clownfish/runtime/core/Clownfish/CharBuf.cfh b/clownfish/runtime/core/Clownfish/CharBuf.cfh
index edfc251..12fcf6d 100644
--- a/clownfish/runtime/core/Clownfish/CharBuf.cfh
+++ b/clownfish/runtime/core/Clownfish/CharBuf.cfh
@@ -264,7 +264,7 @@ class Clownfish::CharBuf cnick CB
      * point, or 0 if the string was empty.
      */
     int32_t
-    Nip_One(CharBuf *self);
+    Nibble(CharBuf *self);
 
     /** Remove characters (measured in code points) from the end of the
      * CharBuf.  Returns the number chopped.
@@ -339,7 +339,7 @@ class Clownfish::ViewCharBuf cnick ViewCB
     Nip(ViewCharBuf *self, size_t count);
 
     int32_t
-    Nip_One(ViewCharBuf *self);
+    Nibble(ViewCharBuf *self);
 
     /** Throws an error. */
     char*

http://git-wip-us.apache.org/repos/asf/lucy/blob/4ac715cc/clownfish/runtime/core/Clownfish/Test/TestObj.c
----------------------------------------------------------------------
diff --git a/clownfish/runtime/core/Clownfish/Test/TestObj.c b/clownfish/runtime/core/Clownfish/Test/TestObj.c
index 83f154b..a3fd446 100644
--- a/clownfish/runtime/core/Clownfish/Test/TestObj.c
+++ b/clownfish/runtime/core/Clownfish/Test/TestObj.c
@@ -70,7 +70,7 @@ test_To_String(TestBatchRunner *runner) {
     ZombieCharBuf *temp = ZCB_WRAP(string);
     while (ZCB_Get_Size(temp)) {
         if (ZCB_Starts_With_Str(temp, "TestObj", 7)) { break; }
-        ZCB_Nip_One(temp);
+        ZCB_Nibble(temp);
     }
     TEST_TRUE(runner, ZCB_Starts_With_Str(temp, "TestObj", 7), "To_String");
     DECREF(string);

http://git-wip-us.apache.org/repos/asf/lucy/blob/4ac715cc/clownfish/runtime/core/Clownfish/VTable.c
----------------------------------------------------------------------
diff --git a/clownfish/runtime/core/Clownfish/VTable.c b/clownfish/runtime/core/Clownfish/VTable.c
index 5420412..5914dd1 100644
--- a/clownfish/runtime/core/Clownfish/VTable.c
+++ b/clownfish/runtime/core/Clownfish/VTable.c
@@ -329,7 +329,7 @@ S_scrunch_charbuf(CharBuf *source, CharBuf *target) {
     ZombieCharBuf *iterator = ZCB_WRAP(source);
     CB_Set_Size(target, 0);
     while (ZCB_Get_Size(iterator)) {
-        uint32_t code_point = ZCB_Nip_One(iterator);
+        uint32_t code_point = ZCB_Nibble(iterator);
         if (code_point > 127) {
             THROW(ERR, "Can't fold case for %o", source);
         }

http://git-wip-us.apache.org/repos/asf/lucy/blob/4ac715cc/core/Lucy/Highlight/Highlighter.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Highlight/Highlighter.c b/core/Lucy/Highlight/Highlighter.c
index d07df31..7481500 100644
--- a/core/Lucy/Highlight/Highlighter.c
+++ b/core/Lucy/Highlight/Highlighter.c
@@ -404,7 +404,7 @@ Highlighter_Raw_Excerpt_IMP(Highlighter *self, const CharBuf *field_val,
         }
 
         do {
-            uint32_t code_point = ZCB_Nip_One(temp);
+            uint32_t code_point = ZCB_Nibble(temp);
             start++;
             this_excerpt_len--;
 
@@ -704,7 +704,7 @@ S_encode_entities(CharBuf *text, CharBuf *encoded) {
 
     // Scan first so that we only allocate once.
     uint32_t code_point;
-    while (0 != (code_point = ZCB_Nip_One(temp))) {
+    while (0 != (code_point = ZCB_Nibble(temp))) {
         if (code_point > 127
             || (!isgraph(code_point) && !isspace(code_point))
             || code_point == '<'
@@ -722,7 +722,7 @@ S_encode_entities(CharBuf *text, CharBuf *encoded) {
     CB_Grow(encoded, space);
     CB_Set_Size(encoded, 0);
     ZCB_Assign(temp, text);
-    while (0 != (code_point = ZCB_Nip_One(temp))) {
+    while (0 != (code_point = ZCB_Nibble(temp))) {
         if (code_point > 127
             || (!isgraph(code_point) && !isspace(code_point))
            ) {

http://git-wip-us.apache.org/repos/asf/lucy/blob/4ac715cc/core/Lucy/Index/Segment.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Index/Segment.c b/core/Lucy/Index/Segment.c
index 67feec8..6deea89 100644
--- a/core/Lucy/Index/Segment.c
+++ b/core/Lucy/Index/Segment.c
@@ -69,7 +69,7 @@ Seg_valid_seg_name(const CharBuf *name) {
         ZombieCharBuf *scratch = ZCB_WRAP(name);
         ZCB_Nip(scratch, 4);
         uint32_t code_point;
-        while (0 != (code_point = ZCB_Nip_One(scratch))) {
+        while (0 != (code_point = ZCB_Nibble(scratch))) {
             if (!isalnum(code_point)) { return false; }
         }
         if (ZCB_Get_Size(scratch) == 0) { return true; } // Success!

http://git-wip-us.apache.org/repos/asf/lucy/blob/4ac715cc/core/Lucy/Search/QueryParser.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Search/QueryParser.c b/core/Lucy/Search/QueryParser.c
index 9ecb710..2346bf2 100644
--- a/core/Lucy/Search/QueryParser.c
+++ b/core/Lucy/Search/QueryParser.c
@@ -831,9 +831,9 @@ S_unescape(QueryParser *self, CharBuf *orig, CharBuf *target) {
     CB_Set_Size(target, 0);
     CB_Grow(target, CB_Get_Size(orig) + 4);
 
-    while (0 != (code_point = ZCB_Nip_One(source))) {
+    while (0 != (code_point = ZCB_Nibble(source))) {
         if (code_point == '\\') {
-            uint32_t next_code_point = ZCB_Nip_One(source);
+            uint32_t next_code_point = ZCB_Nibble(source);
             if (next_code_point == ':'
                 || next_code_point == '"'
                 || next_code_point == '\\'

http://git-wip-us.apache.org/repos/asf/lucy/blob/4ac715cc/core/Lucy/Search/QueryParser/QueryLexer.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Search/QueryParser/QueryLexer.c b/core/Lucy/Search/QueryParser/QueryLexer.c
index 7c8ae41..e5def1c 100644
--- a/core/Lucy/Search/QueryParser/QueryLexer.c
+++ b/core/Lucy/Search/QueryParser/QueryLexer.c
@@ -235,9 +235,9 @@ S_consume_text(ZombieCharBuf *qstring) {
     ZombieCharBuf *text  = ZCB_WRAP((CharBuf*)qstring);
     size_t tick = 0;
     while (1) {
-        uint32_t code_point = ZCB_Nip_One(qstring);
+        uint32_t code_point = ZCB_Nibble(qstring);
         if (code_point == '\\') {
-            code_point = ZCB_Nip_One(qstring);
+            code_point = ZCB_Nibble(qstring);
             tick++;
             if (code_point == 0) {
                 break;
@@ -261,13 +261,13 @@ S_consume_text(ZombieCharBuf *qstring) {
 static ParserElem*
 S_consume_quoted_string(ZombieCharBuf *qstring) {
     ZombieCharBuf *text = ZCB_WRAP((CharBuf*)qstring);
-    if (ZCB_Nip_One(qstring) != '"') {
+    if (ZCB_Nibble(qstring) != '"') {
         THROW(ERR, "Internal error: expected a quote");
     }
 
     size_t tick = 1;
     while (1) {
-        uint32_t code_point = ZCB_Nip_One(qstring);
+        uint32_t code_point = ZCB_Nibble(qstring);
         if (code_point == '"') {
             tick += 1;
             break;
@@ -276,7 +276,7 @@ S_consume_quoted_string(ZombieCharBuf *qstring) {
             break;
         }
         else if (code_point == '\\') {
-            ZCB_Nip_One(qstring);
+            ZCB_Nibble(qstring);
             tick += 2;
         }
         else {

http://git-wip-us.apache.org/repos/asf/lucy/blob/4ac715cc/core/Lucy/Store/FSFolder.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Store/FSFolder.c b/core/Lucy/Store/FSFolder.c
index 00b719e..d9cc23a 100644
--- a/core/Lucy/Store/FSFolder.c
+++ b/core/Lucy/Store/FSFolder.c
@@ -299,7 +299,7 @@ static bool
 S_is_local_entry(const CharBuf *path) {
     ZombieCharBuf *scratch = ZCB_WRAP(path);
     uint32_t code_point;
-    while (0 != (code_point = ZCB_Nip_One(scratch))) {
+    while (0 != (code_point = ZCB_Nibble(scratch))) {
         if (code_point == '/') { return false; }
     }
     return true;

http://git-wip-us.apache.org/repos/asf/lucy/blob/4ac715cc/core/Lucy/Store/Folder.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Store/Folder.c b/core/Lucy/Store/Folder.c
index 32892f2..a0012e1 100644
--- a/core/Lucy/Store/Folder.c
+++ b/core/Lucy/Store/Folder.c
@@ -432,7 +432,7 @@ S_enclosing_folder(Folder *self, ZombieCharBuf *path) {
     // Find first component of the file path.
     ZombieCharBuf *scratch        = ZCB_WRAP((CharBuf*)path);
     ZombieCharBuf *path_component = ZCB_WRAP((CharBuf*)path);
-    while (0 != (code_point = ZCB_Nip_One(scratch))) {
+    while (0 != (code_point = ZCB_Nibble(scratch))) {
         if (code_point == '/') {
             ZCB_Truncate(path_component, path_component_len);
             ZCB_Nip(path, path_component_len + 1);

http://git-wip-us.apache.org/repos/asf/lucy/blob/4ac715cc/core/Lucy/Store/Lock.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Store/Lock.c b/core/Lucy/Store/Lock.c
index 9d56377..71a6f49 100644
--- a/core/Lucy/Store/Lock.c
+++ b/core/Lucy/Store/Lock.c
@@ -41,7 +41,7 @@ Lock_init(Lock *self, Folder *folder, const CharBuf *name,
     }
     ZombieCharBuf *scratch = ZCB_WRAP(name);
     uint32_t code_point;
-    while (0 != (code_point = ZCB_Nip_One(scratch))) {
+    while (0 != (code_point = ZCB_Nibble(scratch))) {
         if (isalnum(code_point)
             || code_point == '.'
             || code_point == '-'

http://git-wip-us.apache.org/repos/asf/lucy/blob/4ac715cc/core/Lucy/Util/IndexFileNames.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Util/IndexFileNames.c b/core/Lucy/Util/IndexFileNames.c
index 1a02f2c..72229b6 100644
--- a/core/Lucy/Util/IndexFileNames.c
+++ b/core/Lucy/Util/IndexFileNames.c
@@ -55,7 +55,7 @@ IxFileNames_extract_gen(const CharBuf *name) {
     // Advance past first underscore.  Bail if we run out of string or if we
     // encounter a NULL.
     while (1) {
-        uint32_t code_point = ZCB_Nip_One(num_string);
+        uint32_t code_point = ZCB_Nibble(num_string);
         if (code_point == 0) { return 0; }
         else if (code_point == '_') { break; }
     }

http://git-wip-us.apache.org/repos/asf/lucy/blob/4ac715cc/core/Lucy/Util/Json.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Util/Json.c b/core/Lucy/Util/Json.c
index 5db17a5..8a2c22f 100644
--- a/core/Lucy/Util/Json.c
+++ b/core/Lucy/Util/Json.c
@@ -179,7 +179,7 @@ S_append_json_string(Obj *dump, CharBuf *json) {
     // Process string data.
     ZombieCharBuf *iterator = ZCB_WRAP((CharBuf*)dump);
     while (ZCB_Get_Size(iterator)) {
-        uint32_t code_point = ZCB_Nip_One(iterator);
+        uint32_t code_point = ZCB_Nibble(iterator);
         if (code_point > 127) {
             // There is no need to escape any high characters, including those
             // above the BMP, as we assume that the destination channel can