1
0
Fork 0
mirror of https://github.com/ruby-opencv/ruby-opencv synced 2023-03-27 23:22:12 -04:00

added type check to some CvMat methods (8)

This commit is contained in:
ser1zw 2011-07-08 00:15:07 +09:00
parent c003ee81f0
commit 46227b7fa1
8 changed files with 133 additions and 112 deletions

View file

@ -62,6 +62,14 @@ CVSEQ(VALUE object)
return ptr;
}
inline CvSeq*
CVSEQ_WITH_CHECK(VALUE object)
{
if (!rb_obj_is_kind_of(object, cCvSeq::rb_class()))
raise_typeerror(object, cCvSeq::rb_class());
return CVSEQ(object);
}
__NAMESPACE_END_OPENCV
#endif // RUBY_OPENCV_CVSEQ_H