[Groonga-commit] groonga/groonga [master] [geo] set temporary ID.

Back to archive index

null+****@clear***** null+****@clear*****
2011年 11月 22日 (火) 18:50:44 JST


Kouhei Sutou	2011-11-22 09:50:44 +0000 (Tue, 22 Nov 2011)

  New Revision: 68be71cd00d3b9590b60dda7b6842eda251a28bf

  Log:
    [geo] set temporary ID.

  Modified files:
    lib/geo.c

  Modified: lib/geo.c (+10 -1)
===================================================================
--- lib/geo.c    2011-11-22 08:15:52 +0000 (6daf7f4)
+++ lib/geo.c    2011-11-22 09:50:44 +0000 (b0ec9de)
@@ -1056,7 +1056,6 @@ grn_geo_cursor_open_in_rectangle(grn_ctx *ctx,
     goto exit;
   }
 
-  GRN_DB_OBJ_SET_TYPE(cursor, GRN_CURSOR_COLUMN_GEO_INDEX);
   cursor->pat = data.pat;
   cursor->index = index;
   memcpy(&(cursor->top_left), data.top_left, sizeof(grn_geo_point));
@@ -1100,6 +1099,16 @@ grn_geo_cursor_open_in_rectangle(grn_ctx *ctx,
       cursor->minimum_reduce_bit = 1;
     }
   }
+  GRN_DB_OBJ_SET_TYPE(cursor, GRN_CURSOR_COLUMN_GEO_INDEX);
+  {
+    grn_obj *db;
+    grn_id id;
+    db = grn_ctx_db(ctx);
+    id = grn_obj_register(ctx, db, NULL, 0);
+    DB_OBJ(cursor)->header.domain = GRN_ID_NIL;
+    DB_OBJ(cursor)->range = GRN_ID_NIL;
+    grn_db_obj_init(ctx, db, id, DB_OBJ(cursor));
+  }
 
 exit :
   grn_obj_unlink(ctx, &(data.top_left_point_buffer));




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