Commit graph

21,921 commits

Author SHA1 Message Date
Olly Betts
4e0997cd5a Conditionalise math.i for PHP
PHP already provides all the wrapped constants and all the wrapped
functions except fabs() (PHP provides abs() instead).  Rewrapping
the constants causes warnings or errors (depending on PHP version)
and the rewrapped functions seem to be hidden by the built-in
versions, so only wrap fabs() for PHP.

(Even a wrapper for fabs() seems of little use since abs() is already
provided, but really math.i seems of little use more generally since
any general purpose programming language will provide its own maths
functions and constants - the key motivation here is to eliminate
warnings and errors from running the testsuite.)
2021-03-17 09:43:15 +13:00
Olly Betts
6afc3e3504 Update PHP director_basic expected classes+funcs
Fixes warnings from test suite introduced in
c259702314.
2021-03-17 09:35:39 +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
6aef217438 Add Javascript (JSC) support for type conversion
Fix types_directive testcase to ensure the %types code is actually
called and not just cast from one type to the other.
2021-03-11 20:18:58 +00:00
William S Fulton
9739be60d0 Add two Javascript testcases converted from Python 2021-03-11 20:10:18 +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
Andy Polyakov
0c10c0596f Lib/javascript/jsc/javascriptinit.swg: shortcut JSGlobalContextRef casts. 2021-03-10 14:48:18 +01:00
Andy Polyakov
3edccb615d Examples/test-suite/grouping.i: resolve compiler warning. 2021-03-10 14:48:18 +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
dff8c395fe Add node 14 testing on Travis 2021-03-07 11:42:59 +00:00
William S Fulton
d16d6054b5 Appveyor - show cmake version 2021-03-07 11:42:59 +00:00
William S Fulton
bbe9807d86 Travis cmake tweaks
Reduce amount of testing.
Display cmake version used.
2021-03-07 11:42:59 +00:00
Michel Zou
167164885d CI: Warnings as errors 2021-03-07 11:20:39 +00:00
Michel Zou
ee8d47cec4 Fix few unused variable warnings 2021-03-07 11:20:31 +00:00
Michel Zou
c6af0c5a67 CMake: Escape backslashes in SWIG_LIB_WIN_UNIX 2021-03-06 19:52:44 +01: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
d007f35e05 add JSC SetModule/GetModule enhancement to changes file 2021-03-06 11:07:39 +00:00
William S Fulton
0b2d5ffa6e add javascript_arays.i fix to changes file 2021-03-06 11:06:12 +00:00
William S Fulton
227614056b Convert javascript_arrays.i example into testcase 2021-03-06 10:55:47 +00:00
William S Fulton
22c8b33edd Update .gitignore for java doxygen output 2021-03-06 10:54:36 +00:00
William S Fulton
db175f76c1
Merge pull request #1957 from dot-asm/v8-context-aware
Lib/javascript/v8: use context-aware initialization.
2021-03-05 22:28:42 +00:00
William S Fulton
b6aa39b82a Javascript code formatting corrections 2021-03-03 22:22:47 +00:00
William S Fulton
c4d003e442 Fix Javascript arrays for modern node versions 2021-03-03 22:19:29 +00:00
William S Fulton
53bdc3964d Fix for new SWIGV8_ARRAY_NEW definition 2021-03-03 22:19:22 +00:00
William S Fulton
1a4dc82931
Merge branch 'master' into array_fix 2021-03-03 21:54:30 +00:00
William S Fulton
d38c8d512f Merge branch 'vaughamhong-master'
* vaughamhong-master:
  fixed build error - ISO C90 forbids mixed declarations and code for jsc
  touch to kickoff another build - from accidental close pull request
  Implemented SetModule / GetModule for JSC to allow type sharing across modules - with fix for passing NULL to non-pointer argument
  Implemented SetModule / GetModule for JSC to allow type sharing across modules
2021-03-03 21:35:34 +00:00
Andy Polyakov
b0c01ea851 Lib/javascript/v8: use context-aware initialization.
Context-aware initialization allows to instantiate add-ons multiple
times, most importantly in multiple Workers' contexts. Workers made
first appearance in v10.5. Context-aware initialization was option
earlier than that, even before supported minimum v6.x, yet condition
is chosen more conservatively as NODE_MODULE_VERSION >= 64, a.k.a.
v10.0.
2021-03-02 15:31:28 +01: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
Andy Polyakov
f97020fb0c configure.ac: re-prioritize node.js detection.
Having 'node' taking priority over 'nodejs' make is easier to "sand-box"
different node.js version by merely adjusting PATH.
2021-03-02 15:21:02 +01:00
William S Fulton
5c602b0dcf CMake added to changes file 2021-03-02 00:15:04 +00:00
William S Fulton
e0be0f7517 html chapter numbering fix 2021-03-02 00:13:56 +00:00
William S Fulton
27f29aef2c CMake documentation tweaks 2021-03-02 00:12:46 +00:00
William S Fulton
3f63848940 Move CMake chapter 2021-03-01 23:55:28 +00:00
William S Fulton
3231dd3619 Merge branch 'windows-cmake-doc'
* windows-cmake-doc:
  Remove duplicate and update to nuget installs
  Remove duplicate section
  Add link on main Contents page
  Add CMake build steps on Windows
2021-03-01 23:52:25 +00:00
William S Fulton
5329fdf7a1 Merge branch 'cmake-simple'
* cmake-simple:
  CMake test, run -swiglib
  Misc fixes
  Enable cmake build in CI
  Initial CMake configuration.
2021-03-01 23:44:01 +00:00
William S Fulton
4ba9d9a8ec CMake test, run -swiglib 2021-03-01 23:42:52 +00:00
William S Fulton
bff805dae5 Merge branch 'ignore-empty-doxygen-commands'
* ignore-empty-doxygen-commands:
  Fix incorrect warning "Unknown Doxygen command: ."
  Don't use invalid iterators in Doxygen command parsing code

Conflicts:
	CHANGES.current
2021-03-01 23:14:53 +00:00
William S Fulton
69f9509c2b Fix incorrect warning "Unknown Doxygen command: ." 2021-03-01 23:12:21 +00:00
William S Fulton
e74876f1b8 Add table of v8/node versions 2021-03-01 22:08:12 +00:00
Andy Polyakov
1abb726d69 configure.ac: pick up javascriptcoregtk-4.0,3.0 if available.
Ubuntu 20 doesn't have libwebkitgtk-dev/libjavascriptcoregtk-1.0-dev,
but it has 4.0. Ubuntu 18 provides 3.0 as option.
2021-03-01 15:51:12 +01:00
William S Fulton
4b64becbbb OUTPUT typemaps on methods that don't return void
SWIGJSC_ValueIsArray could be implemented by JSValueIsArray in later
versions of Javascript webkit, similar fix to previous commits for v8.

Enhance testing of OUTPUT typemaps to test more than one output.
2021-03-01 14:20:18 +00:00
William S Fulton
5ed74fd19b Add fix for bad constructor call crash to changes file 2021-02-28 22:05:03 +00:00
William S Fulton
1de4a3a8f6 Add Javascript test for missing new in constructor call
Testcase for issue #969 and issue #626
2021-02-28 22:01:32 +00:00
William S Fulton
30216c4fb8 Merge branch 'js-fix-626'
* js-fix-626:
  Added check to prevent crash on illegal constructor call
2021-02-28 22:00:55 +00:00
William S Fulton
00e64d7a49 Document Javascript OUTPUT typemap fix 2021-02-28 21:58:45 +00:00
William S Fulton
769dc27bcd Javascript: Add runtime tests for typemaps.i
Tests fix in previous couple of commits.
2021-02-28 21:01:56 +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