Lib/octave: replace is_bool_type() with islogical() for Octave >= 4.4
This commit is contained in:
parent
6f0561eb57
commit
04357dca21
1 changed files with 4 additions and 0 deletions
|
|
@ -18,7 +18,11 @@ SWIGINTERNINLINE octave_value
|
||||||
SWIGINTERN int
|
SWIGINTERN int
|
||||||
SWIG_AsVal_dec(bool)(const octave_value& ov, bool *val)
|
SWIG_AsVal_dec(bool)(const octave_value& ov, bool *val)
|
||||||
{
|
{
|
||||||
|
%#if SWIG_OCTAVE_PREREQ(4,4,0)
|
||||||
|
if (!ov.islogical())
|
||||||
|
%#else
|
||||||
if (!ov.is_bool_type())
|
if (!ov.is_bool_type())
|
||||||
|
%#endif
|
||||||
return SWIG_ERROR;
|
return SWIG_ERROR;
|
||||||
if (val)
|
if (val)
|
||||||
*val = ov.bool_value();
|
*val = ov.bool_value();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue