[Groonga-commit] groonga/groonga at a8c80cd [master] Use grn_bool for boolean value

Back to archive index

Kouhei Sutou null+****@clear*****
Fri Jul 19 18:20:03 JST 2013


Kouhei Sutou	2013-07-19 18:20:03 +0900 (Fri, 19 Jul 2013)

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

  Message:
    Use grn_bool for boolean value

  Modified files:
    lib/db.c

  Modified: lib/db.c (+4 -4)
===================================================================
--- lib/db.c    2013-07-18 23:56:07 +0900 (9a8bedd)
+++ lib/db.c    2013-07-19 18:20:03 +0900 (b4e5581)
@@ -1528,10 +1528,10 @@ clear_column_values(grn_ctx *ctx, grn_obj *table, grn_id rid)
   }
 }
 
-static int
+static grn_bool
 is_deletable(grn_ctx *ctx, grn_obj *table, grn_id id)
 {
-  int res = 1;
+  grn_bool res = GRN_TRUE;
   if (id) {
     grn_hash *cols;
     if ((cols = grn_hash_create(ctx, NULL, sizeof(grn_id), 0,
@@ -1557,14 +1557,14 @@ is_deletable(grn_ctx *ctx, grn_obj *table, grn_id id)
             ERR(GRN_OPERATION_NOT_PERMITTED,
                 "undeletable record (%s:%d) has value (%s:%d)",
                 table_name, id, column_name, esize);
-            res = 0;
+            res = GRN_FALSE;
           }
         });
       }
       grn_hash_close(ctx, cols);
     }
   } else {
-    res = 0;
+    res = GRN_FALSE;
   }
   return res;
 }
-------------- next part --------------
HTML����������������������������...
Download 



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