mirror of
https://github.com/ruby-opencv/ruby-opencv
synced 2023-03-27 23:22:12 -04:00
added BOOL2INT and INT2BOOL
This commit is contained in:
parent
6197c1f7fc
commit
dbc579c3e0
1 changed files with 9 additions and 0 deletions
|
@ -151,6 +151,15 @@ extern "C"{
|
|||
|
||||
#define maxint(a,b) ({int _a = (a), _b = (b); _a > _b ? _a : _b; })
|
||||
|
||||
#ifndef BOOL2INT
|
||||
#define BOOL2INT(x) ((x == Qtrue) ? 1 : 0)
|
||||
#endif
|
||||
|
||||
#ifndef INT2BOOL
|
||||
#define INT2BOOL(x) (x ? Qtrue : Qfalse)
|
||||
#endif
|
||||
|
||||
|
||||
// wrapper for <= 1.8
|
||||
#ifndef RARRAY_LEN
|
||||
#define RARRAY_LEN(arg) (RARRAY(arg)->len)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue