null+****@clear*****
null+****@clear*****
2011年 11月 22日 (火) 16:32:23 JST
Daijiro MORI 2011-11-22 07:32:23 +0000 (Tue, 22 Nov 2011) New Revision: 996b59a8d7d16b3188070f7b19abcdc0d8ce1ff1 Log: modified grn_index_cursor_open() to assign an id to the cursor so as to grn_ctx_at() works fine with the cursor Modified files: lib/db.c Modified: lib/db.c (+6 -0) =================================================================== --- lib/db.c 2011-11-22 07:27:57 +0000 (aab6620) +++ lib/db.c 2011-11-22 07:32:23 +0000 (44f47aa) @@ -2418,6 +2418,12 @@ grn_index_cursor_open(grn_ctx *ctx, grn_table_cursor *tc, ic->rid_max = rid_max; ic->flags = flags; GRN_DB_OBJ_SET_TYPE(ic, GRN_CURSOR_COLUMN_INDEX); + { + grn_id id = grn_obj_register(ctx, ctx->impl->db, NULL, 0); + DB_OBJ(ic)->header.domain = GRN_ID_NIL; + DB_OBJ(ic)->range = GRN_ID_NIL; + grn_db_obj_init(ctx, ctx->impl->db, id, DB_OBJ(ic)); + } } GRN_API_RETURN((grn_obj *)ic); }