[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kinosearch-commits
Subject:    [Kinosearch-commits] r3540 - trunk/c_src/KinoSearch/Index
From:       marvin () rectangular ! com
Date:       2008-06-26 2:16:33
Message-ID: 200806260202.m5Q22fJT025419 () mailer ! progressive-comp ! com
[Download RAW message or body]

Author: creamyg
Date: 2008-06-25 19:16:33 -0700 (Wed, 25 Jun 2008)
New Revision: 3540

Modified:
   trunk/c_src/KinoSearch/Index/SegInfo.bp
   trunk/c_src/KinoSearch/Index/SegInfo.c
Log:
Have SegInfo_Increment_Doc_Count return the newly incremented count.


Modified: trunk/c_src/KinoSearch/Index/SegInfo.bp
===================================================================
--- trunk/c_src/KinoSearch/Index/SegInfo.bp	2008-06-26 02:15:39 UTC (rev 3539)
+++ trunk/c_src/KinoSearch/Index/SegInfo.bp	2008-06-26 02:16:33 UTC (rev 3540)
@@ -84,9 +84,9 @@
     u32_t 
     Get_Doc_Count(SegInfo *self);
 
-    /** Add one to the object's document count.
+    /** Add one to the object's document count, then return it.
      */
-    void
+    u32_t
     Increment_Doc_Count(SegInfo *self);
 
     void

Modified: trunk/c_src/KinoSearch/Index/SegInfo.c
===================================================================
--- trunk/c_src/KinoSearch/Index/SegInfo.c	2008-06-26 02:15:39 UTC (rev 3539)
+++ trunk/c_src/KinoSearch/Index/SegInfo.c	2008-06-26 02:16:33 UTC (rev 3540)
@@ -101,8 +101,8 @@
 SegInfo_set_doc_count(SegInfo *self, u32_t count) { self->doc_count = count; }
 u32_t
 SegInfo_get_doc_count(SegInfo *self)              { return self->doc_count; }
-void
-SegInfo_increment_doc_count(SegInfo *self)        { self->doc_count++; }
+u32_t
+SegInfo_increment_doc_count(SegInfo *self)        { return ++self->doc_count; }
 
 void
 SegInfo_add_metadata(SegInfo *self, const char *key, size_t key_len,


_______________________________________________
kinosearch-commits mailing list
kinosearch-commits@rectangular.com
http://www.rectangular.com/mailman/listinfo/kinosearch-commits
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic