Go, Guile, Racket, Scilab: Add throws typemaps for std::string so that
thrown string exception messages can be seen.
Test all language for std::string throws typemaps
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
Support running testcases conditional on the compiler supporting
a each language version, like we already handle C++11.
Currently no testcases are actually run in this way for these
newer language versions.
* more_argcargv:
Document argc argv library
argcargv.i cosmetic updates
Typemaps for (int ARGC, char **ARGV) fixup
Fix argcargv.i in Perl5, Tcl, PHP Add missing type map for type check. Add testing of argcargv.i for Perl5, Tcl, PHP and Ruby.
Add Lua test for argcargv.i
Add argcargv.i to more languages: Perl 5, Tcl, PHP
Add argcargv.i to Lua
Move HAVE_CXX11 into makefiles so that running test-suite
from top level directory or in the language's test-suite directory
is consistent. For example, running 'make check-java-test-suite'
behaves the same as 'cd Examples/test-suite/java && make check'.
This is done in preparation for adding namespace support to the Ruby
part of SWIG. Some existing test cases were reorganized or duplicated
for flat/nonflat nesting. For some a Ruby test script was added.
Finally the ruby/Makefile.in was improved so that for test cases
without an explicit test script, the generated wrapper library will
be loaded by the Ruby interpreter to ensure loading works fine.
This testcase was only run in Ruby and Python and implements an
obscure feature where a C++ class inherits from a std::wstring.
The li_std_wstring test is left in place to be modified in next commit
for more regular wstring testing across all languages.
Found via `codespell -q 3 -L "uint,bae,objext,cmo,goin,struc,ois,upto"`
whitespaces were unintentionally fixed due to my editors settings.
Rebased patch #1327
Using the %alias directive on native C functions causes swig to segfault due to
a dereference of klass (which is NULL for native C functions) in the
defineAliases function of the Ruby module. This commit adds support for an alias
of native C functions for both separate module as well as global functions, as
well as three test cases for the %alias directive of the Ruby module.
Fixes:
mod.i
%module ruby_alias
%alias get_my_name "nickname,fullname";
%inline %{
const char *get_my_name(){
return "Chester Tester";
}
%}
$ swig -ruby mod.i
Segmentation fault
Signed-off-by: Joel Anderson <joelanderson333@gmail.com>
Modify the Python and Ruby director shared_ptr typemaps to be language neutral.
Port the director modifications to other scripting languages that
have shared_ptr support - Octave, R and Scilab. Scilab shared_ptr
support is not fully working and needs work though.
* tamuratak-fix_ruby_wstring:
[ruby] use %fragment to clarify the dependency of code.
[ruby] should initialize static variables inside %init{}, in which it will not be excuted concurrently by multiple threads.
[ruby] * use static variable to avoid creating stirngs every time. * fix possible overflow.
[ruby] add std::wstring tests for string including a null terminator.
[ruby] * rewrite SWIG_AsWCharPtrAndSize and SWIG_FromWCharPtrAndSize * use UTF-32LE and UTF-16LE to avoid BOM * add tests
[ruby] use WCHAR_MAX to determine the encoding of std::wstring.
[ruby] add a few tests for std::wstring
[ruby] fix support for std::wstring.
* tamuratak-fix_ruby_null_shared_ptr:
[ruby] add a test.
[ruby] use std::vector::back() method.
[ruby] enable a test for null shared_ptr in containers.
[ruby] add a test for null shared_ptr in containers.
[ruby] treat null shared_ptr in std containers properly.
Conflicts:
Examples/test-suite/ruby/Makefile.in