From lucy-commits-return-430-apmail-lucene-lucy-commits-archive=lucene.apache.org@lucene.apache.org Sat Apr 03 20:07:39 2010 Return-Path: Delivered-To: apmail-lucene-lucy-commits-archive@minotaur.apache.org Received: (qmail 74051 invoked from network); 3 Apr 2010 20:07:39 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 3 Apr 2010 20:07:39 -0000 Received: (qmail 10191 invoked by uid 500); 3 Apr 2010 20:07:39 -0000 Delivered-To: apmail-lucene-lucy-commits-archive@lucene.apache.org Received: (qmail 10168 invoked by uid 500); 3 Apr 2010 20:07:39 -0000 Mailing-List: contact lucy-commits-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: lucy-dev@lucene.apache.org Delivered-To: mailing list lucy-commits@lucene.apache.org Received: (qmail 10161 invoked by uid 99); 3 Apr 2010 20:07:39 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 03 Apr 2010 20:07:39 +0000 X-ASF-Spam-Status: No, hits=-1187.6 required=10.0 tests=ALL_TRUSTED,AWL X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 03 Apr 2010 20:07:38 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 2F5EB2388903; Sat, 3 Apr 2010 20:07:18 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r930570 - /lucene/lucy/trunk/core/Lucy/Index/Segment.c Date: Sat, 03 Apr 2010 20:07:18 -0000 To: lucy-commits@lucene.apache.org From: marvin@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20100403200718.2F5EB2388903@eris.apache.org> 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));