William S Fulton
1cc735df5e
%implicitconv will now accept None where the implicit conversion takes a C/C++ pointer.
...
Problem highlighted by Bo Peng on the swig-user mailing list. SF patch #230 .
2013-08-28 20:28:15 +01:00
William S Fulton
1c44078751
Improve testing of %pythonprepend and %pythonappend
2013-07-02 20:00:17 +01:00
William S Fulton
ace8fcd972
SWIG_AsWCharPtrAndSize improper operation if cptr NULL
...
SF bug #1327
This doesn't have any noticeable effect with the usage of
SWIG_AsWCharPtrAndSize as shipped by SWIG, but could be a problem if a
user is using this function with cptr equal to zero and psize is non-zero
- the length would be incorrectly set due to the call to PyUnicode_GetSize
failing.
2013-07-02 18:58:56 +01:00
Paweł Tomulik
c9295401da
clean all .py files generated by python-test-suite
...
Closes #49
2013-06-04 22:23:53 +01:00
William S Fulton
72f2d8ac8f
Fix Python test-suite makefile to show which tests have runtime tests (for Python 3).
2013-05-27 10:24:02 +01:00
William S Fulton
fd93beadf4
Fix 'make check-python-test-suite PY3=1' and -j (make jobs)
2013-05-25 22:29:18 +01:00
William S Fulton
5481270c2a
Fix Python 3 inconsistency handling -ve numbers for unsigned C types.
...
An OverFlow error is now consistently thrown instead of a TypeError.
Fixes primitive_types testcase for Python 3
2013-05-25 10:36:14 +01:00
Artem Serebriyskiy
3e188e508d
Add test case for attributes with moderately complex templates
...
* New test case tests that %attribute macros correctly supports passing
template with multiple parameters as class name or attribute type name
* Some further changes were made to %attribute macros - now
AttributeType is protected with %arg as well. This allows you
to have attributes of type e.g. std::pair<int,int> etc
Update CHANGES file for %attribute template fixes
Closes #48
2013-05-25 00:44:36 +01:00
William S Fulton
f15eb3f5ec
Fix vararg documentation for Python 3
...
Memory handling is different to Python 2.
2013-05-24 23:02:34 +01:00
William S Fulton
074c0039db
Fix Python version checking in Python tests
2013-05-24 18:57:26 +01:00
William S Fulton
0f1e3da5de
Fix the high passed to PyTuple_GetSlice in varargs wrappers.
...
Harmless bug as slices can take any size larger than the actual size for
the high value. Reported in SF Bug 1326.
2013-05-23 21:25:41 +01:00
William S Fulton
f68cde8bb9
Fix li_std_containers_int test case for Python < 2.6
...
Workaround bugs in older versions of Python
2013-05-03 19:55:42 +01:00
Jesus Lopez
9be3235988
Support $descriptor() macro in fragments
...
Closes #36
2013-04-18 23:04:07 +01:00
William S Fulton
5878ca5f1a
Fix autodoc test for python 2.4
2013-03-29 09:20:17 +00:00
William S Fulton
b504b68a62
Fix erratically failing threads_exception python test
2013-03-26 20:57:41 +00:00
Paweł Tomulik
da00bdb12d
added python test case li_std_except_as_class for SF bug 1295
2013-01-04 15:43:44 +01:00
William S Fulton
ba575159f6
Add runtime test for %implicitconv
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13950 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-12-08 10:37:04 +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
54726b9d09
Fix using declarations and templates. %template was putting the
...
instantiated template into the global namespace instead of the namespace
of the template definition. This fixes regression in swig-2.0.5 copying
the std::pair typemaps which occurs with a 'using std::pair'
declaration. This also fixes lots of other using declarations of
template problems (template forward declarations. combinations
using directives).
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13504 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-08-04 20:24:22 +00:00
William S Fulton
73b0431fbc
Fix C enum forward declarations in some target languages (notably Java)
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13030 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-05-01 18:44:22 +00:00
William S Fulton
117cb9b74a
Fix a few warnings/errors in the test-suite using Solaris compiler
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12993 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-04-15 21:56:38 +00:00
William S Fulton
f00a41093c
As std_list.i is not available in many language, put this python specific test just in Python makefile
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12986 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-04-14 21:11:19 +00:00
William S Fulton
df4f9adf0a
Diagnostics for erratically failing test case
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12984 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-04-14 20:29:22 +00:00
William S Fulton
e8aab00b6d
Remove run tests which should have been done in rev 12953 (reverting %shared_ptr fixes with typedef)
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12982 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-04-14 17:01:39 +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
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
6ee6278bc5
Add runtime testcase for python slicing
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12902 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-01-24 20:38:50 +00:00
William S Fulton
c794d08597
Fix %newobject when used in conjunction with %feature(ref). The code from the ref feature was not always being generated for the function specified by %newobject. Documentation for ref and unref moved from Python to the C++ chapter.
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12783 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-08-23 19:29:10 +00:00
William S Fulton
d0081ebb82
%shared_ptr fixes when the type is a template using template parameters that are typedef'd to another type. Also fixed %shared_ptr when the template parameter has a default value.
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12776 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-08-13 00:36:12 +00:00
William S Fulton
7d038d4bd7
Fix scoping of forward class declarations nested within a class (for C++). Also fix %template and resolution of template parameters that are typedefs.
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12764 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-07-26 19:34:23 +00:00
William S Fulton
ff6b144f30
Fix Python directorin typemap for PyObject *
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12760 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-07-16 14:43:04 +00:00
William S Fulton
6c100423b8
Fix some scope and symbol lookup problems when template default parameters are being used with typedef - add the fully expanded template into the c symbol table and scope table.
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12754 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-07-01 22:59:55 +00:00
William S Fulton
58e74e8675
Rename python_kwargs testcase to kwargs_feature. Add kwargs_feature to Ruby and fix Ruby warnings when using kwargs feature. Add %kwargs macro for Ruby
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12739 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-06-13 17:38:08 +00:00
William S Fulton
665b70e887
Change test to fail rather than print a message
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12737 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-06-10 22:48:32 +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
William S Fulton
a47da97ffe
rename python_autodoc testcase to autodoc for use with all languages (note it was once called autodoc.i in the python subdirectory)
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12728 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-06-03 06:07:46 +00:00
William S Fulton
74aa3f218f
%varargs - better documentation and remove additional argument generation which didn't work properly as a sentinel
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12666 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-05-14 00:13:43 +00:00
William S Fulton
6e87b73c40
reorder tests alphabetically
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12665 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-05-14 00:11:40 +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
William S Fulton
cba65bd524
revert 12657 - incorrect changes made
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12658 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-05-06 21:10:01 +00:00
William S Fulton
769b26d575
Fix %varargs when used with a numerical argument, which was emitting one more optional argument than documented
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12657 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-05-06 20:56:42 +00:00
William S Fulton
db9e973ab8
Rev 12650 - rename runtime component of varargs_typemap testcase
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12652 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-05-03 05:38:41 +00:00
Ian Lance Taylor
045861e9c5
Rename varargs_typemap test case to python_varargs_typemap, and move
...
to Python Makefile.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12650 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-05-02 21:11:15 +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
8f07b3f851
Testcase and fix for bug 1163440: vararg typemaps.
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12639 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-04-12 18:55:24 +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
Stefan Zager
8c290f56bf
Previous commit inadvertantly hosed this test; restored it.
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12614 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-04-07 05:22:52 +00:00
Stefan Zager
0cdf8658c7
Final merge from trunk
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/szager-python-builtin@12595 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-04-03 07:37:35 +00:00
Stefan Zager
769f6648c8
Added test case for python richcompare operators.
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/szager-python-builtin@12577 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-03-31 03:55:42 +00:00