[Groonga-commit] groonga/groonga at 987456a [mrb-bind-dump-command] Fix registration order for dump command

Back to archive index

Masafumi Yokoyama null+****@clear*****
Mon Feb 23 17:59:26 JST 2015


Masafumi Yokoyama	2015-02-23 17:59:26 +0900 (Mon, 23 Feb 2015)

  New Revision: 987456adc5e415d437f97e970676ada3a060886b
  https://github.com/groonga/groonga/commit/987456adc5e415d437f97e970676ada3a060886b

  Message:
    Fix registration order for dump command
    
    Because grn_id should be set to the same value.

  Modified files:
    lib/db.c
    lib/proc.c

  Modified: lib/db.c (+0 -6)
===================================================================
--- lib/db.c    2015-02-23 16:20:27 +0900 (190fbdf)
+++ lib/db.c    2015-02-23 17:59:26 +0900 (681d0d9)
@@ -25,7 +25,6 @@
 #include "grn_tokenizers.h"
 #include "grn_proc.h"
 #include "grn_plugin.h"
-#include "grn_command.h"
 #include "grn_geo.h"
 #include "grn_scorers.h"
 #include "grn_snip.h"
@@ -259,11 +258,6 @@ grn_db_open(grn_ctx *ctx, const char *path)
             ERRCLR(ctx);
           }
 #endif
-#ifdef GRN_WITH_MRUBY
-          if (grn_db_init_dump_command(ctx)) {
-            ERRCLR(ctx);
-          }
-#endif
           grn_db_init_builtin_tokenizers(ctx);
           grn_db_init_builtin_normalizers(ctx);
           grn_db_init_builtin_scorers(ctx);

  Modified: lib/proc.c (+6 -1)
===================================================================
--- lib/proc.c    2015-02-23 16:20:27 +0900 (e1aadde)
+++ lib/proc.c    2015-02-23 17:59:26 +0900 (287efd4)
@@ -25,6 +25,7 @@
 #include "grn_geo.h"
 #include "grn_token_cursor.h"
 #include "grn_expr.h"
+#include "grn_command.h"
 
 #include <string.h>
 #include <stdlib.h>
@@ -6559,7 +6560,11 @@ grn_db_init_builtin_query(grn_ctx *ctx)
   DEF_VAR(vars[0], "max");
   DEF_COMMAND("cache_limit", proc_cache_limit, 1, vars);
 
-#ifndef GRN_WITH_MRUBY
+#ifdef GRN_WITH_MRUBY
+  if (grn_db_init_dump_command(ctx)) {
+    ERRCLR(ctx);
+  }
+#else /* GRN_WITH_MRUBY */
   DEF_VAR(vars[0], "tables");
   DEF_COMMAND("dump", proc_dump, 1, vars);
 #endif /*GRN_WITH_MRUBY */
-------------- next part --------------
HTML����������������������������...
Download 



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