<!DOCTYPE html>
<html>
<head>
</head>
<body>
<dl style="line-height: 1.5; margin-left: 2em">
<dt style="clear: both; float: left; font-weight: bold; width: 8em">Author</dt>
<dd style="margin-left: 8.5em">Kouhei Sutou <kou****@clear*****></dd>
<dt style="clear: both; float: left; font-weight: bold; width: 8em">Date</dt>
<dd style="margin-left: 8.5em">2014-06-25 22:16:31 +0900 (Wed, 25 Jun 2014)</dd>
<dt style="clear: both; float: left; font-weight: bold; width: 8em">New Revision</dt>
<dd style="margin-left: 8.5em"><a href="https://github.com/groonga/groonga/commit/bc5f6814aadaa61be297774553f5a9952351e77e">bc5f6814aadaa61be297774553f5a9952351e77e</a></dd>
<dt style="clear: both; float: left; font-weight: bold; width: 8em">Message</dt>
<dd style="margin-left: 8.5em"><pre style="border: 1px solid #aaa; font-family: Consolas, Menlo, "Liberation Mono", Courier, monospace; line-height: 1.2; padding: 0.5em; width: auto">Invert subrec size and GRN_RSET_SCORES_SIZE
Because score is stored before subrec:
|-score1-|-subrec1-|-score2-|-subrec2-|...|</pre></dd>
<dt style="clear: both; float: left; font-weight: bold; width: 8em">Modified files</dt>
<dd style="margin-left: 8.5em">
<ul>
<li><a href="https://github.com/groonga/groonga/commit/bc5f6814aadaa61be297774553f5a9952351e77e#diff-0">lib/db.c</a></li>
<li><a href="https://github.com/groonga/groonga/commit/bc5f6814aadaa61be297774553f5a9952351e77e#diff-1">lib/db.h</a></li>
</ul>
</dd>
</dl>
<div class="diff-section" style="clear: both">
<table style="border-collapse: collapse; border: 1px solid #aaa">
<thead>
<tr class="diff-header" style="border: 1px solid #aaa">
<td colspan="3">
<pre style="border: 0; font-family: Consolas, Menlo, "Liberation Mono", Courier, monospace; line-height: 1.2; margin: 0; padding: 0.5em; white-space: normal; width: auto"><span class="diff-header" style="background-color: #eaf2f5; color: #999999; display: block; white-space: pre"> Modified: lib/db.c (+2 -2)</span>
<span class="diff-header-mark" style="background-color: #eaf2f5; color: #999999; display: block; white-space: pre">===================================================================</span>
</pre>
</td>
</tr>
</thead>
<tbody>
<tr>
<th class="diff-line-number" style="border: 1px solid #aaa">
<pre style="border: 0; font-family: Consolas, Menlo, "Liberation Mono", Courier, monospace; line-height: 1.2; margin: 0; padding: 0.5em; white-space: normal; width: auto"><span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/bc5f6814aadaa61be297774553f5a9952351e77e#L0L1987">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/bc5f6814aadaa61be297774553f5a9952351e77e#L0L1988">1988</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/bc5f6814aadaa61be297774553f5a9952351e77e#L0L1989">1989</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/bc5f6814aadaa61be297774553f5a9952351e77e#L0L1990">1990</a></span>
<span class="diff-line-number-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/bc5f6814aadaa61be297774553f5a9952351e77e#L0L1991">1991</a></span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/bc5f6814aadaa61be297774553f5a9952351e77e#L0L1992">1992</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/bc5f6814aadaa61be297774553f5a9952351e77e#L0L1993">1993</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/bc5f6814aadaa61be297774553f5a9952351e77e#L0L1994">1994</a></span>
<span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/bc5f6814aadaa61be297774553f5a9952351e77e#L0L2021">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/bc5f6814aadaa61be297774553f5a9952351e77e#L0L2022">2022</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/bc5f6814aadaa61be297774553f5a9952351e77e#L0L2023">2023</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/bc5f6814aadaa61be297774553f5a9952351e77e#L0L2024">2024</a></span>
<span class="diff-line-number-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/bc5f6814aadaa61be297774553f5a9952351e77e#L0L2025">2025</a></span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/bc5f6814aadaa61be297774553f5a9952351e77e#L0L2026">2026</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/bc5f6814aadaa61be297774553f5a9952351e77e#L0L2027">2027</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/bc5f6814aadaa61be297774553f5a9952351e77e#L0L2028">2028</a></span>
</pre>
</th>
<th class="diff-line-number" style="border: 1px solid #aaa">
<pre style="border: 0; font-family: Consolas, Menlo, "Liberation Mono", Courier, monospace; line-height: 1.2; margin: 0; padding: 0.5em; white-space: normal; width: auto"><span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/bc5f6814aadaa61be297774553f5a9952351e77e#L0R1987">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/bc5f6814aadaa61be297774553f5a9952351e77e#L0R1988">1988</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/bc5f6814aadaa61be297774553f5a9952351e77e#L0R1989">1989</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/bc5f6814aadaa61be297774553f5a9952351e77e#L0R1990">1990</a></span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/bc5f6814aadaa61be297774553f5a9952351e77e#L0R1991">1991</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/bc5f6814aadaa61be297774553f5a9952351e77e#L0R1992">1992</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/bc5f6814aadaa61be297774553f5a9952351e77e#L0R1993">1993</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/bc5f6814aadaa61be297774553f5a9952351e77e#L0R1994">1994</a></span>
<span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/bc5f6814aadaa61be297774553f5a9952351e77e#L0R2021">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/bc5f6814aadaa61be297774553f5a9952351e77e#L0R2022">2022</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/bc5f6814aadaa61be297774553f5a9952351e77e#L0R2023">2023</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/bc5f6814aadaa61be297774553f5a9952351e77e#L0R2024">2024</a></span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/bc5f6814aadaa61be297774553f5a9952351e77e#L0R2025">2025</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/bc5f6814aadaa61be297774553f5a9952351e77e#L0R2026">2026</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/bc5f6814aadaa61be297774553f5a9952351e77e#L0R2027">2027</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/bc5f6814aadaa61be297774553f5a9952351e77e#L0R2028">2028</a></span>
</pre>
</th>
<td class="diff-content" style="border: 1px solid #aaa">
<pre style="border: 0; font-family: Consolas, Menlo, "Liberation Mono", Courier, monospace; line-height: 1.2; margin: 0; padding: 0.5em; white-space: normal; width: auto"><span class="diff-hunk-header" style="background-color: #eaf2f5; color: #999999; display: block; white-space: pre">@@ -1988,7 +1988,7 @@ <span class="diff-context" style="background-color: #ffffaa; color: #000000">subrecs_push(byte *subrecs, int size, int n_subrecs, int score, void *body, int</span></span>
<span class="diff-not-changed" style="display: block; white-space: pre"> GRN_RSET_SUBRECS_COPY(subrecs,size,n,c2);</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> n = n2;</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> }</span>
<span class="diff-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre">- v = subrecs + n * (size + GRN_RSET_SCORE_SIZE);</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ v = subrecs + n * (GRN_RSET_SCORE_SIZE + size);</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> *((int *)v) = score;</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> memcpy(v + GRN_RSET_SCORE_SIZE, body, size);</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> }</span>
<span class="diff-hunk-header" style="background-color: #eaf2f5; color: #999999; display: block; white-space: pre">@@ -2022,7 +2022,7 @@ <span class="diff-context" style="background-color: #ffffaa; color: #000000">subrecs_replace_min(byte *subrecs, int size, int n_subrecs, int score, void *bod</span></span>
<span class="diff-not-changed" style="display: block; white-space: pre"> }</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> }</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> }</span>
<span class="diff-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre">- v = subrecs + n * (size + GRN_RSET_SCORE_SIZE);</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ v = subrecs + n * (GRN_RSET_SCORE_SIZE + size);</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> memcpy(v, &score, GRN_RSET_SCORE_SIZE);</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> memcpy(v + GRN_RSET_SCORE_SIZE, body, size);</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> }</span>
</pre>
</td>
</tr>
</tbody>
</table>
<table style="border-collapse: collapse; border: 1px solid #aaa">
<thead>
<tr class="diff-header" style="border: 1px solid #aaa">
<td colspan="3">
<pre style="border: 0; font-family: Consolas, Menlo, "Liberation Mono", Courier, monospace; line-height: 1.2; margin: 0; padding: 0.5em; white-space: normal; width: auto"><span class="diff-header" style="background-color: #eaf2f5; color: #999999; display: block; white-space: pre"> Modified: lib/db.h (+2 -2)</span>
<span class="diff-header-mark" style="background-color: #eaf2f5; color: #999999; display: block; white-space: pre">===================================================================</span>
</pre>
</td>
</tr>
</thead>
<tbody>
<tr>
<th class="diff-line-number" style="border: 1px solid #aaa">
<pre style="border: 0; font-family: Consolas, Menlo, "Liberation Mono", Courier, monospace; line-height: 1.2; margin: 0; padding: 0.5em; white-space: normal; width: auto"><span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/bc5f6814aadaa61be297774553f5a9952351e77e#L1L57">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/bc5f6814aadaa61be297774553f5a9952351e77e#L1L58">58</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/bc5f6814aadaa61be297774553f5a9952351e77e#L1L59">59</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/bc5f6814aadaa61be297774553f5a9952351e77e#L1L60">60</a></span>
<span class="diff-line-number-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/bc5f6814aadaa61be297774553f5a9952351e77e#L1L61">61</a></span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/bc5f6814aadaa61be297774553f5a9952351e77e#L1L62">62</a></span>
<span class="diff-line-number-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/bc5f6814aadaa61be297774553f5a9952351e77e#L1L63">63</a></span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/bc5f6814aadaa61be297774553f5a9952351e77e#L1L64">64</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/bc5f6814aadaa61be297774553f5a9952351e77e#L1L65">65</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/bc5f6814aadaa61be297774553f5a9952351e77e#L1L66">66</a></span>
</pre>
</th>
<th class="diff-line-number" style="border: 1px solid #aaa">
<pre style="border: 0; font-family: Consolas, Menlo, "Liberation Mono", Courier, monospace; line-height: 1.2; margin: 0; padding: 0.5em; white-space: normal; width: auto"><span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/bc5f6814aadaa61be297774553f5a9952351e77e#L1R57">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/bc5f6814aadaa61be297774553f5a9952351e77e#L1R58">58</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/bc5f6814aadaa61be297774553f5a9952351e77e#L1R59">59</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/bc5f6814aadaa61be297774553f5a9952351e77e#L1R60">60</a></span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/bc5f6814aadaa61be297774553f5a9952351e77e#L1R61">61</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/bc5f6814aadaa61be297774553f5a9952351e77e#L1R62">62</a></span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/bc5f6814aadaa61be297774553f5a9952351e77e#L1R63">63</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/bc5f6814aadaa61be297774553f5a9952351e77e#L1R64">64</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/bc5f6814aadaa61be297774553f5a9952351e77e#L1R65">65</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/bc5f6814aadaa61be297774553f5a9952351e77e#L1R66">66</a></span>
</pre>
</th>
<td class="diff-content" style="border: 1px solid #aaa">
<pre style="border: 0; font-family: Consolas, Menlo, "Liberation Mono", Courier, monospace; line-height: 1.2; margin: 0; padding: 0.5em; white-space: normal; width: auto"><span class="diff-hunk-header" style="background-color: #eaf2f5; color: #999999; display: block; white-space: pre">@@ -58,9 +58,9 @@ <span class="diff-context" style="background-color: #ffffaa; color: #000000">typedef struct {</span></span>
<span class="diff-not-changed" style="display: block; white-space: pre"> </span>
<span class="diff-not-changed" style="display: block; white-space: pre"> #define GRN_RSET_SUBRECS_CMP(a,b,dir) (((a) - (b))*(dir))</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> #define GRN_RSET_SUBRECS_NTH(subrecs,size,n) \</span>
<span class="diff-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre">- ((int *)((byte *)subrecs + n * (size + GRN_RSET_SCORE_SIZE)))</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ ((int *)((byte *)subrecs + n * (GRN_RSET_SCORE_SIZE + size)))</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> #define GRN_RSET_SUBRECS_COPY(subrecs,size,n,src) \</span>
<span class="diff-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre">- (memcpy(GRN_RSET_SUBRECS_NTH(subrecs, size, n), src, size + GRN_RSET_SCORE_SIZE))</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ (memcpy(GRN_RSET_SUBRECS_NTH(subrecs, size, n), src, GRN_RSET_SCORE_SIZE + size))</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> </span>
<span class="diff-not-changed" style="display: block; white-space: pre"> #define GRN_JSON_LOAD_OPEN_BRACKET 0x40000000</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> #define GRN_JSON_LOAD_OPEN_BRACE 0x40000001</span>
</pre>
</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>