[Groonga-commit] ranguba/rroonga at ec13b40 [master] Remove unused :id option

Back to archive index

Kouhei Sutou null+****@clear*****
Mon Apr 13 15:37:26 JST 2015


Kouhei Sutou	2015-04-13 15:37:26 +0900 (Mon, 13 Apr 2015)

  New Revision: ec13b40fd418868ab91a3cbf4989d8bf747691b8
  https://github.com/ranguba/rroonga/commit/ec13b40fd418868ab91a3cbf4989d8bf747691b8

  Message:
    Remove unused :id option

  Modified files:
    ext/groonga/rb-grn-column.c

  Modified: ext/groonga/rb-grn-column.c (+9 -33)
===================================================================
--- ext/groonga/rb-grn-column.c    2015-04-13 15:33:43 +0900 (2b12e4e)
+++ ext/groonga/rb-grn-column.c    2015-04-13 15:37:26 +0900 (4a0de56)
@@ -1,7 +1,7 @@
 /* -*- coding: utf-8; mode: C; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
 /* vim: set sts=4 sw=4 ts=8 noet: */
 /*
-  Copyright (C) 2009-2014  Kouhei Sutou <kou �� clear-code.com>
+  Copyright (C) 2009-2015  Kouhei Sutou <kou �� clear-code.com>
 
   This library is free software; you can redistribute it and/or
   modify it under the terms of the GNU Lesser General Public
@@ -504,22 +504,17 @@ rb_grn_column_lock (int argc, VALUE *argv, VALUE self)
 }
 
 /*
- * _column_ のロックを強制的に解除する。
+ * Force to clear lock of `column`.
+ *
  * @overload clear_lock(options={})
- *   @param [::Hash] options 利用可能なオプションは以下の通り。
- *   @option options :id
- *     _:id_で指定したレコードのロックを強制的に解除する。
- *     (注: groonga側が未実装のため、現在は無視される。実装さ
- *     れるのではないかと思っているが、実装されないかもしれな
- *     い。)
+ *   @param [::Hash] options No available options.
  */
 static VALUE
 rb_grn_column_clear_lock (int argc, VALUE *argv, VALUE self)
 {
-    grn_id id = GRN_ID_NIL;
     grn_ctx *context;
     grn_obj *column;
-    VALUE options, rb_id;
+    VALUE options;
 
     rb_scan_args(argc, argv, "01",  &options);
 
@@ -527,35 +522,23 @@ rb_grn_column_clear_lock (int argc, VALUE *argv, VALUE self)
                              NULL, NULL,
                              NULL, NULL, NULL);
 
-    rb_grn_scan_options(options,
-                        "id", &rb_id,
-                        NULL);
-
-    if (!NIL_P(rb_id))
-        id = NUM2UINT(rb_id);
-
     grn_obj_clear_lock(context, column);
 
     return Qnil;
 }
 
 /*
- * _column_ がロックされていれば +true+ を返す。
+ * Check whether `column` is locked or not.
+ *
  * @overload locked?(options={})
- *   @param [::Hash] options 利用可能なオプションは以下の通り。
- *   @option options :id
- *     _:id_で指定したレコードがロックされていれば +true+ を返す。
- *     (注: groonga側が未実装のため、現在は無視される。実装さ
- *     れるのではないかと思っているが、実装されないかもしれな
- *     い。)
+ *   @param [::Hash] options No available options.
  */
 static VALUE
 rb_grn_column_is_locked (int argc, VALUE *argv, VALUE self)
 {
-    grn_id id = GRN_ID_NIL;
     grn_ctx *context;
     grn_obj *column;
-    VALUE options, rb_id;
+    VALUE options;
 
     rb_scan_args(argc, argv, "01",  &options);
 
@@ -563,13 +546,6 @@ rb_grn_column_is_locked (int argc, VALUE *argv, VALUE self)
                              NULL, NULL,
                              NULL, NULL, NULL);
 
-    rb_grn_scan_options(options,
-                        "id", &rb_id,
-                        NULL);
-
-    if (!NIL_P(rb_id))
-        id = NUM2UINT(rb_id);
-
     return CBOOL2RVAL(grn_obj_is_locked(context, column));
 }
 
-------------- next part --------------
HTML����������������������������...
Download 



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