lucy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nwelln...@apache.org
Subject [lucy-commits] [02/20] git commit: refs/heads/cfish-string-prep1 - Return type of StrIter_Clone
Date Sat, 07 Sep 2013 16:53:23 GMT
Return type of StrIter_Clone


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

Branch: refs/heads/cfish-string-prep1
Commit: 0d0cb67ab9d16da74eeb33218ae31b579377f2c2
Parents: 593dfe9
Author: Nick Wellnhofer <wellnhofer@aevum.de>
Authored: Sat Sep 7 12:09:36 2013 +0200
Committer: Nick Wellnhofer <wellnhofer@aevum.de>
Committed: Sat Sep 7 18:12:45 2013 +0200

----------------------------------------------------------------------
 clownfish/runtime/core/Clownfish/String.c          |  4 ++--
 clownfish/runtime/core/Clownfish/String.cfh        |  2 +-
 clownfish/runtime/core/Clownfish/Test/TestString.c |  2 +-
 core/Lucy/Highlight/Highlighter.c                  | 12 ++++++------
 4 files changed, 10 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucy/blob/0d0cb67a/clownfish/runtime/core/Clownfish/String.c
----------------------------------------------------------------------
diff --git a/clownfish/runtime/core/Clownfish/String.c b/clownfish/runtime/core/Clownfish/String.c
index f6f1a85..01a7939 100644
--- a/clownfish/runtime/core/Clownfish/String.c
+++ b/clownfish/runtime/core/Clownfish/String.c
@@ -806,9 +806,9 @@ StrIter_substring(StringIterator *top, StringIterator *tail) {
                                      tail->byte_offset - top->byte_offset);
 }
 
-Obj*
+StringIterator*
 StrIter_Clone_IMP(StringIterator *self) {
-    return (Obj*)StrIter_new(self->string, self->byte_offset);
+    return StrIter_new(self->string, self->byte_offset);
 }
 
 void

http://git-wip-us.apache.org/repos/asf/lucy/blob/0d0cb67a/clownfish/runtime/core/Clownfish/String.cfh
----------------------------------------------------------------------
diff --git a/clownfish/runtime/core/Clownfish/String.cfh b/clownfish/runtime/core/Clownfish/String.cfh
index d6d378a..bf9a4a9 100644
--- a/clownfish/runtime/core/Clownfish/String.cfh
+++ b/clownfish/runtime/core/Clownfish/String.cfh
@@ -392,7 +392,7 @@ class Clownfish::StringIterator cnick StrIter
     inert incremented String*
     substring(StringIterator *top, StringIterator *tail);
 
-    public incremented Obj*
+    public incremented StringIterator*
     Clone(StringIterator *self);
 
     public void

http://git-wip-us.apache.org/repos/asf/lucy/blob/0d0cb67a/clownfish/runtime/core/Clownfish/Test/TestString.c
----------------------------------------------------------------------
diff --git a/clownfish/runtime/core/Clownfish/Test/TestString.c b/clownfish/runtime/core/Clownfish/Test/TestString.c
index eced59f..4b937f8 100644
--- a/clownfish/runtime/core/Clownfish/Test/TestString.c
+++ b/clownfish/runtime/core/Clownfish/Test/TestString.c
@@ -329,7 +329,7 @@ test_iterator(TestBatchRunner *runner) {
         TEST_INT_EQ(runner, StrIter_Compare_To(top, (Obj*)top), 0,
                     "Compare_To top == top");
 
-        StringIterator *clone = (StringIterator*)StrIter_Clone(top);
+        StringIterator *clone = StrIter_Clone(top);
         TEST_TRUE(runner, StrIter_Equals(clone, (Obj*)top), "Clone");
 
         StrIter_Assign(clone, tail);

http://git-wip-us.apache.org/repos/asf/lucy/blob/0d0cb67a/core/Lucy/Highlight/Highlighter.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Highlight/Highlighter.c b/core/Lucy/Highlight/Highlighter.c
index a4529e7..dc2f0a3 100644
--- a/core/Lucy/Highlight/Highlighter.c
+++ b/core/Lucy/Highlight/Highlighter.c
@@ -220,7 +220,7 @@ S_find_starting_boundary(StringIterator *top, uint32_t max_skip,
 
     // Check if we're at a starting boundary already.
 
-    StringIterator *iter = (StringIterator*)StrIter_Clone(top);
+    StringIterator *iter = StrIter_Clone(top);
 
     while (true) {
         uint32_t code_point = StrIter_Prev(iter);
@@ -233,7 +233,7 @@ S_find_starting_boundary(StringIterator *top, uint32_t max_skip,
         }
 
         if (StrHelp_is_whitespace(code_point)) {
-            if (word == NULL) { word = (StringIterator*)StrIter_Clone(top); }
+            if (word == NULL) { word = StrIter_Clone(top); }
         }
         else {
             break;
@@ -258,7 +258,7 @@ S_find_starting_boundary(StringIterator *top, uint32_t max_skip,
         }
 
         if (word == NULL && StrHelp_is_whitespace(code_point)) {
-            word = (StringIterator*)StrIter_Clone(iter);
+            word = StrIter_Clone(iter);
             word_offset = i + 1;
         }
     }
@@ -290,7 +290,7 @@ S_find_ending_boundary(StringIterator *tail, uint32_t max_skip,
     // Check if we're at an ending boundary already. Don't check for a word
     // boundary because we need space for a trailing ellipsis.
 
-    StringIterator *iter = (StringIterator*)StrIter_Clone(tail);
+    StringIterator *iter = StrIter_Clone(tail);
 
     do {
         code_point = StrIter_Next(iter);
@@ -324,7 +324,7 @@ S_find_ending_boundary(StringIterator *tail, uint32_t max_skip,
 
         if (StrHelp_is_whitespace(code_point)) {
             if (word == NULL) {
-                word = (StringIterator*)StrIter_Clone(iter);
+                word = StrIter_Clone(iter);
                 word_offset = i + 1;
             }
         }
@@ -401,7 +401,7 @@ Highlighter_Raw_Excerpt_IMP(Highlighter *self, const String *field_val,
 
     // Find end of excerpt.
 
-    StringIterator *tail = (StringIterator*)StrIter_Clone(top);
+    StringIterator *tail = StrIter_Clone(top);
 
     uint32_t max_len = ivars->excerpt_length;
     if (!found_starting_edge) {


Mime
View raw message