diff options
Diffstat (limited to 'storage/mroonga/vendor/groonga/lib/store.c')
-rw-r--r-- | storage/mroonga/vendor/groonga/lib/store.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/storage/mroonga/vendor/groonga/lib/store.c b/storage/mroonga/vendor/groonga/lib/store.c index 027f86baac8..d43ebb466e3 100644 --- a/storage/mroonga/vendor/groonga/lib/store.c +++ b/storage/mroonga/vendor/groonga/lib/store.c @@ -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) @@ -46,7 +47,7 @@ _grn_ra_create(grn_ctx *ctx, grn_ra *ra, const char *path, unsigned int element_ grn_io_set_type(io, GRN_COLUMN_FIX_SIZE); header->element_size = actual_size; 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--); ra->io = io; ra->header = header; ra->element_mask = n_elm - 1; @@ -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; |