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
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
a6d456a15e
Replace references to Subversion with Git
2013-01-12 01:24:22 +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
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
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
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
William S Fulton
81b755dadc
Better error handling in SWIG_Python_NewShadowInstance and SWIG_Python_NewPointerObj to fix seg fault as mentioned on swig-devel mailing list email thread - 'Fix python3 abc set'
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13618 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-08-15 22:35:24 +00:00
William S Fulton
68862691e6
Fix #3541744 - Missing PyInt_FromSize_t calls for Python 3
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13608 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-08-15 07:48:57 +00:00
William S Fulton
3b8bc08be7
Suppress -Werror=unused-but-set-variable gcc warning in Python wrappers
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13571 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-08-08 22:24:46 +00:00
Stefan Zager
00328ccdb3
python: disambiguate SWIG_From_unsigned_SS_int and SWIG_From_unsigned_SS_long.
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13106 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-05-23 04:05:11 +00:00
William S Fulton
52fe61820a
More for Mac OSX STL fixes
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13020 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-04-28 14:27:55 +00:00
William S Fulton
c13131986e
Warning fix in python STL wrappers
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13019 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-04-28 11:39:13 +00:00
William S Fulton
e39322cd01
Fix STL wrapper compilation errors on Mac OSX 64bit
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13018 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-04-28 11:18:10 +00:00
William S Fulton
a6219a855e
signed unsigned fix
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12997 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-04-16 19:55:33 +00:00
William S Fulton
68a135860d
Revert rev 12835 as it introduces a failure in the test-suite (primitive_types test)
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12983 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-04-14 17:30:03 +00:00
William S Fulton
347f2782d2
Fix missing stddef.h when %import of STL containers. Was causing compile failures witht g++-4.6.
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12939 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-03-20 20:07:56 +00:00
William S Fulton
50693941c6
Fix #3475492 - iterating through std::vector wrappers of enumerations.
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12916 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-03-13 07:10:24 +00:00
William S Fulton
3340045d67
Show as 'unknown type' instead of seg faulting in the unusual event that type information is not set.
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12915 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-03-13 07:07:01 +00:00
William S Fulton
7c58a044d2
Add support for negative steps in Python slices on the STL containers
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12903 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-01-24 23:41:40 +00:00
William S Fulton
1b47ddf8f0
Add support for slicing steps to Python STL wrappers (positive step only atm - these work the same as other Python sequences such as list)
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12898 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-01-20 21:14:03 +00:00
Stefan Zager
bdc9b61dc2
Fix for bug 3447426: memory leak in vector.__getitem__
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12855 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-12-01 20:59:19 +00:00
Olly Betts
83cc1f6a3e
[Python] Fix some warnings when compiling generated wrappers with
...
certain GCC warning options (Debian bug #650246 ).
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12852 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-11-29 05:31:37 +00:00
Stefan Zager
959fdf2053
Bug 3440044
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12842 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-11-23 06:34:02 +00:00
Stefan Zager
2bf6de71b8
bug 3429388: python unsigned integer handling on 32-bit architectures.
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12835 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-11-05 03:35:03 +00:00
William S Fulton
30206f975c
Fix constructors in named typedef class declarations
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12784 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-08-25 19:27:38 +00:00
Stefan Zager
86e1051a8b
Fixed memory leak with --builtin (bug 3385089)
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12782 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-08-22 23:33:17 +00:00
Stefan Zager
498367bc9d
From swig-user 7/6/11: fix closure for tp_call.
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12761 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-07-20 15:20:24 +00:00
Stefan Zager
e167400a29
Fixed issue from swig-user 6/27/11.
...
Support code in std_map.i needs all the template parameters that std::map takes,
even the default ones (Compare, Allocator).
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12759 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-07-15 18:49:32 +00:00
Stefan Zager
3cb76bb45e
Slight tweak to output typemap for int
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12738 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-06-11 05:49:49 +00:00
William S Fulton
3243cbaad4
Numerous autodoc fixes for Python
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12735 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-06-10 19:33:40 +00:00
Stefan Zager
50425dc95e
For all long integer types, use PyLong_From* rather than PyInt_From*
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12732 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-06-03 18:42:38 +00:00
Olly Betts
75a317d746
Fix typo in UEH message
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12720 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-05-27 13:57:42 +00:00
William S Fulton
ef1546a287
cosmetic - cleanup
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12664 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-05-14 00:10:10 +00:00
William S Fulton
34e7c82631
Remove a compiler warning for builtin
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12662 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-05-13 05:58:58 +00:00
William S Fulton
1aa65e2220
PyVarObject_HEAD_INIT to conform to C standard - pointers cannot be used in static initializers
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12661 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-05-12 21:07:57 +00:00
William S Fulton
63f21af8d0
PyVarObject_HEAD_INIT to conform to C standard - pointers cannot be used in static initializers
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12660 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-05-12 20:20:36 +00:00
Stefan Zager
a52612f845
Fixed PyGetSetDescr for python3.2.
...
Fixed memory management in special_variable_macros test.
Don't define asdict() for multimap.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12659 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-05-08 06:54:21 +00:00
Stefan Zager
6bd724dbf9
Added asdict() method to convert std::map to a python dict.
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12646 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-04-29 23:26:55 +00:00
Stefan Zager
e629b192e2
Fixed the argument counts passed to SWIG_Python_UnpackTuple for varargs.
...
Removed obsolete methods from std_map.i and pyiterators.swg.
Added builtin-check target to python test suite Makefile.
Fixed using_namespace_loop.i so that the generated wrappers will compile.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12644 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-04-29 18:25:16 +00:00
Stefan Zager
4b9ef9bc99
Bug 1498929: Access to member fields of map elements.
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12643 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-04-25 21:12:33 +00:00
Stefan Zager
257b75c23c
Fixed PyVarObject_HEAD_INIT calls for VC++.
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12634 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-04-11 22:06:02 +00:00
William S Fulton
fd666c1440
new %import test for vector
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12633 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-04-11 21:28:06 +00:00
William S Fulton
512cf3d12d
Work around anti-aliasing warning/problem with gcc
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12632 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-04-11 19:22:45 +00:00
William S Fulton
caa055b7fb
Remove C++ header breaking C tests
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12626 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-04-10 00:29:36 +00:00
William S Fulton
781b468aa1
Sun Studio warning fixes for Python builtin
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12625 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-04-10 00:23:48 +00:00
William S Fulton
13527a79b7
Fix Sun Studio warnings
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12624 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-04-09 23:52:38 +00:00
William S Fulton
0fea2dd2b5
Revert non-cosmetic change from previous checkin
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12623 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-04-09 23:52:03 +00:00