Commit graph

206 commits

Author SHA1 Message Date
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
bcc0b6b616 Use SWIGV8_INTEGER_NEW_UNS always for unsigned long long 2021-02-26 23:24:49 +00:00
Sergio Garcia Murillo
355ef40bc1 Use SWIGV8_INTEGER_NEW_UNS always for unsigned values 2021-02-26 23:23:36 +00:00
William S Fulton
e6315eedd0 Fix -Wunused-result warnings in node wrappers 2021-02-26 22:38:28 +00:00
William S Fulton
0533fc26ca Fix -Wunused-result warnings in node wrappers 2021-02-26 22:23:57 +00:00
William S Fulton
776917e43e Javascript: Stop using deprecated Array::Get method 2021-02-26 21:52:05 +00:00
William S Fulton
7b37c8cd02 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
2021-02-24 22:14:47 +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
William S Fulton
4b5baf0a60 0.0 float warning fix 2020-10-10 15:02:26 +01:00
William S Fulton
9a2513bf85 Javascript v8 C complex wrappers fix 2020-10-10 14:53:46 +01:00
Leo Singer
511df0e642 More C99 complex fixes, plus Python tests 2020-06-24 20:21:47 -04:00
Leo Singer
07b4b274e5 Restore _Complex as standalone type 2020-06-24 20:21:47 -04:00
Leo Singer
1adc7dac5d Small corrections for handling C99 _Complex 2020-06-24 20:21:47 -04:00
Leo Singer
13260f95b0 Properly handle C99 complex types even in C++ mode
Use the `_Complex` keyword rather than the `complex` macro.

Fixes #1487.
2020-06-24 20:21:47 -04: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
52063a732b Consistent parameter names for std::pair 2019-02-14 22:44:27 +00:00
William S Fulton
6d27ead9c0 Add STL container copy constructors where missing
Also provide consistent copy constructor declarations.
2019-02-14 18:53:05 +00:00
William S Fulton
e26f6bb4e2 Add missing typedefs to std::vector + typedef corrections
Tests for std::vector of pointers added which check
 std::vector<T*>::const_reference and std::vector<T*>::reference
usage which gave compilation errors in Python and Perl which had
specialized these vectors incorrectly.
2019-02-13 22:46:28 +00:00
William S Fulton
a47c2553f5 Add missing typedefs to std::pair 2019-02-13 22:46:28 +00:00
William S Fulton
9dd33e6367 Add missing typedefs to std::map 2019-02-13 22:46:27 +00:00
William S Fulton
6d0c495fd0 Add missing parameter names in STL container wrappers
Mostly in STL copy constructors.

Best to have parameter names as they make their way into the wrappers in
some target languages.
2019-02-13 22:45:47 +00: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
967776189e Add support for non-default compare template argument in std::map wrappers - Javascript 2018-10-09 22:42:49 +01: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
William S Fulton
1f7689fa8f Javascript assert.h - move to header section
Fixes compile problem due to throw macro skullduggery in the director_throws testcase
2018-05-06 23:10:33 +01:00
Jacob Gillespie
6c78195d75
Merge branch 'master' into js-v8-52-tests 2018-05-01 21:26:59 -05:00
William S Fulton
7fbdd21b49 Javascript - Fix compilation error wrapping std::complex via std_complex.i
Closes #1187
2018-02-11 11:12:24 +00:00
William S Fulton
e01cfd70c7 Add missing declaration for std::complex
Fixes missing type information for std::complex in scripting languages.
Closes #732.

Update Javascript and Octave complextest, although they don't actually
get run as they don't work
2017-10-02 19:07:24 +01: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
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
Alec Cooper
4e2fc7d115 Don't use long long if it isn't available
Adds preprocessor checks to avoid defining functions that use long long if it isn't available
Effects the following languages: javascript, octave, perl, python, r, ruby, tcl
2016-01-06 16:52:37 -05:00
Olly Betts
d0dd63e437 "concret" -> "concrete" 2015-10-12 11:24:07 +13:00
William S Fulton
4e23595704 Unused method warning suppression for Javascript v8 2015-07-05 17:59:41 +01:00
William S Fulton
59ff3e6a3a C90 fixes for Javascript JSC 2015-02-11 23:32:45 +00:00
Oliver Buchtala
53d7fc8a16 Merge branch 'Richie765-master'
Conflicts:
	CHANGES.current
2014-09-30 18:46:25 +02: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
b8d7cc21b9 Use macros for V8 items 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