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 2011/11/27 01:05:35 UTC

[lucy-commits] svn commit: r1206645 - in /incubator/lucy/trunk/core/Lucy: Search/RangeQuery.c Test/Util/TestStringHelper.c

Author: marvin
Date: Sun Nov 27 00:05:34 2011
New Revision: 1206645

URL: http://svn.apache.org/viewvc?rev=1206645&view=rev
Log:
Fix casts for C++.

Modified:
    incubator/lucy/trunk/core/Lucy/Search/RangeQuery.c
    incubator/lucy/trunk/core/Lucy/Test/Util/TestStringHelper.c

Modified: incubator/lucy/trunk/core/Lucy/Search/RangeQuery.c
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/core/Lucy/Search/RangeQuery.c?rev=1206645&r1=1206644&r2=1206645&view=diff
==============================================================================
--- incubator/lucy/trunk/core/Lucy/Search/RangeQuery.c (original)
+++ incubator/lucy/trunk/core/Lucy/Search/RangeQuery.c Sun Nov 27 00:05:34 2011
@@ -163,7 +163,7 @@ RangeQuery_make_compiler(RangeQuery *sel
     if (!subordinate) {
         RangeCompiler_Normalize(compiler);
     }   
-    return (Compiler*)compiler;
+    return compiler;
 }
 
 /**********************************************************************/

Modified: incubator/lucy/trunk/core/Lucy/Test/Util/TestStringHelper.c
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/core/Lucy/Test/Util/TestStringHelper.c?rev=1206645&r1=1206644&r2=1206645&view=diff
==============================================================================
--- incubator/lucy/trunk/core/Lucy/Test/Util/TestStringHelper.c (original)
+++ incubator/lucy/trunk/core/Lucy/Test/Util/TestStringHelper.c Sun Nov 27 00:05:34 2011
@@ -27,8 +27,8 @@
 #define TRAIL_OK(n) (n >= 0x80 && n <= 0xBF)
 static bool_t
 S_utf8_valid_alt(const char *maybe_utf8, size_t size) {
-	const uint8_t *string = maybe_utf8;
-	const uint8_t *const end = maybe_utf8 + size;
+	const uint8_t *string = (const uint8_t*)maybe_utf8;
+	const uint8_t *const end = string + size;
     while (string < end) {
         int count = StrHelp_UTF8_COUNT[*string];
         bool_t valid = false;