Replace Handle with Local depending on Node.js version

Use newly introduced macros like SWIGV8_VALUE to use v8::Handle or
v8::Local depending on the selected Node.js version where possible.
This commit is contained in:
Yegor Yefremov 2020-02-26 15:55:18 +01:00
commit 26fc996ad6
10 changed files with 82 additions and 76 deletions

View file

@ -15,7 +15,7 @@ int placeholder() { return 0; }
static SwigV8ReturnValue JavaScript_do_work(const SwigV8Arguments &args) {
SWIGV8_HANDLESCOPE();
const int MY_MAGIC_NUMBER = 5;
v8::Handle<v8::Value> jsresult =
SWIGV8_VALUE jsresult =
SWIG_From_int(static_cast< int >(MY_MAGIC_NUMBER));
if (args.Length() != 0)
SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments.");