Kouhei Sutou
null+****@clear*****
Fri May 8 10:09:32 JST 2015
Kouhei Sutou 2015-05-08 10:09:32 +0900 (Fri, 08 May 2015) New Revision: d4b820edf202bd42cb126af9a1b2de680b401eca https://github.com/groonga/groonga/commit/d4b820edf202bd42cb126af9a1b2de680b401eca Message: Name magic number Modified files: lib/store.c Modified: lib/store.c (+3 -2) =================================================================== --- lib/store.c 2015-05-08 00:01:31 +0900 (027f86b) +++ lib/store.c 2015-05-08 10:09:32 +0900 (034f4f9) @@ -23,7 +23,8 @@ /* rectangular arrays */ -#define GRN_RA_SEGMENT_SIZE (1 << 22) +#define GRN_RA_W_SEGMENT 22 +#define GRN_RA_SEGMENT_SIZE (1 << GRN_RA_W_SEGMENT) static grn_ra * _grn_ra_create(grn_ctx *ctx, grn_ra *ra, const char *path, unsigned int element_size) @@ -89,7 +90,7 @@ grn_ra_open(grn_ctx *ctx, const char *path) return NULL; } n_elm = GRN_RA_SEGMENT_SIZE / header->element_size; - for (w_elm = 22; (1 << w_elm) > n_elm; w_elm--); + for (w_elm = GRN_RA_W_SEGMENT; (1 << w_elm) > n_elm; w_elm--); GRN_DB_OBJ_SET_TYPE(ra, GRN_COLUMN_FIX_SIZE); ra->io = io; ra->header = header; -------------- next part -------------- HTML����������������������������...Download