gpio.hpp: added HandleScope creation for Node 4+
Closes #387. Signed-off-by: Alex Tereschenko <alext.mkrs@gmail.com> Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
This commit is contained in:
committed by
Brendan Le Foll
parent
389d0ceafd
commit
350a6489ee
@@ -136,6 +136,9 @@ class Gpio
|
|||||||
static void
|
static void
|
||||||
v8isr(uv_work_t* req, int status)
|
v8isr(uv_work_t* req, int status)
|
||||||
{
|
{
|
||||||
|
#if NODE_MODULE_VERSION >= 0x000D
|
||||||
|
v8::HandleScope scope(v8::Isolate::GetCurrent());
|
||||||
|
#endif
|
||||||
mraa::Gpio* This = (mraa::Gpio*) req->data;
|
mraa::Gpio* This = (mraa::Gpio*) req->data;
|
||||||
int argc = 1;
|
int argc = 1;
|
||||||
v8::Local<v8::Value> argv[] = { SWIGV8_INTEGER_NEW(-1) };
|
v8::Local<v8::Value> argv[] = { SWIGV8_INTEGER_NEW(-1) };
|
||||||
|
|||||||
Reference in New Issue
Block a user