lucy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mar...@apache.org
Subject svn commit: r930448 [2/2] - in /lucene/lucy/trunk: core/Lucy/Index/ core/Lucy/Object/ core/Lucy/Test/Object/ perl/xs/Lucy/Object/
Date Sat, 03 Apr 2010 00:34:03 GMT
Modified: lucene/lucy/trunk/core/Lucy/Test/Object/TestLockFreeRegistry.bp
URL: http://svn.apache.org/viewvc/lucene/lucy/trunk/core/Lucy/Test/Object/TestLockFreeRegistry.bp?rev=930448&r1=930447&r2=930448&view=diff
==============================================================================
--- lucene/lucy/trunk/core/Lucy/Test/Object/TestLockFreeRegistry.bp (original)
+++ lucene/lucy/trunk/core/Lucy/Test/Object/TestLockFreeRegistry.bp Sat Apr  3 00:34:02 2010
@@ -12,7 +12,7 @@ class Lucy::Test::Object::StupidHashChar
     new(char *text);
 
     /** Always returns 1, guaranteeing collisions. */
-    public i32_t
+    public int32_t
     Hash_Code(StupidHashCharBuf *self);
 }
 

Modified: lucene/lucy/trunk/core/Lucy/Test/Object/TestLockFreeRegistry.c
URL: http://svn.apache.org/viewvc/lucene/lucy/trunk/core/Lucy/Test/Object/TestLockFreeRegistry.c?rev=930448&r1=930447&r2=930448&view=diff
==============================================================================
--- lucene/lucy/trunk/core/Lucy/Test/Object/TestLockFreeRegistry.c (original)
+++ lucene/lucy/trunk/core/Lucy/Test/Object/TestLockFreeRegistry.c Sat Apr  3 00:34:02 2010
@@ -13,7 +13,7 @@ StupidHashCharBuf_new(char *text)
     return (StupidHashCharBuf*)CB_new_from_utf8(text, strlen(text));
 }
 
-i32_t
+int32_t
 StupidHashCharBuf_hash_code(StupidHashCharBuf *self)
 {
     UNUSED_VAR(self);

Modified: lucene/lucy/trunk/core/Lucy/Test/Object/TestObj.c
URL: http://svn.apache.org/viewvc/lucene/lucy/trunk/core/Lucy/Test/Object/TestObj.c?rev=930448&r1=930447&r2=930448&view=diff
==============================================================================
--- lucene/lucy/trunk/core/Lucy/Test/Object/TestObj.c (original)
+++ lucene/lucy/trunk/core/Lucy/Test/Object/TestObj.c Sat Apr  3 00:34:02 2010
@@ -81,7 +81,7 @@ static void
 test_Hash_Code(TestBatch *batch)
 {
     Obj *testobj = S_new_testobj();
-    i32_t address = (i32_t)testobj;
+    int32_t address = (int32_t)testobj;
     ASSERT_TRUE(batch, (Obj_Hash_Code(testobj) == address), 
         "Hash_Code uses memory address");
     DECREF(testobj);

Modified: lucene/lucy/trunk/core/Lucy/Test/Object/TestVArray.c
URL: http://svn.apache.org/viewvc/lucene/lucy/trunk/core/Lucy/Test/Object/TestVArray.c?rev=930448&r1=930447&r2=930448&view=diff
==============================================================================
--- lucene/lucy/trunk/core/Lucy/Test/Object/TestVArray.c (original)
+++ lucene/lucy/trunk/core/Lucy/Test/Object/TestVArray.c Sat Apr  3 00:34:02 2010
@@ -111,9 +111,9 @@ test_Push_Pop_Shift_Unshift(TestBatch *b
 static void
 test_Delete(TestBatch *batch)
 {
-    VArray *wanted  = VA_new(5);
-    VArray *got     = VA_new(5);
-    u32_t i;
+    VArray *wanted = VA_new(5);
+    VArray *got    = VA_new(5);
+    uint32_t i;
 
     for (i = 0; i < 5; i++) { VA_Push(got, (Obj*)CB_newf("%u32", i)); }
     VA_Store(wanted, 0, (Obj*)CB_newf("0", i));
@@ -131,7 +131,7 @@ static void
 test_Resize(TestBatch *batch)
 {
     VArray *array = VA_new(3);
-    u32_t i;
+    uint32_t i;
 
     for (i = 0; i < 2; i++) { VA_Push(array, (Obj*)CB_newf("%u32", i)); }
     ASSERT_INT_EQ(batch, VA_Get_Capacity(array), 3, "Start with capacity 3");
@@ -153,10 +153,11 @@ test_Splice(TestBatch *batch)
 {
     VArray *wanted = VA_new(5);
     VArray *got    = VA_new(5);
-    u32_t   i;
 
-    for (i = 0; i < 5; i++) { VA_Push(wanted, (Obj*)CB_newf("%u32", i)); }
-    for (i = 0; i < 5; i++) { VA_Push(got,    (Obj*)CB_newf("%u32", i)); }
+    for (uint32_t i = 0; i < 5; i++) {
+        VA_Push(wanted, (Obj*)CB_newf("%u32", i)); 
+        VA_Push(got,    (Obj*)CB_newf("%u32", i)); 
+    }
 
     VA_Splice(got, 7, 1);
     ASSERT_TRUE(batch, VA_Equals(wanted, (Obj*)got), 
@@ -191,7 +192,7 @@ test_Push_VArray(TestBatch *batch)
     VArray *wanted  = VA_new(0);
     VArray *got     = VA_new(0);
     VArray *scratch = VA_new(0);
-    u32_t i;
+    uint32_t i;
 
     for (i = 0; i < 4; i++) { VA_Push(wanted, (Obj*)CB_newf("%u32", i)); }
     for (i = 0; i < 2; i++) { VA_Push(got, (Obj*)CB_newf("%u32", i)); }
@@ -210,7 +211,7 @@ test_Clone_and_Shallow_Copy(TestBatch *b
 {
     VArray *array  = VA_new(0);
     VArray *evil_twin;
-    u32_t i;
+    uint32_t i;
 
     for (i = 0; i < 10; i++) {
         VA_Push(array, (Obj*)CB_newf("%u32", i));

Modified: lucene/lucy/trunk/perl/xs/Lucy/Object/Host.c
URL: http://svn.apache.org/viewvc/lucene/lucy/trunk/perl/xs/Lucy/Object/Host.c?rev=930448&r1=930447&r2=930448&view=diff
==============================================================================
--- lucene/lucy/trunk/perl/xs/Lucy/Object/Host.c (original)
+++ lucene/lucy/trunk/perl/xs/Lucy/Object/Host.c Sat Apr  3 00:34:02 2010
@@ -9,16 +9,16 @@
 #include "Lucy/Util/Memory.h"
 
 static SV*
-S_do_callback_sv(void *vobj, char *method, chy_u32_t num_args, va_list args);
+S_do_callback_sv(void *vobj, char *method, uint32_t num_args, va_list args);
 
 /* Convert all arguments to Perl and place them on the Perl stack. 
  */
 static CHY_INLINE void
-SI_push_args(void *vobj, va_list args, chy_u32_t num_args)
+SI_push_args(void *vobj, va_list args, uint32_t num_args)
 {
     lucy_Obj *obj = (lucy_Obj*)vobj;
     SV *invoker;
-    chy_u32_t i;
+    uint32_t i;
     dSP;
     
     if (Lucy_Obj_Is_A(obj, LUCY_VTABLE)) {
@@ -36,19 +36,19 @@ SI_push_args(void *vobj, va_list args, c
     XPUSHs( sv_2mortal(invoker) );
 
     for (i = 0; i < num_args; i++) {
-        chy_u32_t arg_type = va_arg(args, chy_u32_t);
+        uint32_t arg_type = va_arg(args, uint32_t);
         char *label = va_arg(args, char*);
         if (num_args > 1) {
             XPUSHs( sv_2mortal( newSVpvn(label, strlen(label)) ) );
         }
         switch (arg_type & LUCY_HOST_ARGTYPE_MASK) {
         case LUCY_HOST_ARGTYPE_I32: {
-                chy_i32_t value = va_arg(args, chy_i32_t);
+                int32_t value = va_arg(args, int32_t);
                 XPUSHs( sv_2mortal( newSViv(value) ) );
             }
             break;
         case LUCY_HOST_ARGTYPE_I64: {
-                chy_i64_t value = va_arg(args, chy_i64_t);
+                int64_t value = va_arg(args, int64_t);
                 if (sizeof(IV) == 8) {
                     XPUSHs( sv_2mortal( newSViv((IV)value) ) );
                 }
@@ -87,7 +87,7 @@ SI_push_args(void *vobj, va_list args, c
 }
 
 void
-lucy_Host_callback(void *vobj, char *method, chy_u32_t num_args, ...) 
+lucy_Host_callback(void *vobj, char *method, uint32_t num_args, ...) 
 {
     va_list args;
     
@@ -100,7 +100,7 @@ lucy_Host_callback(void *vobj, char *met
         int count = call_method(method, G_VOID|G_DISCARD);
         if (count != 0) {
             LUCY_THROW(LUCY_ERR, "callback '%s' returned too many values: %i32", 
-                method, (chy_i32_t)count);
+                method, (int32_t)count);
         }
         PUTBACK;
         FREETMPS;
@@ -108,18 +108,18 @@ lucy_Host_callback(void *vobj, char *met
     }
 }
 
-chy_i64_t
-lucy_Host_callback_i64(void *vobj, char *method, chy_u32_t num_args, ...) 
+int64_t
+lucy_Host_callback_i64(void *vobj, char *method, uint32_t num_args, ...) 
 {
     va_list args;
     SV *return_sv;
-    chy_i64_t retval;
+    int64_t retval;
 
     va_start(args, num_args);
     return_sv = S_do_callback_sv(vobj, method, num_args, args);
     va_end(args);
     if (sizeof(IV) == 8) {
-        retval = (chy_i64_t)SvIV(return_sv);
+        retval = (int64_t)SvIV(return_sv);
     }
     else {
         if (SvIOK(return_sv)) {
@@ -129,7 +129,7 @@ lucy_Host_callback_i64(void *vobj, char 
         else {
             /* Maybe lossy. */
             double temp = SvNV(return_sv);
-            retval = (chy_i64_t)temp;
+            retval = (int64_t)temp;
         }
     }
 
@@ -140,7 +140,7 @@ lucy_Host_callback_i64(void *vobj, char 
 }
 
 double
-lucy_Host_callback_f64(void *vobj, char *method, chy_u32_t num_args, ...) 
+lucy_Host_callback_f64(void *vobj, char *method, uint32_t num_args, ...) 
 {
     va_list args;
     SV *return_sv;
@@ -159,7 +159,7 @@ lucy_Host_callback_f64(void *vobj, char 
 
 lucy_Obj*
 lucy_Host_callback_obj(void *vobj, char *method, 
-                         chy_u32_t num_args, ...) 
+                         uint32_t num_args, ...) 
 {
     va_list args;
     SV *temp_retval;
@@ -178,7 +178,7 @@ lucy_Host_callback_obj(void *vobj, char 
 }
 
 lucy_CharBuf*
-lucy_Host_callback_str(void *vobj, char *method, chy_u32_t num_args, ...)
+lucy_Host_callback_str(void *vobj, char *method, uint32_t num_args, ...)
 {
     va_list args;
     SV *temp_retval;
@@ -202,7 +202,7 @@ lucy_Host_callback_str(void *vobj, char 
 }
 
 void*
-lucy_Host_callback_host(void *vobj, char *method, chy_u32_t num_args, ...)
+lucy_Host_callback_host(void *vobj, char *method, uint32_t num_args, ...)
 {
     va_list args;
     SV *retval;
@@ -219,7 +219,7 @@ lucy_Host_callback_host(void *vobj, char
 }
 
 static SV*
-S_do_callback_sv(void *vobj, char *method, chy_u32_t num_args, va_list args) 
+S_do_callback_sv(void *vobj, char *method, uint32_t num_args, va_list args) 
 {
     SV *return_val;
     SI_push_args(vobj, args, num_args);
@@ -228,7 +228,7 @@ S_do_callback_sv(void *vobj, char *metho
         dSP;
         if (num_returned != 1) {
             LUCY_THROW(LUCY_ERR, "Bad number of return vals from %s: %i32", method,
-                (chy_i32_t)num_returned);
+                (int32_t)num_returned);
         }
         return_val = POPs;
         PUTBACK;

Modified: lucene/lucy/trunk/perl/xs/Lucy/Object/Obj.c
URL: http://svn.apache.org/viewvc/lucene/lucy/trunk/perl/xs/Lucy/Object/Obj.c?rev=930448&r1=930447&r2=930448&view=diff
==============================================================================
--- lucene/lucy/trunk/perl/xs/Lucy/Object/Obj.c (original)
+++ lucene/lucy/trunk/perl/xs/Lucy/Object/Obj.c Sat Apr  3 00:34:02 2010
@@ -47,7 +47,7 @@ S_lazy_init_host_obj(lucy_Obj *self) 
     }
 }
 
-chy_u32_t
+uint32_t
 lucy_Obj_get_refcount(lucy_Obj *self)
 {
     return self->ref.count < 4 
@@ -75,10 +75,10 @@ lucy_Obj_inc_refcount(lucy_Obj *self)
     return self;
 }
 
-chy_u32_t
+uint32_t
 lucy_Obj_dec_refcount(lucy_Obj *self)
 {
-    chy_u32_t modified_refcount = I32_MAX;
+    uint32_t modified_refcount = I32_MAX;
     switch (self->ref.count) {
         case 0:
             LUCY_THROW(LUCY_ERR, "Illegal refcount of 0");



Mime
View raw message