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/09/30 23:15:34 UTC

[lucy-commits] [1/6] git commit: refs/heads/cfish-string-prep1 - Convert 'const Obj' to 'Obj'

Updated Branches:
  refs/heads/cfish-string-prep1 b854f6bf6 -> beee5ebb5


Convert 'const Obj' to 'Obj'


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

Branch: refs/heads/cfish-string-prep1
Commit: d0f75c445754db6d4a592fc14373f21b6a557ce6
Parents: 41ea616
Author: Nick Wellnhofer <we...@aevum.de>
Authored: Mon Sep 30 22:46:48 2013 +0200
Committer: Nick Wellnhofer <we...@aevum.de>
Committed: Mon Sep 30 22:47:31 2013 +0200

----------------------------------------------------------------------
 clownfish/runtime/core/Clownfish/Hash.c   | 10 +++++-----
 clownfish/runtime/core/Clownfish/Hash.cfh |  6 +++---
 core/Lucy/Search/TermQuery.c              |  4 ++--
 core/Lucy/Search/TermQuery.cfh            |  4 ++--
 4 files changed, 12 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucy/blob/d0f75c44/clownfish/runtime/core/Clownfish/Hash.c
----------------------------------------------------------------------
diff --git a/clownfish/runtime/core/Clownfish/Hash.c b/clownfish/runtime/core/Clownfish/Hash.c
index fd78864..ed6cb6f 100644
--- a/clownfish/runtime/core/Clownfish/Hash.c
+++ b/clownfish/runtime/core/Clownfish/Hash.c
@@ -48,7 +48,7 @@ SI_kill_iter(Hash *self);
 
 // Return the entry associated with the key, if any.
 static CFISH_INLINE HashEntry*
-SI_fetch_entry(Hash *self, const Obj *key, int32_t hash_sum);
+SI_fetch_entry(Hash *self, Obj *key, int32_t hash_sum);
 
 // Double the number of buckets and redistribute all entries.
 static CFISH_INLINE HashEntry*
@@ -179,7 +179,7 @@ Hash_Fetch_Utf8_IMP(Hash *self, const char *key, size_t key_len) {
 }
 
 static CFISH_INLINE HashEntry*
-SI_fetch_entry(Hash *self, const Obj *key, int32_t hash_sum) {
+SI_fetch_entry(Hash *self, Obj *key, int32_t hash_sum) {
     uint32_t tick = hash_sum;
     HashEntry *const entries = (HashEntry*)self->entries;
     HashEntry *entry;
@@ -201,13 +201,13 @@ SI_fetch_entry(Hash *self, const Obj *key, int32_t hash_sum) {
 }
 
 Obj*
-Hash_Fetch_IMP(Hash *self, const Obj *key) {
+Hash_Fetch_IMP(Hash *self, Obj *key) {
     HashEntry *entry = SI_fetch_entry(self, key, Obj_Hash_Sum(key));
     return entry ? entry->value : NULL;
 }
 
 Obj*
-Hash_Delete_IMP(Hash *self, const Obj *key) {
+Hash_Delete_IMP(Hash *self, Obj *key) {
     HashEntry *entry = SI_fetch_entry(self, key, Obj_Hash_Sum(key));
     if (entry) {
         Obj *value = entry->value;
@@ -265,7 +265,7 @@ Hash_Next_IMP(Hash *self, Obj **key, Obj **value) {
 }
 
 Obj*
-Hash_Find_Key_IMP(Hash *self, const Obj *key, int32_t hash_sum) {
+Hash_Find_Key_IMP(Hash *self, Obj *key, int32_t hash_sum) {
     HashEntry *entry = SI_fetch_entry(self, key, hash_sum);
     return entry ? entry->key : NULL;
 }

http://git-wip-us.apache.org/repos/asf/lucy/blob/d0f75c44/clownfish/runtime/core/Clownfish/Hash.cfh
----------------------------------------------------------------------
diff --git a/clownfish/runtime/core/Clownfish/Hash.cfh b/clownfish/runtime/core/Clownfish/Hash.cfh
index 5f289fd..afa1904 100644
--- a/clownfish/runtime/core/Clownfish/Hash.cfh
+++ b/clownfish/runtime/core/Clownfish/Hash.cfh
@@ -65,7 +65,7 @@ class Clownfish::Hash inherits Clownfish::Obj {
      * @return the value, or NULL if <code>key</code> is not present.
      */
     nullable Obj*
-    Fetch(Hash *self, const Obj *key);
+    Fetch(Hash *self, Obj *key);
 
     nullable Obj*
     Fetch_Utf8(Hash *self, const char *key, size_t key_len);
@@ -76,7 +76,7 @@ class Clownfish::Hash inherits Clownfish::Obj {
      * succeeds; otherwise NULL.
      */
     incremented nullable Obj*
-    Delete(Hash *self, const Obj *key);
+    Delete(Hash *self, Obj *key);
 
     incremented nullable Obj*
     Delete_Utf8(Hash *self, const char *key, size_t key_ley);
@@ -101,7 +101,7 @@ class Clownfish::Hash inherits Clownfish::Obj {
      * rather than its value.
      */
     nullable Obj*
-    Find_Key(Hash *self, const Obj *key, int32_t hash_sum);
+    Find_Key(Hash *self, Obj *key, int32_t hash_sum);
 
     /** Return an VArray of pointers to the hash's keys.
      */

http://git-wip-us.apache.org/repos/asf/lucy/blob/d0f75c44/core/Lucy/Search/TermQuery.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Search/TermQuery.c b/core/Lucy/Search/TermQuery.c
index 913d6a5..38db59a 100644
--- a/core/Lucy/Search/TermQuery.c
+++ b/core/Lucy/Search/TermQuery.c
@@ -35,13 +35,13 @@
 #include "Lucy/Util/Freezer.h"
 
 TermQuery*
-TermQuery_new(String *field, const Obj *term) {
+TermQuery_new(String *field, Obj *term) {
     TermQuery *self = (TermQuery*)VTable_Make_Obj(TERMQUERY);
     return TermQuery_init(self, field, term);
 }
 
 TermQuery*
-TermQuery_init(TermQuery *self, String *field, const Obj *term) {
+TermQuery_init(TermQuery *self, String *field, Obj *term) {
     Query_init((Query*)self, 1.0f);
     TermQueryIVARS *const ivars = TermQuery_IVARS(self);
     ivars->field  = Str_Clone(field);

http://git-wip-us.apache.org/repos/asf/lucy/blob/d0f75c44/core/Lucy/Search/TermQuery.cfh
----------------------------------------------------------------------
diff --git a/core/Lucy/Search/TermQuery.cfh b/core/Lucy/Search/TermQuery.cfh
index a59b4c6..cbdd42c 100644
--- a/core/Lucy/Search/TermQuery.cfh
+++ b/core/Lucy/Search/TermQuery.cfh
@@ -29,14 +29,14 @@ public class Lucy::Search::TermQuery inherits Lucy::Search::Query {
     Obj    *term;
 
     inert incremented TermQuery*
-    new(String *field, const Obj *term);
+    new(String *field, Obj *term);
 
     /**
      * @param field Field name.
      * @param term Term text.
      */
     public inert TermQuery*
-    init(TermQuery *self, String *field, const Obj *term);
+    init(TermQuery *self, String *field, Obj *term);
 
     /** Accessor for object's <code>field</code> member.
      */


[lucy-commits] [4/6] git commit: refs/heads/cfish-string-prep1 - Remove un-const-ing from method invocation funcs.

Posted by nw...@apache.org.
Remove un-const-ing from method invocation funcs.

Method invocation functions have been casting away const-ness by
accepting `const prefix_Foo *self` as the invocant but then invoking
the retrieved function pointer with `self` cast to `(prefix_Foo*)`.
This was necessary to avoid warnings from "const CharBuf" immutable
strings -- but now our String type is immutable without requiring
`const`, allowing us to improve type safety by removing the cast.


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

Branch: refs/heads/cfish-string-prep1
Commit: 8098c3ac33de2b871a84e507754a54f0ec5fe10e
Parents: 08974ea
Author: Marvin Humphrey <ma...@rectangular.com>
Authored: Mon Sep 30 11:56:50 2013 -0700
Committer: Nick Wellnhofer <we...@aevum.de>
Committed: Mon Sep 30 23:13:31 2013 +0200

----------------------------------------------------------------------
 clownfish/compiler/src/CFCBindMethod.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucy/blob/8098c3ac/clownfish/compiler/src/CFCBindMethod.c
----------------------------------------------------------------------
diff --git a/clownfish/compiler/src/CFCBindMethod.c b/clownfish/compiler/src/CFCBindMethod.c
index 0a2f7c9..3448e44 100644
--- a/clownfish/compiler/src/CFCBindMethod.c
+++ b/clownfish/compiler/src/CFCBindMethod.c
@@ -115,16 +115,15 @@ S_virtual_method_def(CFCMethod *method, CFCClass *klass) {
     const char pattern[] =
         "extern %sVISIBLE size_t %s;\n"
         "static CFISH_INLINE %s\n"
-        "%s(const %s *self%s) {\n"
+        "%s(%s *self%s) {\n"
         "    const %s method = (%s)cfish_obj_method(self, %s);\n"
-        "    %smethod((%s*)self%s);\n"
+        "    %smethod(self%s);\n"
         "}\n";
     char *method_def
         = CFCUtil_sprintf(pattern, PREFIX, full_offset_sym, ret_type_str,
                           full_meth_sym, invoker_struct, params_minus_invoker,
                           full_typedef, full_typedef, full_offset_sym,
-                          maybe_return, invoker_struct,
-                          arg_names_minus_invoker);
+                          maybe_return, arg_names_minus_invoker);
 
     FREEMEM(full_offset_sym);
     FREEMEM(full_meth_sym);


[lucy-commits] [5/6] git commit: refs/heads/cfish-string-prep1 - Switch String#Hash to SStrIter_Next_t

Posted by nw...@apache.org.
Switch String#Hash to SStrIter_Next_t

Now that method typedefs are fixed, we don't have to fetch the method
pointer form the implementing class.


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

Branch: refs/heads/cfish-string-prep1
Commit: beee5ebb529b6a64465556c3a84a65c90311db72
Parents: 8098c3a
Author: Nick Wellnhofer <we...@aevum.de>
Authored: Mon Sep 30 22:54:58 2013 +0200
Committer: Nick Wellnhofer <we...@aevum.de>
Committed: Mon Sep 30 23:13:31 2013 +0200

----------------------------------------------------------------------
 clownfish/runtime/core/Clownfish/String.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucy/blob/beee5ebb/clownfish/runtime/core/Clownfish/String.c
----------------------------------------------------------------------
diff --git a/clownfish/runtime/core/Clownfish/String.c b/clownfish/runtime/core/Clownfish/String.c
index 6396dc9..41ecab2 100644
--- a/clownfish/runtime/core/Clownfish/String.c
+++ b/clownfish/runtime/core/Clownfish/String.c
@@ -202,10 +202,10 @@ Str_Hash_Sum_IMP(String *self) {
     uint32_t hashvalue = 5381;
     StackStringIterator *iter = STR_STACKTOP(self);
 
-    const StrIter_Next_t next
-        = METHOD_PTR(STRINGITERATOR, CFISH_StrIter_Next);
+    const SStrIter_Next_t next
+        = METHOD_PTR(STACKSTRINGITERATOR, CFISH_SStrIter_Next);
     int32_t code_point;
-    while (STRITER_DONE != (code_point = next((StringIterator*)iter))) {
+    while (STRITER_DONE != (code_point = next(iter))) {
         hashvalue = ((hashvalue << 5) + hashvalue) ^ code_point;
     }
 


[lucy-commits] [3/6] git commit: refs/heads/cfish-string-prep1 - Fix the invocant type on method typedefs.

Posted by nw...@apache.org.
Fix the invocant type on method typedefs.

Method typedefs, like method invocation inline functions, are defined
for each class in the inheritance chain.  Prior to this fix, the "self"
type in the typedef was the type of the last concrete implementor
rather than the type of the invocant.


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

Branch: refs/heads/cfish-string-prep1
Commit: 08974ea7a3410a070070fade5450f459c9eccf7c
Parents: f7b728a
Author: Marvin Humphrey <ma...@rectangular.com>
Authored: Mon Sep 30 11:52:32 2013 -0700
Committer: Nick Wellnhofer <we...@aevum.de>
Committed: Mon Sep 30 23:13:31 2013 +0200

----------------------------------------------------------------------
 clownfish/compiler/src/CFCBindMethod.c | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucy/blob/08974ea7/clownfish/compiler/src/CFCBindMethod.c
----------------------------------------------------------------------
diff --git a/clownfish/compiler/src/CFCBindMethod.c b/clownfish/compiler/src/CFCBindMethod.c
index c60cc98..0a2f7c9 100644
--- a/clownfish/compiler/src/CFCBindMethod.c
+++ b/clownfish/compiler/src/CFCBindMethod.c
@@ -88,8 +88,6 @@ S_virtual_method_def(CFCMethod *method, CFCClass *klass) {
     CFCParamList *param_list = CFCMethod_get_param_list(method);
     const char *PREFIX         = CFCClass_get_PREFIX(klass);
     const char *invoker_struct = CFCClass_full_struct_sym(klass);
-    const char *common_struct 
-        = CFCType_get_specifier(CFCMethod_self_type(method));
 
     char *full_meth_sym   = CFCMethod_full_method_sym(method, klass);
     char *full_offset_sym = CFCMethod_full_offset_sym(method, klass);
@@ -125,7 +123,7 @@ S_virtual_method_def(CFCMethod *method, CFCClass *klass) {
         = CFCUtil_sprintf(pattern, PREFIX, full_offset_sym, ret_type_str,
                           full_meth_sym, invoker_struct, params_minus_invoker,
                           full_typedef, full_typedef, full_offset_sym,
-                          maybe_return, common_struct,
+                          maybe_return, invoker_struct,
                           arg_names_minus_invoker);
 
     FREEMEM(full_offset_sym);
@@ -136,11 +134,17 @@ S_virtual_method_def(CFCMethod *method, CFCClass *klass) {
 
 char*
 CFCBindMeth_typedef_dec(struct CFCMethod *method, CFCClass *klass) {
-    const char *params = CFCParamList_to_c(CFCMethod_get_param_list(method));
+    const char *params_minus_invoker
+        = CFCParamList_to_c(CFCMethod_get_param_list(method));
+    while (*params_minus_invoker && *params_minus_invoker != ',') {
+        params_minus_invoker++;
+    }
+    const char *self_struct = CFCClass_full_struct_sym(klass);
     const char *ret_type = CFCType_to_c(CFCMethod_get_return_type(method));
     char *full_typedef = CFCMethod_full_typedef(method, klass);
-    char *buf = CFCUtil_sprintf("typedef %s\n(*%s)(%s);\n", ret_type,
-                                full_typedef, params);
+    char *buf = CFCUtil_sprintf("typedef %s\n(*%s)(%s *self%s);\n", ret_type,
+                                full_typedef, self_struct,
+                                params_minus_invoker);
     FREEMEM(full_typedef);
     return buf;
 }


[lucy-commits] [2/6] git commit: refs/heads/cfish-string-prep1 - Fix C sample program

Posted by nw...@apache.org.
Fix C sample program


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

Branch: refs/heads/cfish-string-prep1
Commit: 41ea616059137c6f9f4f3de6466f1d27a0ed40a4
Parents: b854f6b
Author: Nick Wellnhofer <we...@aevum.de>
Authored: Sat Sep 28 19:50:38 2013 +0200
Committer: Nick Wellnhofer <we...@aevum.de>
Committed: Mon Sep 30 22:47:31 2013 +0200

----------------------------------------------------------------------
 c/sample/getting_started.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucy/blob/41ea6160/c/sample/getting_started.c
----------------------------------------------------------------------
diff --git a/c/sample/getting_started.c b/c/sample/getting_started.c
index f7bbcfe..10093b8 100644
--- a/c/sample/getting_started.c
+++ b/c/sample/getting_started.c
@@ -23,13 +23,14 @@
  *
  *     c99 \
  *         getting_started.c \
- *         -I $PREFIX/include -L $PREFIX/lib -l lucy \
+ *         -I $PREFIX/include -L $PREFIX/lib -l cfish -l lucy \
  *         -o getting_started
  */
 
 #include <stdio.h>
 #include <string.h>
 
+#define CFISH_USE_SHORT_NAMES
 #define LUCY_USE_SHORT_NAMES
 #include "Clownfish/String.h"
 #include "Lucy/Analysis/EasyAnalyzer.h"
@@ -179,7 +180,7 @@ S_search(IndexSearcher *searcher, const char *query) {
 
         printf("Result %d: %s\n", i, value);
 
-        DECREF(value);
+        free(value);
         DECREF(value_str);
         DECREF(hit);
         i++;


[lucy-commits] [6/6] git commit: refs/heads/cfish-string-prep1 - Convert 'const ByteBuf' to 'ByteBuf'

Posted by nw...@apache.org.
Convert 'const ByteBuf' to 'ByteBuf'


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

Branch: refs/heads/cfish-string-prep1
Commit: f7b728aa55c376f545943ea91bdce70c03f3393e
Parents: d0f75c4
Author: Nick Wellnhofer <we...@aevum.de>
Authored: Mon Sep 30 23:12:56 2013 +0200
Committer: Nick Wellnhofer <we...@aevum.de>
Committed: Mon Sep 30 23:13:31 2013 +0200

----------------------------------------------------------------------
 clownfish/runtime/core/Clownfish/ByteBuf.c   | 8 ++++----
 clownfish/runtime/core/Clownfish/ByteBuf.cfh | 4 ++--
 clownfish/runtime/perl/xs/XSBind.c           | 2 +-
 clownfish/runtime/perl/xs/XSBind.h           | 2 +-
 4 files changed, 8 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucy/blob/f7b728aa/clownfish/runtime/core/Clownfish/ByteBuf.c
----------------------------------------------------------------------
diff --git a/clownfish/runtime/core/Clownfish/ByteBuf.c b/clownfish/runtime/core/Clownfish/ByteBuf.c
index ceb97ee..c267d28 100644
--- a/clownfish/runtime/core/Clownfish/ByteBuf.c
+++ b/clownfish/runtime/core/Clownfish/ByteBuf.c
@@ -172,7 +172,7 @@ BB_Cat_Bytes_IMP(ByteBuf *self, const void *bytes, size_t size) {
 }
 
 void
-BB_Cat_IMP(ByteBuf *self, const ByteBuf *other) {
+BB_Cat_IMP(ByteBuf *self, ByteBuf *other) {
     SI_cat_bytes(self, other->buf, other->size);
 }
 
@@ -198,8 +198,8 @@ BB_Grow_IMP(ByteBuf *self, size_t size) {
 
 int
 BB_compare(const void *va, const void *vb) {
-    const ByteBuf *a = *(const ByteBuf**)va;
-    const ByteBuf *b = *(const ByteBuf**)vb;
+    ByteBuf *a = *(ByteBuf**)va;
+    ByteBuf *b = *(ByteBuf**)vb;
     const size_t size = a->size < b->size ? a->size : b->size;
 
     int32_t comparison = memcmp(a->buf, b->buf, size);
@@ -246,7 +246,7 @@ ViewBB_Assign_Bytes_IMP(ViewByteBuf *self, char*buf, size_t size) {
 }
 
 void
-ViewBB_Assign_IMP(ViewByteBuf *self, const ByteBuf *other) {
+ViewBB_Assign_IMP(ViewByteBuf *self, ByteBuf *other) {
     self->buf  = other->buf;
     self->size = other->size;
 }

http://git-wip-us.apache.org/repos/asf/lucy/blob/f7b728aa/clownfish/runtime/core/Clownfish/ByteBuf.cfh
----------------------------------------------------------------------
diff --git a/clownfish/runtime/core/Clownfish/ByteBuf.cfh b/clownfish/runtime/core/Clownfish/ByteBuf.cfh
index 388e854..60b258c 100644
--- a/clownfish/runtime/core/Clownfish/ByteBuf.cfh
+++ b/clownfish/runtime/core/Clownfish/ByteBuf.cfh
@@ -96,7 +96,7 @@ class Clownfish::ByteBuf cnick BB inherits Clownfish::Obj {
      * original ByteBuf. Allocate more memory as needed.
      */
     void
-    Cat(ByteBuf *self, const ByteBuf *other);
+    Cat(ByteBuf *self, ByteBuf *other);
 
     /** Assign more memory to the ByteBuf, if it doesn't already have enough
      * room to hold <code>size</code> bytes.  Cannot shrink the allocation.
@@ -150,7 +150,7 @@ class Clownfish::ViewByteBuf cnick ViewBB
     /** Assign buf and size members from the passed-in ByteBuf.
      */
     void
-    Assign(ViewByteBuf *self, const ByteBuf *other);
+    Assign(ViewByteBuf *self, ByteBuf *other);
 
     public void
     Destroy(ViewByteBuf *self);

http://git-wip-us.apache.org/repos/asf/lucy/blob/f7b728aa/clownfish/runtime/perl/xs/XSBind.c
----------------------------------------------------------------------
diff --git a/clownfish/runtime/perl/xs/XSBind.c b/clownfish/runtime/perl/xs/XSBind.c
index 4a231cf..4c7a275 100644
--- a/clownfish/runtime/perl/xs/XSBind.c
+++ b/clownfish/runtime/perl/xs/XSBind.c
@@ -218,7 +218,7 @@ XSBind_perl_to_cfish(SV *sv) {
 }
 
 SV*
-XSBind_bb_to_sv(const cfish_ByteBuf *bb) {
+XSBind_bb_to_sv(cfish_ByteBuf *bb) {
     return bb
            ? newSVpvn(CFISH_BB_Get_Buf(bb), CFISH_BB_Get_Size(bb))
            : newSV(0);

http://git-wip-us.apache.org/repos/asf/lucy/blob/f7b728aa/clownfish/runtime/perl/xs/XSBind.h
----------------------------------------------------------------------
diff --git a/clownfish/runtime/perl/xs/XSBind.h b/clownfish/runtime/perl/xs/XSBind.h
index 01c6d6c..e37058c 100644
--- a/clownfish/runtime/perl/xs/XSBind.h
+++ b/clownfish/runtime/perl/xs/XSBind.h
@@ -128,7 +128,7 @@ cfish_XSBind_perl_to_cfish(SV *sv);
 /** Convert a ByteBuf into a new string SV.
  */
 CFISH_VISIBLE SV*
-cfish_XSBind_bb_to_sv(const cfish_ByteBuf *bb);
+cfish_XSBind_bb_to_sv(cfish_ByteBuf *bb);
 
 /** Convert a String into a new UTF-8 string SV.
  */