[Groonga-commit] groonga/groonga at 4a86a28 [master] Copy body

Back to archive index

Kouhei Sutou null+****@clear*****
Wed Jan 7 18:09:14 JST 2015


Kouhei Sutou	2015-01-07 18:09:14 +0900 (Wed, 07 Jan 2015)

  New Revision: 4a86a2815c64ffac844820e28a25896babb0dfba
  https://github.com/groonga/groonga/commit/4a86a2815c64ffac844820e28a25896babb0dfba

  Message:
    Copy body
    
    Because XML transform replaces body inplace. :<

  Modified files:
    src/groonga.c

  Modified: src/groonga.c (+4 -2)
===================================================================
--- src/groonga.c    2015-01-07 18:08:52 +0900 (340aef9)
+++ src/groonga.c    2015-01-07 18:09:14 +0900 (d4e232f)
@@ -311,7 +311,7 @@ s_output_typed(grn_ctx *ctx, int flags, FILE *stream)
     grn_obj body;
     grn_obj *command;
 
-    GRN_TEXT_INIT(&body, GRN_OBJ_DO_SHALLOW_COPY);
+    GRN_TEXT_INIT(&body, 0);
     grn_ctx_recv(ctx, &chunk, &chunk_size, &recv_flags);
     GRN_TEXT_SET(ctx, &body, chunk, chunk_size);
 
@@ -328,6 +328,8 @@ s_output_typed(grn_ctx *ctx, int flags, FILE *stream)
       GRN_OBJ_FIN(ctx, &head);
       GRN_OBJ_FIN(ctx, &foot);
     }
+    GRN_OBJ_FIN(ctx, &body);
+
     command = GRN_CTX_USER_DATA(ctx)->ptr;
     GRN_BULK_REWIND(command);
   }
@@ -896,7 +898,7 @@ h_output_typed(grn_ctx *ctx, int flags, ht_context *hc)
 
   GRN_TEXT_INIT(&header, 0);
   GRN_TEXT_INIT(&head, 0);
-  GRN_TEXT_INIT(&body, GRN_OBJ_DO_SHALLOW_COPY);
+  GRN_TEXT_INIT(&body, 0);
   GRN_TEXT_INIT(&foot, 0);
 
   grn_ctx_recv(ctx, &chunk, &chunk_size, &recv_flags);
-------------- next part --------------
HTML����������������������������...
Download 



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