1
0
Fork 0
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:
ser1zw 2011-06-19 06:57:51 +09:00
parent 6197c1f7fc
commit dbc579c3e0

View file

@ -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)