From 21355d4bb5fcb298513190e8dc5bf5bca55164dd Mon Sep 17 00:00:00 2001 From: Brendan Le Foll Date: Mon, 1 Jun 2015 17:37:33 +0100 Subject: [PATCH] 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 --- src/javascript/mraajs.i | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/javascript/mraajs.i b/src/javascript/mraajs.i index f9c6bdc..1a0c747 100644 --- a/src/javascript/mraajs.i +++ b/src/javascript/mraajs.i @@ -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_;