mirror of
https://github.com/ruby-opencv/ruby-opencv
synced 2023-03-27 23:22:12 -04:00
replace rb_hash_aref to rb_hash_lookup (or LOOKUP_HASH)
This commit is contained in:
parent
79f0bef6b3
commit
6331e8dc53
4 changed files with 13 additions and 13 deletions
|
@ -132,7 +132,7 @@ rb_open(int argc, VALUE *argv, VALUE self)
|
|||
capture = cvCaptureFromCAM(FIX2INT(device));
|
||||
break;
|
||||
case T_SYMBOL: {
|
||||
VALUE cap_index = rb_hash_aref(rb_const_get(rb_class(), rb_intern("INTERFACE")), device);
|
||||
VALUE cap_index = rb_hash_lookup(rb_const_get(rb_class(), rb_intern("INTERFACE")), device);
|
||||
if (NIL_P(cap_index))
|
||||
rb_raise(rb_eArgError, "undefined interface.");
|
||||
capture = cvCaptureFromCAM(NUM2INT(cap_index));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue