[Groonga-commit] groonga/groonga at a846846 [master] ii: reduce scope of "key_buf"

Back to archive index

Yasuhiro Horimoto null+****@clear*****
Tue Apr 24 15:35:11 JST 2018


Yasuhiro Horimoto	2018-04-24 15:35:11 +0900 (Tue, 24 Apr 2018)

  New Revision: a846846bec81f6a9f50b8f91bbe22acd5cd2e60a
  https://github.com/groonga/groonga/commit/a846846bec81f6a9f50b8f91bbe22acd5cd2e60a

  Merged 63e0b56: ii: add log enhancements that output contents of a token (#840)

  Message:
    ii: reduce scope of "key_buf"

  Modified files:
    lib/ii.c

  Modified: lib/ii.c (+1 -1)
===================================================================
--- lib/ii.c    2018-04-24 15:32:20 +0900 (a825ad0d1)
+++ lib/ii.c    2018-04-24 15:35:11 +0900 (8bfa20f08)
@@ -108,13 +108,13 @@ static void
 grn_ii_get_token_from_token_id(grn_ctx *ctx, grn_ii *ii,
                                grn_id tid, grn_obj *token)
 {
-   grn_obj key_buf;
    char key[GRN_TABLE_MAX_KEY_SIZE];
    int key_size;
    GRN_TEXT_INIT(token, 0);
    key_size = grn_table_get_key(ctx, ii->lexicon, tid,
                                 key, GRN_TABLE_MAX_KEY_SIZE);
    if (key_size != 0) {
+     grn_obj key_buf;
      GRN_OBJ_INIT(&key_buf, GRN_BULK, 0, ii->lexicon->header.domain);
      GRN_TEXT_SET(ctx, &key_buf, key, key_size);
      grn_inspect(ctx, token, &key_buf);
-------------- next part --------------
HTML����������������������������...
URL: https://lists.osdn.me/mailman/archives/groonga-commit/attachments/20180424/3060d829/attachment-0001.htm 



More information about the Groonga-commit mailing list
Back to archive index