William S Fulton
d32943b2a9
Javascript v8 object to string exceptions improvement
2022-09-19 09:09:29 +01:00
William S Fulton
00190c484f
Javascript, Octave, R - Improve exceptions for %catches
...
and exception specifications for native types.
Now the raised exception contains the string value as the exception
message instead of just the C/C++ type of the exception.
R exceptions were completely swallowed beforehand
2022-09-19 09:09:29 +01:00
William S Fulton
fe17296eb4
Add Javascript support for std::unique_ptr and std::auto_ptr
...
Equivalent to Ruby/Python implementations.
2022-08-04 07:14:30 +01:00
Olly Betts
8dbcd710ff
[Javascript] Fix handling of functions which take void*
...
Fixes #682
2022-03-07 14:17:52 +13:00
Olly Betts
7c97bd5ab3
[js] Remove code to handle v8 < 5.0
...
We require at least node v6 which means v8 5.0, so code to handle
older v8 is no longer useful.
2021-12-02 14:04:25 +13:00
William S Fulton
3f391478c4
Merge branch 'v8-context-aware-race-free-preparation'
...
* v8-context-aware-race-free-preparation:
Lib/javascript/v8: use ::Cast instead of To* when possible.
Lib/javascript/v8/javascriptrun.swg: clean up pre-processor conditions.
Lib/javascript/jsc/javascriptinit.swg: shortcut JSGlobalContextRef casts.
Examples/test-suite/grouping.i: resolve compiler warning.
2021-03-11 22:48:38 +00:00
William S Fulton
04b46cc8a3
Javascript type conversion support
...
Add testcase for previous commit.
Add missing assert for future type conversions support that will use
the heap instead of pointer casts (for smart pointer type conversions).
Closes #1963
2021-03-11 20:10:13 +00:00
Andy Polyakov
2870e750f0
Lib/javascript/v8: use ::Cast instead of To* when possible.
...
If type is checked with Is*, it's safe to use corresponding ::Cast,
which is more optimal.
2021-03-10 14:51:08 +01:00
Andy Polyakov
b56814ce08
Lib/javascript/v8/javascriptrun.swg: clean up pre-processor conditions.
...
Harmonize javascriptcode.swg javascripthelpers.swg and clarify
documentation.
2021-03-10 14:51:08 +01:00
Sergio Garcia Murillo
fee5e239ec
Use SWIG_TypeCast in SWIG_V8_ConvertInstancePtr if types don't match ( #3 )
...
Use SWIG_TypeCast in SWIG_V8_ConvertInstancePtr if types don't match
2021-03-10 08:34:45 +00:00
William S Fulton
513ea736d3
Merge branch 'array_fix'
...
* array_fix:
add javascript_arays.i fix to changes file
Convert javascript_arrays.i example into testcase
Update .gitignore for java doxygen output
Javascript code formatting corrections
Fix Javascript arrays for modern node versions
Fix for new SWIGV8_ARRAY_NEW definition
Proper array typemaps in Javascript
2021-03-06 11:08:58 +00:00
William S Fulton
1a4dc82931
Merge branch 'master' into array_fix
2021-03-03 21:54:30 +00:00
Andy Polyakov
0215eaa344
Lib/javascript/v8/javascriptrun.swg: minor versioning cleanup.
...
|| (SWIG_V8_VERSION < 0x0704) is better handled in SWIGV8_MAYBE_CHECK.
2021-03-02 15:21:02 +01:00
William S Fulton
e74876f1b8
Add table of v8/node versions
2021-03-01 22:08:12 +00:00
William S Fulton
7005b156cc
Modify SWIGV8_AppendOutput to work with newer versions of node
2021-02-28 20:59:46 +00:00
Olegs Jeremejevs
f7756be391
Fix SWIGV8_AppendOutput for OUTPUT typemaps
...
Create array to append to if the existing return type is not void.
Closes #405
Closes #1121
2021-02-28 20:46:38 +00:00
William S Fulton
11deb82354
Restore complex number support for ancient v8 versions
2021-02-27 22:18:47 +00:00
William S Fulton
0e36b5d6fd
Fixes for node v12.0-12.5
2021-02-27 22:18:27 +00:00
William S Fulton
7cb719ee67
-Wunused-result fixes for Node < 12
...
Fix 0533fc26c which adds in calls to Check(), which was added in Node 12.
Also fix e6315eedd which calls the new Set() and Check() method.
2021-02-27 22:17:59 +00:00
William S Fulton
0533fc26ca
Fix -Wunused-result warnings in node wrappers
2021-02-26 22:23:57 +00:00
tungpham25
36960396ba
Revert "Merge pull request #3 from tungntpham/new-node-fixes-refactor"
...
This reverts commit 35f05bd541 , reversing
changes made to 0ea6a3bdbf .
2021-01-28 21:48:45 +00:00
TungPham51D
4ce34742a7
OPTIM: Restructured the code where it checks for V8 version, removing duplicate code and potentially improving the readability.
2021-01-14 13:48:19 +00:00
Yegor Yefremov
113d78a083
Add support for Node.js v12
2020-04-07 15:23:31 +02:00
Yegor Yefremov
26fc996ad6
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.
2020-04-07 14:13:12 +02:00
Tom Leavy
554aeead56
Introduce macros to support both Handle and Local types
...
The old Node.js versions don't treat v8::Handle and v8::Local as
the same types, and the latest versions (v12 and newer) have
removed v8::Handle at all.
This patch introduces the following macros that use v8::Handle or
v8::Local depending on the selected Node.js version:
- SWIGV8_ARRAY
- SWIGV8_FUNCTION_TEMPLATE
- SWIGV8_OBJECT
- SWIGV8_OBJECT_TEMPLATE
- SWIGV8_VALUE
2020-04-07 07:54:12 +02:00
mochizk
1e981dfc23
Fix node.js deprecated warnings >= v10.12.0
2019-03-13 23:09:57 +09:00
William S Fulton
ec8d978995
Overloading for non-pointers and NULL - Javascript
...
Overloading support for Javascript is generally incomplete as there are
no typecheck typemaps, so the overloading and NULL support added here
doesn't work and won't work until the typecheck typemaps are
implemented.
2018-12-30 10:11:35 +00:00
William S Fulton
4f7106cda2
Merge branch 'js-v8-52-tests'
...
* js-v8-52-tests:
fixed nvm
node tests: use provided version if present
travis tests for different node versions
fix travis tests
Test NodeJS 4, 6, 8, and 10
Remove warnings on Node 6.x aka V8 5.0 and 5.1
Add Node 7.x aka V8 5.2+ support
2018-08-02 07:10:55 +01:00
luz.paz
60dfa31a67
Misc. typos
...
found via `codespell` and `grep`
2018-05-17 10:04:23 -04:00
Patrick Schneider
9ce8d7e7c9
Remove warnings on Node 6.x aka V8 5.0 and 5.1
...
The proposed changes targetted at 5.2 (or 5.4 to be more precise, since there is no Node release with V8 5.2 or 5.3) work for lower versions as well and bust the deprecation warnings there.
2017-04-13 19:39:44 +02:00
Patrick Schneider
f08d7a63a9
Add Node 7.x aka V8 5.2+ support
...
* Use WeakCallbackInfo instead of WeakCallbackData
* Use GetPrivate instead of GetHiddenValue
* Adopted new signature for SetWeak to support destructor calling
* SetAccessor deprecation fixed
* Proper version checks where applicable
2017-04-13 15:02:53 +02:00
Nickolay Shmyrev
cf7811b178
Proper array typemaps in Javascript
...
https://github.com/swig/swig/issues/865
2017-01-14 21:10:48 +01:00
Olly Betts
b138f054e5
[Javascript] Fix SWIG_exception() macro ( #792 )
...
Fix SWIG_exception() macro to return from the current function.
Fixes #789 , reported by Julien Dutriaux.
2016-09-17 17:29:42 +12:00
Olly Betts
b3bedc210c
[Javascript] For v8 >= 4.3.0, use V8_MAJOR_VERSION.
...
Fixes https://github.com/swig/swig/issues/561 .
2016-01-12 09:33:13 +13:00
William S Fulton
4e23595704
Unused method warning suppression for Javascript v8
2015-07-05 17:59:41 +01:00
Richard
00457b6599
Making generated code more readable
2014-09-30 12:33:49 -03:00
Richard
0dfc1b090f
Fix duplicate symbol linker errors for Javascript/v8
2014-09-09 10:08:30 -03:00
Richard
911fd761b0
Minor improvements
2014-08-28 19:46:52 -05:00
Richard
408390d146
Fixes for v8 3.18.3 (0x031803)
2014-08-28 19:46:51 -05:00
Richard
6fee208010
Fixes for v8 3.19.2 (0x031902)
2014-08-28 19:46:51 -05:00
Richard
eeb4b5497e
Fixes for v8 3.24.17 (0x032417)
2014-08-28 19:46:51 -05:00
Richard
ee88602fde
Use full name
2014-08-28 19:46:51 -05:00
Richard
dea3144726
Fixes for V8 3.22.24 (0x032224) Some errors left (??)
2014-08-28 19:46:51 -05:00
Richard
fee5748499
Fixes for 3.23.18 (0x032318)
2014-08-28 19:46:51 -05:00
Richard
d4920591d4
Fixes for v8 3.24.3 (0x032403)
2014-08-28 19:46:51 -05:00
Richard
c1222ebeec
Partial fixes for 3.24.40 (0x032440) - incomplete
2014-08-28 19:46:50 -05:00
Richard
3c9e16ef85
Fixed some bugs from previous commit
2014-08-28 19:46:50 -05:00
Richard
e0c0670540
Partially fixed for 3.25.30 (0x032530) - unfinished
2014-08-28 19:46:50 -05:00
Richard
e98a659246
Fixes for v8 3.21.17 (0x032117)
2014-08-28 19:46:50 -05:00
Richard
3d63f9113b
Fixes for v8 3.19.18 (0x031918)
2014-08-28 19:46:50 -05:00