diff options
author | William S Fulton <wsf@fultondesigns.co.uk> | 2021-02-24 22:14:47 +0000 |
---|---|---|
committer | William S Fulton <wsf@fultondesigns.co.uk> | 2021-02-24 22:14:47 +0000 |
commit | 7b37c8cd022d027c887482f028d00d3503bf5b39 (patch) | |
tree | 5987caafb11130a91704060e0a6483f571f68637 /Lib/javascript/v8/javascriptruntime.swg | |
parent | c3c4ec1e88c3838d4cd3ffc127bfce569e6ae383 (diff) | |
parent | 1edc58d8fe14b9c0128b815625fd8b123afa2a7e (diff) | |
download | swig-7b37c8cd022d027c887482f028d00d3503bf5b39.tar.gz |
Merge branch 'pr/new-node-fixes'
* pr/new-node-fixes:
Travis testing: Node 12 support not fully working yet
Revert "Merge pull request #3 from tungntpham/new-node-fixes-refactor"
OPTIM: Restructured the code where it checks for V8 version, removing duplicate code and potentially improving the readability.
Nodejs: run tests against Node.js v12
Add support for Node.js v12
Replace Handle with Local depending on Node.js version
Introduce macros to support both Handle and Local types
Diffstat (limited to 'Lib/javascript/v8/javascriptruntime.swg')
-rw-r--r-- | Lib/javascript/v8/javascriptruntime.swg | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/javascript/v8/javascriptruntime.swg b/Lib/javascript/v8/javascriptruntime.swg index c78e04efb..773014f2a 100644 --- a/Lib/javascript/v8/javascriptruntime.swg +++ b/Lib/javascript/v8/javascriptruntime.swg @@ -56,6 +56,11 @@ %insert(runtime) %{ #include <v8.h> +#if defined(V8_MAJOR_VERSION) && defined(V8_MINOR_VERSION) +#undef SWIG_V8_VERSION +#define SWIG_V8_VERSION (V8_MAJOR_VERSION * 256 + V8_MINOR_VERSION) +#endif + #include <errno.h> #include <limits.h> #include <stdlib.h> |