Feature#name could be anything
This commit is contained in:
parent
507ef2aa4b
commit
9f263d79f2
1 changed files with 4 additions and 1 deletions
|
@ -31,13 +31,16 @@ feature_set(VALUE self, VALUE path, VALUE state)
|
||||||
{
|
{
|
||||||
int r;
|
int r;
|
||||||
char *cpath;
|
char *cpath;
|
||||||
|
VALUE name;
|
||||||
|
|
||||||
Check_Type(path, T_STRING);
|
Check_Type(path, T_STRING);
|
||||||
Check_Type(state, T_FIXNUM);
|
Check_Type(state, T_FIXNUM);
|
||||||
cpath = RSTRING_PTR(path);
|
cpath = RSTRING_PTR(path);
|
||||||
|
name = rb_funcall(self, rb_intern("name"), 0);
|
||||||
|
Check_Type(name, T_STRING);
|
||||||
r = hbsdcontrol_set_feature_state(
|
r = hbsdcontrol_set_feature_state(
|
||||||
cpath,
|
cpath,
|
||||||
RSTRING_PTR(rb_funcall(self, rb_intern("name"), 0)),
|
RSTRING_PTR(name),
|
||||||
NUM2INT(state)
|
NUM2INT(state)
|
||||||
);
|
);
|
||||||
if (r == 0) {
|
if (r == 0) {
|
||||||
|
|
Loading…
Reference in a new issue