| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We aim to produce code that works with C90 or C++98 so we can't
assume snprintf() is available, but it almost always is (even
on systems from before it was standardised) so having a way to
use it is helpful.
Enable this automatically if the compiler claims conformance
with at least C90 or C++98 and check SWIG_HAVE_SNPRINTF to allow
turning on manually, but disable if SWIG_NO_SNPRINTF if defined.
The fallback is to call sprintf() without a buffer size check -
checking after the call is really shutting the stable door after
the horse has bolted, and most of our uses either have a fixed maximum
possible size or dynamically allocate a buffer that's large enough.
Fixes: #2502 (sprintf deprecation warnings on macos)
Fixes: #2548
|
| |\
| |
| |
| |
| |
| |
| |
| |
| | |
* fix-cast:
add tests for new casting behavior
skip tests when value is out of range
refactor integers JS testcase to avoid repeating code
Return uint64_t as double if is bigger than uint32_t
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
|
| | | | |
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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
|
| | | |
| | |
| | |
| | | |
To fix overloading when using these types.
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
For implementing full move semantics when passing parameters by value.
Based on SWIGTYPE && and std::unique_ptr typemaps which implement move
semantics.
Added for all languages, but untested for: Go, Ocaml, R, Scilab (and
unlikely to be fully functional for same reasons as for std::unique_ptr
support).
Issue #999
|
| | | |
| | |
| | |
| | | |
Equivalent to Ruby/Python implementations.
|
| | | |
| | |
| | |
| | |
| | | |
Use separate warning for char * and wchar_t * typemaps
SWIGWARN_TYPEMAP_CHARLEAK_MSG and SWIGWARN_TYPEMAP_WCHARLEAK_MSG
|
| | | |
| | |
| | |
| | | |
Fixes #682
|
| | | | |
|
| | | |
| | |
| | |
| | |
| | | |
We require at least node v6 which means v8 5.0, so code to handle
older v8 is no longer useful.
|
| |\ \ \
| |_|/
|/| |
| | |
| | | |
* fix_SWIG_V8_VERSION:
[javascript][v8] SWIG_V8_VERSION generation method corrected.
|
| | | |
| | |
| | |
| | |
| | |
| | | |
"SWIG_V8_VERSION" generation method was incorrectly fixed.
Signed-off-by: Hirokazu MORIKAWA <morikw2@gmail.com>
|
| |/ /
| |
| |
| |
| |
| |
| |
| | |
Javascript - v8 and node only.
When wrapping C code char arrays.
Now calloc is now used instead of new char[] in SWIG_AsCharPtrAndSize.
Fixes gcc-11 warning -Wmismatched-new-delete in arrays and
memberin_extend testcases.
|
| |\ \
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* 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.
|
| | | |
| | |
| | |
| | |
| | | |
If type is checked with Is*, it's safe to use corresponding ::Cast,
which is more optimal.
|
| | | |
| | |
| | |
| | |
| | | |
Harmonize javascriptcode.swg javascripthelpers.swg and clarify
documentation.
|
| | | | |
|
| | | |
| | |
| | |
| | |
| | | |
Fix types_directive testcase to ensure the %types code is actually
called and not just cast from one type to the other.
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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
|
| |/ /
| |
| |
| | |
Use SWIG_TypeCast in SWIG_V8_ConvertInstancePtr if types don't match
|
| |\ \
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* 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
|
| | | | |
|
| | | | |
|
| | | | |
|
| | |\ \
| | |/ |
|
| | | |
| | |
| | |
| | | |
https://github.com/swig/swig/issues/865
|
| |\ \ \
| |_|/
|/| | |
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.
|
| | | |
| | |
| | |
| | | |
|| (SWIG_V8_VERSION < 0x0704) is better handled in SWIGV8_MAYBE_CHECK.
|
| |\ \ \
| |/ /
|/| |
| | |
| | |
| | |
| | |
| | | |
* 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
|
| | | | |
|
| | | | |
|
| | | |
| | |
| | |
| | | |
modules - with fix for passing NULL to non-pointer argument
|
| | | | |
|
| | | | |
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
| |\ \ \
| | | |
| | | |
| | | |
| | | | |
* js-fix-626:
Added check to prevent crash on illegal constructor call
|
| | | |/
| |/|
| | |
| | | |
Constructors not called as part of object instantiation (using "new" or via inheritance) will not crash the VM anymore.
|
| | | | |
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | | |
Create array to append to if the existing return type is not void.
Closes #405
Closes #1121
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | |
| | |
| | |
| | |
| | | |
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.
|
| | | | |
|
| | | | |
|