mirror of
https://github.com/novatiq/packages.git
synced 2026-04-30 07:28:39 +01:00
libmraa: support node.js v12
Maintainer: @blogic me Compile tested: head r14241-ba2ddba, x86_64 Run tested: x86_64 (VirtualBox) Description: Addressed the build failure with node.js version 12. Re-enable swig. https://github.com/openwrt/packages/issues/11977 https://github.com/openwrt/packages/pull/12225 Signed-off-by: Hirokazu MORIKAWA <morikw2@gmail.com>
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
--- a/api/mraa/gpio.hpp
|
||||
+++ b/api/mraa/gpio.hpp
|
||||
@@ -175,7 +175,11 @@
|
||||
v8::Local<v8::Value> argv[] = { SWIGV8_INTEGER_NEW(-1) };
|
||||
#if NODE_MODULE_VERSION >= 0x000D
|
||||
v8::Local<v8::Function> f = v8::Local<v8::Function>::New(v8::Isolate::GetCurrent(), This->m_v8isr);
|
||||
+#if NODE_MODULE_VERSION >= 72
|
||||
+ f->Call(SWIGV8_CURRENT_CONTEXT(), SWIGV8_CURRENT_CONTEXT()->Global(), argc, argv);
|
||||
+#else
|
||||
f->Call(SWIGV8_CURRENT_CONTEXT()->Global(), argc, argv);
|
||||
+#endif
|
||||
#else
|
||||
This->m_v8isr->Call(SWIGV8_CURRENT_CONTEXT()->Global(), argc, argv);
|
||||
#endif
|
||||
Reference in New Issue
Block a user