lucy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mar...@apache.org
Subject svn commit: r930570 - /lucene/lucy/trunk/core/Lucy/Index/Segment.c
Date Sat, 03 Apr 2010 20:07:18 GMT
Author: marvin
Date: Sat Apr  3 20:07:17 2010
New Revision: 930570

URL: http://svn.apache.org/viewvc?rev=930570&view=rev
Log:
Switch to C99-style comments for core/Lucy/Index.

Modified:
    lucene/lucy/trunk/core/Lucy/Index/Segment.c

Modified: lucene/lucy/trunk/core/Lucy/Index/Segment.c
URL: http://svn.apache.org/viewvc/lucene/lucy/trunk/core/Lucy/Index/Segment.c?rev=930570&r1=930569&r2=930570&view=diff
==============================================================================
--- lucene/lucy/trunk/core/Lucy/Index/Segment.c (original)
+++ lucene/lucy/trunk/core/Lucy/Index/Segment.c Sat Apr  3 20:07:17 2010
@@ -19,22 +19,22 @@ Seg_new(int64_t number)
 Segment*
 Seg_init(Segment *self, int64_t number)
 {
-    /* Validate. */
+    // Validate. 
     if (number < 0) { THROW(ERR, "Segment number %i64 less than 0", number); }
 
-    /* Init. */
+    // Init. 
     self->metadata  = Hash_new(0);
     self->count     = 0;
     self->by_num    = VA_new(2);
     self->by_name   = Hash_new(0);
 
-    /* Start field numbers at 1, not 0. */
+    // Start field numbers at 1, not 0. 
     VA_Push(self->by_num, INCREF(&EMPTY));
 
-    /* Assign. */
+    // Assign. 
     self->number = number;
 
-    /* Derive. */
+    // Derive. 
     self->name = Seg_num_to_name(number);
 
     return self;
@@ -81,18 +81,18 @@ Seg_read_file(Segment *self, Folder *fol
     Hash    *metadata = (Hash*)Json_slurp_json(folder, filename);
     Hash    *my_metadata;
 
-    /* Bail unless the segmeta file was read successfully. */
+    // Bail unless the segmeta file was read successfully. 
     DECREF(filename);
     if (!metadata) { return false; }
     CERTIFY(metadata, HASH);
 
-    /* Grab metadata for the Segment object itself. */
+    // Grab metadata for the Segment object itself. 
     DECREF(self->metadata);
     self->metadata = metadata;
     my_metadata = (Hash*)CERTIFY(
         Hash_Fetch_Str(self->metadata, "segmeta", 7), HASH);
 
-    /* Assign. */
+    // Assign. 
     {
         Obj *count = Hash_Fetch_Str(my_metadata, "count", 5);
         if (!count) { count = Hash_Fetch_Str(my_metadata, "doc_count", 9); }
@@ -100,7 +100,7 @@ Seg_read_file(Segment *self, Folder *fol
         else { self->count = Obj_To_I64(count); }
     }
 
-    /* Get list of field nums. */
+    // Get list of field nums. 
     {
         uint32_t i;
         VArray *source_by_num = (VArray*)Hash_Fetch_Str(my_metadata, 
@@ -110,13 +110,13 @@ Seg_read_file(Segment *self, Folder *fol
             THROW(ERR, "Failed to extract 'field_names' from metadata");
         }
 
-        /* Init. */
+        // Init. 
         DECREF(self->by_num);
         DECREF(self->by_name);
         self->by_num  = VA_new(num_fields);
         self->by_name = Hash_new(num_fields);
 
-        /* Copy the list of fields from the source. */
+        // Copy the list of fields from the source. 
         for (i = 0; i < num_fields; i++) {
             CharBuf *name = (CharBuf*)VA_Fetch(source_by_num, i);
             Seg_Add_Field(self, name);
@@ -131,7 +131,7 @@ Seg_write_file(Segment *self, Folder *fo
 {
     Hash *my_metadata = Hash_new(16);
 
-    /* Store metadata specific to this Segment object. */
+    // Store metadata specific to this Segment object. 
     Hash_Store_Str(my_metadata, "count", 5, 
         (Obj*)CB_newf("%i64", self->count) );
     Hash_Store_Str(my_metadata, "name", 4, (Obj*)CB_Clone(self->name));



Mime
View raw message