Commit graph

421 commits

Author SHA1 Message Date
William S Fulton
3915e7bd08 Remove final remnants of GCJ - jstring.i 2018-06-15 06:57:53 +01:00
luz.paz
6f69830321 follow-up typos 2018-05-17 10:26:00 -04:00
luz.paz
60dfa31a67 Misc. typos
found via `codespell` and `grep`
2018-05-17 10:04:23 -04:00
William S Fulton
c44adff7b9
Merge pull request #1177 from Sigill/sigabrt_rubyunlinkobject_fix
Do not abort when unlinking non-data ruby objects
2018-01-07 12:23:47 +00:00
William S Fulton
cd9b7c3c34 std_basic_string.i fixes
- Remove python code from octave's std_basic_string.i
- Correctly return an error to fix error handling when using std::basic_string in
  overloaded methods - issue #1171.
2018-01-04 07:00:26 +00:00
Cyrille Faucheux
a4884e45e1 Do not abort when unlinking non-data ruby objects
Fixes issue #1168.
Remove a call to abort() (introduced by commit
0e725b5d9b) made when SWIG_RubyUnlinkObjects()
is called on non T_DATA objects. It can happen when the destruction of T_DATA
objects is deferred: the Ruby GC first turn them to T_ZOMBIE, then calls their
free method (SWIG_RubyUnlinkObjects()).
2017-12-27 14:40:26 +01:00
William S Fulton
3f8b8fe734 Enhancements for directorin typemaps
The directorin typemaps will now generate a temporary variable
(specified after the type), such as:
%typemap(directorin) MyType (MyType *temp) { ... use temp ... }

The shared_ptr director typemaps have been fixed for use in functions
that take more than one parameter.
2017-10-16 19:28:27 +01:00
William S Fulton
6470fe8c36 Director shared_ptr typemaps for scripting languages
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.
2017-10-13 07:34:38 +01:00
William S Fulton
d0615d98a9 Merge branch 'radarsat1-fix-null-shared_ptr-directors'
* radarsat1-fix-null-shared_ptr-directors:
  Remove duplicate director shared_ptr pointer reference typemaps
  For shared_ptr directorin, make copy of shared_ptr in all cases.
  Add directorin typemap for Python and Ruby shared_ptr.
2017-10-11 09:03:01 +01:00
William S Fulton
000e63e0f8 Remove duplicate director shared_ptr pointer reference typemaps 2017-10-11 07:08:46 +01:00
William S Fulton
e7f0c6d6ad Suppress Ruby std::wstring, std::string, std::basic_string warnings
Lib/std/std_basic_string.i:235: Warning 365: operator+= ignored
Lib/std/std_wstring.i:8: Warning 378: operator!= ignored

Correct 801 warning suppressions (which are normally suppressed in the test-suite):
Lib/std/std_wstring.i:13: Warning 801: Wrong class name (corrected to `Wstring')

Similarly for std::string when including basic_string.i class.
2017-10-10 07:52:10 +01:00
Olly Betts
5a9422d980 Remove GCJ support
GCC7 dropped GCJ.

Closes https://sourceforge.net/p/swig/bugs/823/
2017-10-09 08:32:01 +13: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
Stephen Sinclair
52ca39b5ab For shared_ptr directorin, make copy of shared_ptr in all cases. 2017-09-27 18:10:59 -03:00
Stephen Sinclair
bda750ee15 Add directorin typemap for Python and Ruby shared_ptr. 2017-09-27 11:22:30 -03:00
William S Fulton
eca67ee880 Ruby and Scilab shared_ptr typemap fragment correction
Remove some left over cruft from the python port
2017-09-25 08:45:31 +01:00
William S Fulton
ed4b84f4d3 Fix overloading of shared_ptr method overloading
Add 'equivalent' attribute to typecheck typemap.
Closes #1098.
2017-09-23 15:19:34 +01:00
Olly Betts
90f9117e10 Fix various comment and documentation typos 2017-08-13 18:04:33 +12:00
Mike Romberg
a67eff0ae9 remove bool from shared_ptr as well. 2017-07-03 20:55:40 -06:00
Mike Romberg
dd26e8a014 as() now always throws and never creates an invalid object with memset() 2017-07-03 15:35:24 -06:00
William S Fulton
e9e9531dc3 Merge branch 'tamuratak-fix_ruby_wstring'
* 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.
2017-06-20 20:13:01 +01:00
William S Fulton
82969b0755 Fix warning in generated code - traits_asptr.
Visual Studio 2015 debug builds:
error C4703: potentially uninitialized local pointer variable 'p' used
2017-06-13 19:02:59 +01:00
William S Fulton
32855cfb69 Merge branch 'tamuratak-fix_ruby_unordered_set'
* tamuratak-fix_ruby_unordered_set:
  [ruby] add simple tests for std unordered containers.
  [ruby] clarify dependency of fragments for unordered_set containers.

 Conflicts:
	Examples/test-suite/ruby/Makefile.in
2017-04-24 20:44:12 +01:00
William S Fulton
ee44f9ba67 Merge branch 'tamuratak-fix_ruby_null_shared_ptr'
* 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
2017-04-24 19:50:59 +01:00
Takashi Tamura
43c3ca3767 [ruby] clarify dependency of fragments for unordered_set containers. 2017-04-22 16:35:25 +09:00
William S Fulton
71e5ff406f Merge branch 'tamuratak-fix_ruby_director_and_shared_ptr'
* tamuratak-fix_ruby_director_and_shared_ptr:
  Rename shared_ptr testcase
  [ruby] use boost/shared_ptr and boost_shared_ptr.i. not use auto.
  [ruby] delete unnecessary changes.
  [ruby] add %typemap(directorin) for shared_ptr.
  [ruby] enable a test, cpp11_shared_ptr_director.
  [ruby] add %typemap(directorin) and %typemap(directorout) for shared_ptr.
  [ruby] add %typemap(directorout) for shared_ptr.
  add a test for shared_ptr with director

Conflicts:
	CHANGES.current
2017-04-21 19:31:25 +01:00
Takashi Tamura
6672338cc0 [ruby] delete unnecessary changes. 2017-04-21 22:44:38 +09:00
William S Fulton
b4377488f7 Add assert for invalid NULL type parameter when calling SWIG_Ruby_NewPointerObj.
Closes #935
2017-04-20 18:51:45 +01:00
Takashi Tamura
0020fc97b0 [ruby] add %typemap(directorin) for shared_ptr. 2017-04-20 19:20:55 +09:00
Takashi Tamura
17b4e0c66e [ruby] add %typemap(directorin) and %typemap(directorout) for shared_ptr. 2017-04-20 19:20:11 +09:00
Takashi Tamura
b3c2b1c51c [ruby] add %typemap(directorout) for shared_ptr. 2017-04-20 19:20:11 +09:00
Takashi Tamura
661c3fc554 [ruby] treat null shared_ptr in std containers properly. 2017-04-20 18:53:47 +09:00
William S Fulton
c9d094e034 Merge branch 'tamuratak-shared_ptr_derived_2'
* tamuratak-shared_ptr_derived_2:
  Correct comment about const removal for shared_ptr
  Correct ordering of declarations in testcase
  Ruby shared_ptr on error code improvement in traits_as::as
  Add support for pointers to shared_ptr and null shared_ptr in Ruby containers
  Add shared_ptr non-overloaded upcast tests
  use forward declaration to treat the dependency of fragments
  [ruby] must not do a null check for VALUE.
  [ruby] add tests for shared_ptr of const Type.
  [ruby] For swig::from, use template specialization to convert shared_ptr<const T> to shared_ptr<T>.
  [ruby] edit comments [skip ci]
  [ruby] move template specialization to std_shared_ptr.i.
  [ruby] add tests for upcasting std::shared_ptr within std containers.
  [ruby] use template specialization for swig::asptr,asval functions on std:shared_ptr.
2017-04-20 07:50:20 +01:00
William S Fulton
660147043d Correct comment about const removal for shared_ptr 2017-04-20 07:49:03 +01:00
William S Fulton
1a6f8d1e4b Ruby shared_ptr on error code improvement in traits_as::as 2017-04-13 07:04:07 +01:00
William S Fulton
83a389d3fb Add support for pointers to shared_ptr and null shared_ptr in Ruby containers
Upcasting of pointers to shared_ptr would need some more fundamental
changes, but not done yet ... pointers to shared_ptr are not common.
2017-04-13 06:59:56 +01:00
Takashi Tamura
b32854bc59 use forward declaration to treat the dependency of fragments 2017-03-29 19:11:44 +09:00
Takashi Tamura
377d439964 Merge remote-tracking branch 'origin/shared_ptr_const_conv' into shared_ptr_derived_2 2017-03-29 18:16:01 +09:00
William S Fulton
382b3f0f8c Merge branch 'tamuratak-fix_typo_ruby_unordered_map'
* tamuratak-fix_typo_ruby_unordered_map:
  [ruby] add a test to make sure that std::multiset is including Enumerable.
  [ruyb] enable std::list test for Ruby.
  [ruby] make std::list include Enumerable.
  [ruby] make std::multiset and std::unordered_multiset include Enumerable. tests added.
  [ruby] make std::unordered_map include Enumerable.
2017-03-29 08:56:25 +01:00
Takashi Tamura
cb1f89cb68 [ruby] must not do a null check for VALUE. 2017-03-07 11:43:01 +09:00
Takashi Tamura
d0af6fd97d [ruby] must not do null check for VALUE obj, which can be 0x0 == Qfalse, a valid Ruby object. 2017-03-06 15:13:05 +09:00
Takashi Tamura
f96c2ad73d [ruby] For swig::from, use template specialization to convert shared_ptr<const T> to shared_ptr<T>. 2017-03-03 12:50:23 +09:00
Takashi Tamura
806f49bf58 [ruby] edit comments [skip ci] 2017-03-02 11:55:09 +09:00
Takashi Tamura
a784ace983 [ruby] move template specialization to std_shared_ptr.i. 2017-03-02 09:47:46 +09:00
Takashi Tamura
50e495c453 [ruby] use template specialization for swig::asptr,asval functions on std:shared_ptr. 2017-03-01 20:17:50 +09:00
Takashi Tamura
c88b9e8777 [ruby] make std::list include Enumerable. 2017-02-25 16:08:21 +09:00
Takashi Tamura
9f43082786 [ruby] make std::multiset and std::unordered_multiset include Enumerable. tests added. 2017-02-24 16:59:17 +09:00
Takashi Tamura
005e129287 [ruby] make std::unordered_map include Enumerable. 2017-02-24 16:59:17 +09:00
Takashi Tamura
4f31f5d0a3 [ruby] use %fragment to clarify the dependency of code. 2017-02-23 21:08:04 +09:00
Takashi Tamura
04a7c4f8b8 [ruby] should initialize static variables inside %init{}, in which it will not be
excuted concurrently by multiple threads.
2017-02-22 12:25:27 +09:00