Navigation Menu

Skip to content

Commit

Permalink
Remove unused :id option
Browse files Browse the repository at this point in the history
  • Loading branch information
kou committed Apr 13, 2015
1 parent ec13b40 commit 0152f92
Showing 1 changed file with 7 additions and 35 deletions.
42 changes: 7 additions & 35 deletions ext/groonga/rb-grn-table.c
@@ -1,7 +1,7 @@
/* -*- coding: utf-8; mode: C; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
Copyright (C) 2014-2015 Masafumi Yokoyama <yokoyama@clear-code.com>
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
Expand Down Expand Up @@ -2039,24 +2039,17 @@ rb_grn_table_lock (int argc, VALUE *argv, VALUE self)
}

/*
* _table_ のロックを強制的に解除する。
* Force to clear lock of `table`.
*
* @overload clear_lock(options={})
* @param [::Hash] options The name and value
* pairs. Omitted names are initialized as the default value.
* @option options :id
* _:id_ で指定したレコードのロックを強制的に解除する。
* (注: groonga側が未実装のため、現在は無視される。実装さ
* れるのではないかと思っているが、実装されないかもしれな
* い。)
* @param [::Hash] options No available options.
*/
static VALUE
rb_grn_table_clear_lock (int argc, VALUE *argv, VALUE self)
{
grn_id id = GRN_ID_NIL;
grn_ctx *context;
grn_obj *table;
VALUE options, rb_id;
VALUE options;

rb_scan_args(argc, argv, "01", &options);

Expand All @@ -2065,37 +2058,23 @@ rb_grn_table_clear_lock (int argc, VALUE *argv, VALUE self)
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, table);

return Qnil;
}

/*
* _table_ がロックされていれば +true+ を返す。
* Check whether `table` is locked or not.
*
* @overload locked?(options={})
* @param [options] options The name and value
* pairs. Omitted names are initialized as the default value.
* @option options :id
* _:id_ で指定したレコードがロックされていれば +true+ を返す。
* (注: groonga側が未実装のため、現在は無視される。実装さ
* れるのではないかと思っているが、実装されないかもしれな
* い。)
* @param [options] options No available options.
*/
static VALUE
rb_grn_table_is_locked (int argc, VALUE *argv, VALUE self)
{
grn_id id = GRN_ID_NIL;
grn_ctx *context;
grn_obj *table;
VALUE options, rb_id;
VALUE options;

rb_scan_args(argc, argv, "01", &options);

Expand All @@ -2104,13 +2083,6 @@ rb_grn_table_is_locked (int argc, VALUE *argv, VALUE self)
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, table));
}

Expand Down

0 comments on commit 0152f92

Please sign in to comment.