[Groonga-commit] groonga/groonga [master] suggest: name an argument

Back to archive index

null+****@clear***** null+****@clear*****
2012年 3月 9日 (金) 15:37:46 JST


Kouhei Sutou	2012-03-09 15:37:46 +0900 (Fri, 09 Mar 2012)

  New Revision: 785812b4f1b24ff6fc4900faab8b9f128486d15f

  Log:
    suggest: name an argument

  Modified files:
    plugins/suggest/suggest.c

  Modified: plugins/suggest/suggest.c (+3 -2)
===================================================================
--- plugins/suggest/suggest.c    2012-03-09 15:36:41 +0900 (65c91c6)
+++ plugins/suggest/suggest.c    2012-03-09 15:37:46 +0900 (289a2f8)
@@ -544,7 +544,8 @@ learn(grn_ctx *ctx, grn_obj **args)
   grn_id post_item_id = GRN_RECORD_VALUE(post_item);
   grn_obj *seq = args[3];
   grn_id seq_id = GRN_RECORD_VALUE(seq);
-  int64_t post_time_value = GRN_TIME_VALUE(args[4]);
+  grn_obj *post_time = args[4];
+  int64_t post_time_value = GRN_TIME_VALUE(post_time);
   grn_obj *pairs = args[5];
   if (post_event_id && post_item_id && seq_id) {
     grn_obj *items = grn_ctx_at(ctx, GRN_OBJ_GET_DOMAIN(args[2]));
@@ -566,7 +567,7 @@ learn(grn_ctx *ctx, grn_obj **args)
     GRN_UINT32_SET(ctx, &v1, 1);
     GRN_RECORD_INIT(&pre_events, 0, grn_obj_id(ctx, events));
     grn_obj_set_value(ctx, items_freq, post_item_id, &v1, GRN_OBJ_INCR);
-    grn_obj_set_value(ctx, items_last, post_item_id, args[4], GRN_OBJ_SET);
+    grn_obj_set_value(ctx, items_last, post_item_id, post_time, GRN_OBJ_SET);
     if (post_type_id) {
       int added;
       grn_id pid, tid, *ep, *es;




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