Commit graph

2,370 commits

Author SHA1 Message Date
Nishant Rodrigues
5fd059d80f Patch fixing warning 322 in rubycontainer_extended
'rubycontainer_extended.swg' generates warnings:

 Warning 322: Redundant redeclaration of 'map_bang',
 Warning 322: previous declaration of 'map_bang'.

The fix is to remove a redundant call to swig_container_extend for
swig::GC_VALUE.

Thanks

========================================================
2013-04-08 18:58:01 +01:00
William S Fulton
5ae6ff404d Cosmetic - use C comments instead of C++ comments for recent Ruby change 2013-04-08 07:58:09 +01:00
William S Fulton
bb3fe8c906 Rewrite Ruby's GC_VALUE without use of macros for easier debugging 2013-04-06 02:20:56 +01:00
William S Fulton
8484c2de9b More rb_protect rewrite to use rb_rescue for Ruby 1.9 2013-04-06 00:30:50 +01:00
William S Fulton
5d529d5a76 Ruby 1.9 fixes.
SF Bug#1292 - Runtime fixes for Proc changes in ruby-1.9 when using STL wrappers that override the default predicate, such as:

  %template(Map) std::map<swig::LANGUAGE_OBJ, swig::LANGUAGE_OBJ, swig::BinaryPredicate<> >;

Fixes li_std_functors testcases for Ruby 1.9.

Also rb_respond_to return values have changed subtely in 1.9 and return should be treated as a flag instead of checking for Qtrue, see SF Bug #1159.

Also fix li_std_map, li_std_set silently failing - rb_protect behaviour seems to have changed when an exception is thrown, so code has been changed to use rb_rescue. A call to 'rb_set_errinfo(Qnil)' could have solved this after the rb_protect call, but it is only available in 1.9+ and Ruby API changes are not easily and transparently detectable.
2013-04-05 23:41:59 +01:00
William S Fulton
9aaf4ad03c Fixes for Ruby 1.9 std::complex wrappers.
New native Ruby complex numbers are used.
2013-04-02 20:14:51 +01:00
William S Fulton
e13e1cba9e Fix seg fault when using STL containers of generic Ruby types, GC_VALUE or LANGUAGE_OBJECT, on exit of the Ruby interpreter. Observed on 64 bit Linux in the std_li_set testcase. The global hash which is meant to hold GC references was being deleted by the interpreter on exit before the GC_VALUES destructors were being called. 2013-03-31 00:55:34 +00:00
William S Fulton
2e0d1b12dc Fix delete_if (reject!) for the STL container wrappers.
Previously they would sometimes seg fault or not work.
2013-03-29 06:28:15 +00:00
William S Fulton
38b2b95c30 Fix some invalid iterator usage in Python when deleting/inserting slices from/into containers 2013-03-26 21:38:45 +00:00
William S Fulton
7eda619741 Fix invalid iterators used with -ve ranges - Python
Fixes li_std_containers_int testcase.
Valgrind reports no more problems for this testcase.
2013-03-26 21:38:44 +00:00
Olly Betts
23bcc1c66b Remove lingering relic of PHP4 support 2013-03-20 16:45:24 +13:00
Olly Betts
b72aca1d07 Fix typo in comment (swift->swig) 2013-03-20 15:39:03 +13:00
Olly Betts
7c80f007c4 Fix typo in Python docstring for acquire method 2013-03-19 18:38:45 +13:00
William S Fulton
670962cfe8 SWIG_TypeCompare was not working as commented - return values were 0,1 and not 1,0,-1. Although undocumented and not used anywhere within SWIG, it has been replaced with SWIG_TypeCmp to work as commented. 2013-03-04 07:32:40 +00:00
Michel Zou
8155e14579 Macro expansion to self assign is effectively ignored. 2013-02-26 09:26:13 +01:00
Michel Zou
c23b7606cf MOdified only no-cast-rank version of SWIG_AddCast. 2013-02-25 11:07:42 +01:00
Michel Zou
7acf6b5fef Revert "Fixed #1300 clang warning in SWIG_Python_ConvertPtrAndOwn."
This reverts commit 8e340c158c.
2013-02-25 09:53:45 +01:00
Michel Zou
8e340c158c Fixed #1300 clang warning in SWIG_Python_ConvertPtrAndOwn. 2013-02-22 10:11:50 +01:00
tpapp
054f9dba1a CFFI - Fix missing package before &body - patch #22
Should fix https://github.com/swig/swig/issues/21.
2013-02-09 17:23:16 +00:00
William S Fulton
afc2b884a4 Merge branch 'master' of github.com:swig/swig 2013-01-12 16:55:07 +00:00
William S Fulton
bd67f57921 Convert to unix fileformat 2013-01-12 16:54:37 +00:00
William S Fulton
a6d456a15e Replace references to Subversion with Git 2013-01-12 01:24:22 +00:00
Olly Betts
f9566ad2df Fix assorted typos.
From https://sourceforge.net/p/swig/patches/332/ and some others too.
2013-01-08 18:47:40 +13:00
joequant
beb40008b1 add boost_shared_ptr for R 2013-01-07 06:03:37 +08:00
joequant
308b5dab3f r changes to handle external pointers 2013-01-06 19:42:12 +08:00
William S Fulton
0bde711222 Merge branch 'SFbug1295' of https://github.com/ptomulik/swig 2013-01-05 17:59:18 +00:00
Paweł Tomulik
a6f733602e added patch for SF bug #1295 2013-01-04 16:57:04 +01:00
Brant K. Kyser
540ede0dd3 Fix for SourceForge Bug #1283.
* Change the name of the memory own variable for base java director classes to match that expected by the director code
* Add conditional to appropriately dynamically cast director classes wrapped in smart pointers.
2013-01-04 00:31:55 +00:00
Klaus Kämpf
23771ef027 Ruby: Replace all occurences of STR2CSTR macro with calls to StringValuePtr
STR2CSTR was deprecated in Ruby since years and got finally removed
in Ruby 1.9


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13967 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-12-14 15:48:31 +00:00
William S Fulton
16481c999e Bug #3563647 - PyInt_FromSize_t unavailable prior to Python 2.5 for unsigned int types
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13953 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-12-09 20:49:52 +00:00
William S Fulton
5e507b82f1 Apply patch #3571029 which adds missing director support for const unsigned long long &.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13952 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-12-09 20:49:28 +00:00
William S Fulton
7375731431 Perl - Fix C++ comment in C wrappers.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13951 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-12-09 17:47:12 +00:00
Karl Wette
e60ae2d81d octave: Simplified module loading.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13941 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-11-28 20:22:56 +00:00
Vadim Zeitlin
0ca11c8b6f Fix overflow with parameters > LONG_MAX with Python 3.
The typemap incorrectly called PyInt_AsLong() if PyInt_Check() passed, but
this check is the same as PyLong_Check() for Python 3 and so the correct
PyLong_AsUnsignedLong() function was never called. As a consequence, passing
any value greater than LONG_MAX (e.g. 0x87654321 on 32 bit architectures) to a
function taking unsigned int, unsigned long or size_t parameter failed with an
overflow error being generated.

Fix this by simply disabling the part of the code dealing with PyInts for
Python 3 as there is no distinction between PyInt and PyLong there any more.

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13877 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-11-09 17:57:42 +00:00
Ian Lance Taylor
ab7da898ef Define uintgo for the benefit of Go .swig files.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13876 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-10-31 03:41:10 +00:00
Ian Lance Taylor
786d883d45 Fix Go support for enums to work correctly when Go int type is 64 bits.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13875 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-10-30 23:38:57 +00:00
Ian Lance Taylor
a42882dcee Adjust for change in the size of the Go type int. Until some time in
the future, require a -intgosize option when invoking SWIG.  Otherwise
there is no reliable way for us to know the size of int, and we need
to know.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13864 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-10-05 04:58:00 +00:00
Ian Lance Taylor
5e30ec58e8 Adjust typemaps.i for change in handling of reference to slice.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13856 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-10-02 14:53:13 +00:00
William S Fulton
d1bc8b5b21 Add caveat emptor for peek method in Java directors
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13838 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-09-13 19:18:25 +00:00
William S Fulton
863c25f9b8 Possibly incorrect DeleteGlobalRef call on a weak global reference in Java directors - patch from Marvin Greenberg
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13837 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-09-13 19:05:25 +00:00
William S Fulton
b38722e8ee Apply patch for Java to fix direct use of a weak global reference in directors sometimes causing seg faults especially on Android.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13834 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-09-13 19:02:02 +00:00
William S Fulton
593c708a78 Fix (char *STRING, size_t LENGTH) typemaps to accept NULL string
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13736 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-09-07 06:07:20 +00:00
William S Fulton
2c74c90430 Fix for gcc warning -Wunused-value without triggering -Wunused-parameter
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13735 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-09-07 06:06:00 +00:00
William S Fulton
d496352805 Move contributors to COPYRIGHT file.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13734 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-09-07 06:03:20 +00:00
Joseph Wang
33bb317b61 make ExternalReference slot ref to contain reference
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13721 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-08-26 03:35:04 +00:00
William S Fulton
be1c4d2e68 Revert r13601 as it breaks older versions of R
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13713 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-08-20 21:20:19 +00:00
William S Fulton
11323af905 A working fix to silence unused warnings - fixes r13621
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13637 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-08-16 22:35:36 +00:00
William S Fulton
a0d15a7e03 Better fix than r6987 to silence warning
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13621 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-08-15 23:36:28 +00:00
William S Fulton
c20cacad87 Add some missing STL container typedefs for Perl
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13620 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-08-15 23:04:26 +00:00
William S Fulton
049035ff3e Add discard and add methods to std::set and std::multiset wrappers so that pyabc.i can be used ensuring MutableSet is a valid abstract base class
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13619 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-08-15 22:36:15 +00:00