Private
Public Access
2
0

mraajs.i: Use 0x032870 as SWIG_V8_VERSION to distinguish node.js 0.12.x

This fixes compilation with node.js 0.12.4

Closes #211

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
This commit is contained in:
Brendan Le Foll
2015-06-01 17:37:33 +01:00
parent 4c50ff4b5b
commit 21355d4bb5

View File

@@ -42,7 +42,7 @@ namespace mraa {
class Spi;
%typemap(out) uint8_t*
{
%#if SWIG_V8_VERSION > 0x032872
%#if SWIG_V8_VERSION > 0x032870
$result = node::Buffer::New((char*) $1, arg3);
%#else
$result = node::Buffer::New((char*) $1, arg3)->handle_;
@@ -75,7 +75,7 @@ class Spi;
SWIG_exception_fail(SWIG_ERROR, "I2c write failed");
SWIGV8_RETURN(SWIGV8_UNDEFINED());
}
%#if SWIG_V8_VERSION > 0x032872
%#if SWIG_V8_VERSION > 0x032870
$result = node::Buffer::New((char*) $1, result);
%#else
$result = node::Buffer::New((char*) $1, result)->handle_;
@@ -104,7 +104,7 @@ class Spi;
SWIG_exception_fail(SWIG_ERROR, "I2c write failed");
SWIGV8_RETURN(SWIGV8_UNDEFINED());
}
%#if SWIG_V8_VERSION > 0x032872
%#if SWIG_V8_VERSION > 0x032870
$result = node::Buffer::New((char*) $1, result);
%#else
$result = node::Buffer::New((char*) $1, result)->handle_;