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/06/08 02:44:29 UTC

[lucy-commits] svn commit: r1133222 - in /incubator/lucy/trunk/example-lang/src: ./ Lucy/Analysis/ Lucy/Document/ Lucy/Index/ Lucy/Object/ Lucy/Util/

Author: marvin
Date: Wed Jun  8 00:44:28 2011
New Revision: 1133222

URL: http://svn.apache.org/viewvc?rev=1133222&view=rev
Log:
Make all C files in example-lang compile.

Modified:
    incubator/lucy/trunk/example-lang/src/CFBind.h
    incubator/lucy/trunk/example-lang/src/Lucy/Analysis/CaseFolder.c
    incubator/lucy/trunk/example-lang/src/Lucy/Analysis/RegexTokenizer.c
    incubator/lucy/trunk/example-lang/src/Lucy/Document/Doc.c
    incubator/lucy/trunk/example-lang/src/Lucy/Index/DocReader.c
    incubator/lucy/trunk/example-lang/src/Lucy/Index/Inverter.c
    incubator/lucy/trunk/example-lang/src/Lucy/Index/PolyReader.c
    incubator/lucy/trunk/example-lang/src/Lucy/Object/Err.c
    incubator/lucy/trunk/example-lang/src/Lucy/Object/Host.c
    incubator/lucy/trunk/example-lang/src/Lucy/Object/LockFreeRegistry.c
    incubator/lucy/trunk/example-lang/src/Lucy/Object/Obj.c
    incubator/lucy/trunk/example-lang/src/Lucy/Object/VTable.c
    incubator/lucy/trunk/example-lang/src/Lucy/Util/Json.c
    incubator/lucy/trunk/example-lang/src/Lucy/Util/StringHelper.c

Modified: incubator/lucy/trunk/example-lang/src/CFBind.h
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/example-lang/src/CFBind.h?rev=1133222&r1=1133221&r2=1133222&view=diff
==============================================================================
--- incubator/lucy/trunk/example-lang/src/CFBind.h (original)
+++ incubator/lucy/trunk/example-lang/src/CFBind.h Wed Jun  8 00:44:28 2011
@@ -34,12 +34,13 @@ extern "C" {
 #include "Lucy/Object/VArray.h"
 #include "Lucy/Object/VTable.h"
 
-/* Strip the prefix from some common ClownFish symbols where we know there's
- * no conflict.  It's a little inconsistent to do this rather than leave all
+/* Strip the prefix from some common symbols where we know there's no
+ * conflict.  It's a little inconsistent to do this rather than leave all
  * symbols at full size, but the succinctness is worth it.
  */
-#define THROW            CFISH_THROW
-#define WARN             CFISH_WARN
+#define THROW                CFISH_THROW
+#define WARN                 CFISH_WARN
+#define UNREACHABLE_RETURN   CHY_UNREACHABLE_RETURN
 
 #ifdef __cplusplus
 }

Modified: incubator/lucy/trunk/example-lang/src/Lucy/Analysis/CaseFolder.c
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/example-lang/src/Lucy/Analysis/CaseFolder.c?rev=1133222&r1=1133221&r2=1133222&view=diff
==============================================================================
--- incubator/lucy/trunk/example-lang/src/Lucy/Analysis/CaseFolder.c (original)
+++ incubator/lucy/trunk/example-lang/src/Lucy/Analysis/CaseFolder.c Wed Jun  8 00:44:28 2011
@@ -16,18 +16,19 @@
 
 #define C_LUCY_CASEFOLDER
 
+#include "CFBind.h"
 #include "Lucy/Analysis/CaseFolder.h"
 #include "Lucy/Analysis/Inversion.h"
 
 lucy_Inversion*
 lucy_CaseFolder_transform(lucy_CaseFolder *self, lucy_Inversion *inversion) {
-    THROW(ERR, "TODO");
+    THROW(LUCY_ERR, "TODO");
     UNREACHABLE_RETURN(lucy_Inversion*);
 }
 
 lucy_Inversion*
 lucy_CaseFolder_transform_text(lucy_CaseFolder *self, lucy_CharBuf *text) {
-    THROW(ERR, "TODO");
+    THROW(LUCY_ERR, "TODO");
     UNREACHABLE_RETURN(lucy_Inversion*);
 }
 

Modified: incubator/lucy/trunk/example-lang/src/Lucy/Analysis/RegexTokenizer.c
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/example-lang/src/Lucy/Analysis/RegexTokenizer.c?rev=1133222&r1=1133221&r2=1133222&view=diff
==============================================================================
--- incubator/lucy/trunk/example-lang/src/Lucy/Analysis/RegexTokenizer.c (original)
+++ incubator/lucy/trunk/example-lang/src/Lucy/Analysis/RegexTokenizer.c Wed Jun  8 00:44:28 2011
@@ -16,6 +16,7 @@
 
 #define C_LUCY_REGEXTOKENIZER
 
+#include "CFBind.h"
 #include "Lucy/Analysis/RegexTokenizer.h"
 #include "Lucy/Analysis/Token.h"
 #include "Lucy/Analysis/Inversion.h"
@@ -24,7 +25,7 @@ lucy_RegexTokenizer*
 lucy_RegexTokenizer_init(lucy_RegexTokenizer *self,
                          const lucy_CharBuf *pattern) {
     THROW(LUCY_ERR, "TODO");
-    UNREACHABLE_RETURN(lucy_RegexTokenizer*)
+    UNREACHABLE_RETURN(lucy_RegexTokenizer*);
 }
 
 void

Modified: incubator/lucy/trunk/example-lang/src/Lucy/Document/Doc.c
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/example-lang/src/Lucy/Document/Doc.c?rev=1133222&r1=1133221&r2=1133222&view=diff
==============================================================================
--- incubator/lucy/trunk/example-lang/src/Lucy/Document/Doc.c (original)
+++ incubator/lucy/trunk/example-lang/src/Lucy/Document/Doc.c Wed Jun  8 00:44:28 2011
@@ -16,6 +16,7 @@
 
 #define C_LUCY_DOC
 
+#include "CFBind.h"
 #include "Lucy/Document/Doc.h"
 #include "Lucy/Store/InStream.h"
 #include "Lucy/Store/OutStream.h"

Modified: incubator/lucy/trunk/example-lang/src/Lucy/Index/DocReader.c
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/example-lang/src/Lucy/Index/DocReader.c?rev=1133222&r1=1133221&r2=1133222&view=diff
==============================================================================
--- incubator/lucy/trunk/example-lang/src/Lucy/Index/DocReader.c (original)
+++ incubator/lucy/trunk/example-lang/src/Lucy/Index/DocReader.c Wed Jun  8 00:44:28 2011
@@ -17,6 +17,7 @@
 #define C_LUCY_DOCREADER
 #define C_LUCY_DEFAULTDOCREADER
 
+#include "CFBind.h"
 #include "Lucy/Index/DocReader.h"
 #include "Lucy/Document/HitDoc.h"
 

Modified: incubator/lucy/trunk/example-lang/src/Lucy/Index/Inverter.c
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/example-lang/src/Lucy/Index/Inverter.c?rev=1133222&r1=1133221&r2=1133222&view=diff
==============================================================================
--- incubator/lucy/trunk/example-lang/src/Lucy/Index/Inverter.c (original)
+++ incubator/lucy/trunk/example-lang/src/Lucy/Index/Inverter.c Wed Jun  8 00:44:28 2011
@@ -17,13 +17,13 @@
 #define C_LUCY_INVERTER
 #define C_LUCY_INVERTERENTRY
 
+#include "CFBind.h"
 #include "Lucy/Index/Inverter.h"
 #include "Lucy/Document/Doc.h"
 
 void
 lucy_Inverter_invert_doc(lucy_Inverter *self, lucy_Doc *doc) {
     THROW(LUCY_ERR, "TODO");
-    UNREACHABLE_RETURN(lucy_Doc*);
 }
 
 

Modified: incubator/lucy/trunk/example-lang/src/Lucy/Index/PolyReader.c
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/example-lang/src/Lucy/Index/PolyReader.c?rev=1133222&r1=1133221&r2=1133222&view=diff
==============================================================================
--- incubator/lucy/trunk/example-lang/src/Lucy/Index/PolyReader.c (original)
+++ incubator/lucy/trunk/example-lang/src/Lucy/Index/PolyReader.c Wed Jun  8 00:44:28 2011
@@ -16,6 +16,7 @@
 
 #include "Lucy/Util/ToolSet.h"
 
+#include "CFBind.h"
 #include "Lucy/Index/PolyReader.h"
 #include "Lucy/Index/Snapshot.h"
 #include "Lucy/Store/Folder.h"

Modified: incubator/lucy/trunk/example-lang/src/Lucy/Object/Err.c
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/example-lang/src/Lucy/Object/Err.c?rev=1133222&r1=1133221&r2=1133222&view=diff
==============================================================================
--- incubator/lucy/trunk/example-lang/src/Lucy/Object/Err.c (original)
+++ incubator/lucy/trunk/example-lang/src/Lucy/Object/Err.c Wed Jun  8 00:44:28 2011
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-#include "Lucy/Object/Err.h"
+#include "CFBind.h"
 
 lucy_Err*
 lucy_Err_get_error() {

Modified: incubator/lucy/trunk/example-lang/src/Lucy/Object/Host.c
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/example-lang/src/Lucy/Object/Host.c?rev=1133222&r1=1133221&r2=1133222&view=diff
==============================================================================
--- incubator/lucy/trunk/example-lang/src/Lucy/Object/Host.c (original)
+++ incubator/lucy/trunk/example-lang/src/Lucy/Object/Host.c Wed Jun  8 00:44:28 2011
@@ -14,12 +14,7 @@
  * limitations under the License.
  */
 
-#include "Lucy/Object/VTable.h"
-
-#include "Lucy/Object/Obj.h"
-#include "Lucy/Object/Host.h"
-#include "Lucy/Object/CharBuf.h"
-#include "Lucy/Object/Err.h"
+#include "CFBind.h"
 
 void
 lucy_Host_callback(void *vobj, char *method, uint32_t num_args, ...) {

Modified: incubator/lucy/trunk/example-lang/src/Lucy/Object/LockFreeRegistry.c
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/example-lang/src/Lucy/Object/LockFreeRegistry.c?rev=1133222&r1=1133221&r2=1133222&view=diff
==============================================================================
--- incubator/lucy/trunk/example-lang/src/Lucy/Object/LockFreeRegistry.c (original)
+++ incubator/lucy/trunk/example-lang/src/Lucy/Object/LockFreeRegistry.c Wed Jun  8 00:44:28 2011
@@ -16,6 +16,7 @@
 
 #define C_LUCY_LOCKFREEREGISTRY
 
+#include "CFBind.h"
 #include "Lucy/Object/LockFreeRegistry.h"
 
 void*

Modified: incubator/lucy/trunk/example-lang/src/Lucy/Object/Obj.c
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/example-lang/src/Lucy/Object/Obj.c?rev=1133222&r1=1133221&r2=1133222&view=diff
==============================================================================
--- incubator/lucy/trunk/example-lang/src/Lucy/Object/Obj.c (original)
+++ incubator/lucy/trunk/example-lang/src/Lucy/Object/Obj.c Wed Jun  8 00:44:28 2011
@@ -16,8 +16,7 @@
 
 #define C_LUCY_OBJ
 
-#include "Lucy/Object/Obj.h"
-#include "Lucy/Object/Err.h"
+#include "CFBind.h"
 
 uint32_t
 lucy_Obj_get_refcount(lucy_Obj *self) {

Modified: incubator/lucy/trunk/example-lang/src/Lucy/Object/VTable.c
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/example-lang/src/Lucy/Object/VTable.c?rev=1133222&r1=1133221&r2=1133222&view=diff
==============================================================================
--- incubator/lucy/trunk/example-lang/src/Lucy/Object/VTable.c (original)
+++ incubator/lucy/trunk/example-lang/src/Lucy/Object/VTable.c Wed Jun  8 00:44:28 2011
@@ -17,9 +17,7 @@
 #define C_LUCY_OBJ
 #define C_LUCY_VTABLE
 
-#include "Lucy/Object/VTable.h"
-#include "Lucy/Object/Host.h"
-#include "Lucy/Object/CharBuf.h"
+#include "CFBind.h"
 
 lucy_Obj*
 lucy_VTable_foster_obj(lucy_VTable *self, void *host_obj) {

Modified: incubator/lucy/trunk/example-lang/src/Lucy/Util/Json.c
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/example-lang/src/Lucy/Util/Json.c?rev=1133222&r1=1133221&r2=1133222&view=diff
==============================================================================
--- incubator/lucy/trunk/example-lang/src/Lucy/Util/Json.c (original)
+++ incubator/lucy/trunk/example-lang/src/Lucy/Util/Json.c Wed Jun  8 00:44:28 2011
@@ -47,6 +47,5 @@ Json_from_json(CharBuf *json) {
 void
 Json_set_tolerant(bool_t tolerant) {
     THROW(LUCY_ERR, "TODO");
-    UNREACHABLE_RETURN(bool_t);
 }
 

Modified: incubator/lucy/trunk/example-lang/src/Lucy/Util/StringHelper.c
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/example-lang/src/Lucy/Util/StringHelper.c?rev=1133222&r1=1133221&r2=1133222&view=diff
==============================================================================
--- incubator/lucy/trunk/example-lang/src/Lucy/Util/StringHelper.c (original)
+++ incubator/lucy/trunk/example-lang/src/Lucy/Util/StringHelper.c Wed Jun  8 00:44:28 2011
@@ -14,6 +14,7 @@
  * limitations under the License.
  */
 
+#include "CFBind.h"
 #include "Lucy/Util/StringHelper.h"
 
 // TODO: replace with code from ICU in common/ucnv_u8.c.