[Groonga-commit] groonga/groonga at dfd2a34 [master] Unlink only accessor

Back to archive index

Kouhei Sutou null+****@clear*****
Mon Jan 25 00:00:51 JST 2016


Kouhei Sutou	2016-01-25 00:00:51 +0900 (Mon, 25 Jan 2016)

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

  Message:
    Unlink only accessor

  Modified files:
    lib/expr.c

  Modified: lib/expr.c (+9 -3)
===================================================================
--- lib/expr.c    2016-01-24 23:53:54 +0900 (97cd019)
+++ lib/expr.c    2016-01-25 00:00:51 +0900 (2687d02)
@@ -6796,7 +6796,9 @@ done :
     unsigned int name_size = s - q->cur;
     if (name_resolve_context) {
       if ((obj = grn_obj_column(ctx, name_resolve_context, name, name_size))) {
-        grn_expr_take_obj(ctx, q->e, obj);
+        if (obj->header.type == GRN_ACCESSOR) {
+          grn_expr_take_obj(ctx, q->e, obj);
+        }
         PARSE(GRN_EXPR_TOKEN_IDENTIFIER);
         grn_expr_append_obj(ctx, q->e, obj, GRN_OP_GET_VALUE, 2);
         goto exit;
@@ -6808,13 +6810,17 @@ done :
       goto exit;
     }
     if ((obj = grn_obj_column(ctx, q->table, name, name_size))) {
-      grn_expr_take_obj(ctx, q->e, obj);
+      if (obj->header.type == GRN_ACCESSOR) {
+        grn_expr_take_obj(ctx, q->e, obj);
+      }
       PARSE(GRN_EXPR_TOKEN_IDENTIFIER);
       grn_expr_append_obj(ctx, q->e, obj, GRN_OP_GET_VALUE, 1);
       goto exit;
     }
     if ((obj = resolve_top_level_name(ctx, name, name_size))) {
-      grn_expr_take_obj(ctx, q->e, obj);
+      if (obj->header.type == GRN_ACCESSOR) {
+        grn_expr_take_obj(ctx, q->e, obj);
+      }
       PARSE(GRN_EXPR_TOKEN_IDENTIFIER);
       grn_expr_append_obj(ctx, q->e, obj, GRN_OP_PUSH, 1);
       goto exit;
-------------- next part --------------
HTML����������������������������...
Télécharger 



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