[Groonga-commit] groonga/groonga at 9a371ca [master] Pass through rc in call hook

Back to archive index

Kouhei Sutou null+****@clear*****
Mon Dec 7 16:58:27 JST 2015


Kouhei Sutou	2015-12-07 16:58:27 +0900 (Mon, 07 Dec 2015)

  New Revision: 9a371ca67dc2742e229657a9d40793213263510c
  https://github.com/groonga/groonga/commit/9a371ca67dc2742e229657a9d40793213263510c

  Message:
    Pass through rc in call hook

  Modified files:
    lib/db.c

  Modified: lib/db.c (+18 -0)
===================================================================
--- lib/db.c    2015-12-07 16:43:21 +0900 (926f7cb)
+++ lib/db.c    2015-12-07 16:58:27 +0900 (4530c9c)
@@ -6647,6 +6647,9 @@ grn_obj_set_value_table_pat_key(grn_ctx *ctx, grn_obj *obj, grn_id id,
   grn_obj buf;
 
   if (call_hook(ctx, obj, id, value, flags)) {
+    if (ctx->rc) {
+      rc = ctx->rc;
+    }
     return rc;
   }
 
@@ -6674,6 +6677,9 @@ grn_obj_set_value_table_hash_key(grn_ctx *ctx, grn_obj *obj, grn_id id,
   grn_obj buf;
 
   if (call_hook(ctx, obj, id, value, flags)) {
+    if (ctx->rc) {
+      rc = ctx->rc;
+    }
     return rc;
   }
 
@@ -6701,6 +6707,9 @@ grn_obj_set_value_table_no_key(grn_ctx *ctx, grn_obj *obj, grn_id id,
   grn_obj buf;
 
   if (call_hook(ctx, obj, id, value, flags)) {
+    if (ctx->rc) {
+      rc = ctx->rc;
+    }
     return rc;
   }
 
@@ -6730,6 +6739,9 @@ grn_obj_set_value_column_var_size_scalar(grn_ctx *ctx, grn_obj *obj, grn_id id,
   grn_id buf_domain = GRN_DB_VOID;
 
   if (call_hook(ctx, obj, id, value, flags)) {
+    if (ctx->rc) {
+      rc = ctx->rc;
+    }
     return rc;
   }
 
@@ -6831,6 +6843,9 @@ grn_obj_set_value_column_var_size_vector(grn_ctx *ctx, grn_obj *obj, grn_id id,
   grn_obj *lexicon = grn_ctx_at(ctx, range);
 
   if (call_hook(ctx, obj, id, value, flags)) {
+    if (ctx->rc) {
+      rc = ctx->rc;
+    }
     return rc;
   }
 
@@ -6987,6 +7002,9 @@ grn_obj_set_value_column_fix_size(grn_ctx *ctx, grn_obj *obj, grn_id id,
     switch (flags & GRN_OBJ_SET_MASK) {
     case GRN_OBJ_SET :
       if (call_hook(ctx, obj, id, value_, flags)) {
+        if (ctx->rc) {
+          rc = ctx->rc;
+        }
         GRN_OBJ_FIN(ctx, &buf);
         grn_ra_unref(ctx, (grn_ra *)obj, id);
         return rc;
-------------- next part --------------
HTML����������������������������...
Descargar 



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