[Groonga-commit] groonga/groonga [master] [geo] add GRN_ prefix. refs #1173

Back to archive index

null+****@clear***** null+****@clear*****
2011年 11月 18日 (金) 17:28:17 JST


Kouhei Sutou	2011-11-18 08:28:17 +0000 (Fri, 18 Nov 2011)

  New Revision: b523c556a60ef837b215b42aa8fccd31acca7d98

  Log:
    [geo] add GRN_ prefix. refs #1173

  Modified files:
    lib/geo.c
    lib/geo.h

  Modified: lib/geo.c (+1 -3)
===================================================================
--- lib/geo.c    2011-11-18 08:16:15 +0000 (4dd8047)
+++ lib/geo.c    2011-11-18 08:28:17 +0000 (819dca7)
@@ -22,8 +22,6 @@
 #include <string.h>
 #include <stdlib.h>
 
-#define GEO_KEY_MAX_BITS 64
-
 typedef struct {
   grn_id id;
   double d;
@@ -1146,7 +1144,7 @@ grn_geo_cursor_entry_next(grn_ctx *ctx,
 {
   uint8_t *top_left_key = cursor->top_left_key;
   uint8_t *bottom_right_key = cursor->bottom_right_key;
-  int max_target_bit = GEO_KEY_MAX_BITS - cursor->minimum_reduce_bit;
+  int max_target_bit = GRN_GEO_KEY_MAX_BITS - cursor->minimum_reduce_bit;
 
   if (cursor->current_entry < 0) {
     return GRN_FALSE;

  Modified: lib/geo.h (+3 -1)
===================================================================
--- lib/geo.h    2011-11-18 08:16:15 +0000 (2e14908)
+++ lib/geo.h    2011-11-18 08:28:17 +0000 (4a97419)
@@ -54,6 +54,8 @@ extern "C" {
   _longitude = GRN_GEO_INT2RAD(_val->longitude);\
 } while (0)
 
+#define GRN_GEO_KEY_MAX_BITS 64
+
 typedef enum _grn_geo_mesh_direction grn_geo_mesh_direction;
 enum _grn_geo_mesh_direction {
   GRN_GEO_MESH_LATITUDE,
@@ -92,7 +94,7 @@ struct _grn_geo_cursor_in_rectangle {
   grn_ii_cursor *ii_cursor;
   int offset;
   int rest;
-  grn_geo_cursor_entry entries[64];
+  grn_geo_cursor_entry entries[GRN_GEO_KEY_MAX_BITS];
   int current_entry;
   int minimum_reduce_bit;
 };




Groonga-commit メーリングリストの案内
Back to archive index