[Groonga-commit] groonga/groonga at c349263 [master] ii: use GRN_OBJ_DO_SHALLOW_COPY instead of 0

Back to archive index

Yasuhiro Horimoto null+****@clear*****
Tue Apr 24 15:42:06 JST 2018


Yasuhiro Horimoto	2018-04-24 15:42:06 +0900 (Tue, 24 Apr 2018)

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

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

  Message:
    ii: use GRN_OBJ_DO_SHALLOW_COPY instead of 0
    
    Beacuse reduce memory copy.

  Modified files:
    lib/ii.c

  Modified: lib/ii.c (+4 -1)
===================================================================
--- lib/ii.c    2018-04-24 15:38:23 +0900 (b0cc29de7)
+++ lib/ii.c    2018-04-24 15:42:06 +0900 (bdac18f63)
@@ -114,7 +114,10 @@ grn_ii_get_token_from_token_id(grn_ctx *ctx, grn_ii *ii,
                                 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_OBJ_INIT(&key_buf,
+                  GRN_BULK,
+                  GRN_OBJ_DO_SHALLOW_COPY,
+                  ii->lexicon->header.domain);
      GRN_TEXT_SET(ctx, &key_buf, key, key_size);
      grn_inspect(ctx, token, &key_buf);
      GRN_OBJ_FIN(ctx, &key_buf);
-------------- next part --------------
HTML����������������������������...
URL: https://lists.osdn.me/mailman/archives/groonga-commit/attachments/20180424/99aaf6be/attachment-0001.htm 



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