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
Stefan Zager
3d444101d1
A slew of changes based on William Fulton's code review.
...
- Fixed naming conventions; SwigPyBuiltin is used a lot
- Removed use of std::vector
- builtin.swg isn't included if -builtin isn't specified
- Changed many feature names to use a "python:" prefix
- Eliminated static vars in std_pair.i
- Eliminated C++-style comments (//)
- Enabled autodoc and docstring with -builtin
- Fixed non-ansi generated C code
- Detect and complain if two incompatible swig modules are loaded
- Removed argcargvtest_runme3.py, and fixed argcargvtest_runme.py
so that 2to3 handles it better
- Removed anonymous namespaces
- Eliminated builtin_init typemaps; consolidated functionality into
SWIG_Python_NewPointerObj
- Eliminate printf warnings from %U conversion character by switching
to %S, which works just as well
- Fixed li_std_set_runme.py for python3, which returns set members in
a different order from python2
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/szager-python-builtin@12562 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-03-29 06:57:02 +00:00
Stefan Zager
39921e87d9
Merge from trunk.
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/szager-python-builtin@12561 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-03-28 22:18:07 +00:00
Stefan Zager
93499e12af
Merged trunk up to revision 12551
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/szager-python-builtin@12552 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-03-24 05:46:05 +00:00
William S Fulton
f5feb6cc24
Fix regression introduced in swig-2.0.2 where filenames with spaces were not found when used with %include and %import
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12546 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-03-17 07:33:05 +00:00
William S Fulton
5f4d8c6112
Fix SF #3194294 - corner case bug when 'NULL' is used as the default value for a primitive type parameter in a method declaration.
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12525 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-03-09 22:31:08 +00:00
William S Fulton
23a5fecc60
Additional %varargs and overloading testing
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12486 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-02-19 19:20:37 +00:00
William S Fulton
95de0a3437
Rename symbol in test case as the name is clashing in some way with new versions of Octave (3.2.4)
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12482 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-02-19 16:20:38 +00:00
William S Fulton
873d07d1e5
Fix #3184549 - vararg functions and function overloading when using the -fastdispatch option.
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12474 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-02-18 21:25:42 +00:00
William S Fulton
e0ee14c3ba
Fix Fix #1927852 - #include directives don't preprocess the file passed to it
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12457 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-02-13 13:53:14 +00:00
William S Fulton
16ba0aca53
Fix preprocessor breakages introduced in rev 12441 which was fixing defined() being expanded outside of #if and #elif preprocessor directives
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12455 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-02-12 23:27:50 +00:00
Stefan Zager
5db5f109c7
python3 won't let you declare an 'except' clause for a non-throwable type, even if the clause is never executed.
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/szager-python-builtin@12448 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-02-10 05:05:14 +00:00
William S Fulton
63af0a2d72
Fix #1940536 , overactive preprocessor which was expanding defined(...) outside of #if and #elif preprocessor directives.
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12441 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-02-07 07:29:55 +00:00
Stefan Zager
52a807ce95
Merged trunk up to revision 12426
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/szager-python-builtin@12427 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-02-03 19:30:45 +00:00
Stefan Zager
cd93c7362e
Applied patch #3171793 to fix -fvirtual. Mostly disabled python_abstractbase, since builtin types can't inherit from pure-python ABC's. Duck typing still works.
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/szager-python-builtin@12426 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-02-03 18:10:39 +00:00
Stefan Zager
62fef1bf99
python3 support; passes all regressions.
...
Adding argcargvtest_runme3.py, because 2to3 can't handle it.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/szager-python-builtin@12425 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-02-03 07:21:37 +00:00
William S Fulton
4a73d986dd
Any 'using' statements in the protected section of a class were previously ignored with dirprot mode, certainly with Java and C#. Also directors - a call to a method being defined in the base class, not overridden in a subcalss, but again overridden in a class derived from the first subclass was not being dispatched correcly to the most derived class - affecting non-scripting languages. Fix for C# is based on recent fix for D.
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12419 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-02-01 07:02:50 +00:00
Stefan Zager
9c796f0333
Merged changes from trunk up to revision 12416.
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/szager-python-builtin@12417 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-01-30 05:24:00 +00:00
Stefan Zager
002598680e
This commit contains all changes to the regression tests which
...
are necessitated by the -builtin option. Notes on individual tests
follow.
grouping_runme.py : 'cvar' syntax for class variables is obsolete.
li_std_string_extra_runme.py :
li_std_wstring_runme.py : Reverse binary operators (e.g., __radd__)
are not supported.
threads_exception_runme.py :
director_exception_runme.py :
exception_order_runme.py : Throwing wrapped objects as exceptions
is not supported.
default_constructor_runme.py : Redundant functional interface
(e.g., 'module.new_Foo()' for 'module.Foo()') is not provided.
python_nondynamic_runme.py : I believe that this test script doesn't
actually test the %pythonnondynamic feature correctly, and I believe
that the feature itself is implemented incorrectly. With the -builtin
option, %pythonnondynamic *is* implemented correctly, and I have
modified the test script to exercise it correctly.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/szager-python-builtin@12416 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-01-30 04:13:58 +00:00
William S Fulton
640cce2c50
Fix typecheck typemaps for SWIGTYPE *const&
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12413 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-01-30 00:42:27 +00:00
William S Fulton
ef865e06d5
Added some missing multi-argument typemaps: (char *STRING, size_t LENGTH) and (char *STRING, int LENGTH) - Java patch is from Volker Grabsch. Elements of the primitive_types.i testcase for this moved into char_binary.i. Documentation for this enhanced.
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12393 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-01-14 19:06:43 +00:00
David Nadlinger
892caec201
[D] Fixed a bug in the loop breaking code for directors leading to a superclass implementation erroneously being called.
...
The situation in which this would previously happen is illustrated in the new "director_alternating" test case. Currently broken for C# and Java.
Thanks to Jimmy Cao for reporting this.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12380 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-01-08 21:05:49 +00:00
William S Fulton
8f1bde9d81
Fix expansion in array typemaps
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12347 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-12-14 21:38:36 +00:00
Vadim Zeitlin
f6cab0170a
Ignore non-matching regex renames when searching renames list.
...
Skip over %renames with non-matching %(regex)s expansion when looking for the
one to apply to the given name. This allows to have multiple anonymous renames
using regex as now the first _matching_ one will be used instead of always
using the first one and ignoring all the rest of them.
Extend unit tests to verify that applying two anonymous %renames does work as
expected.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12293 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-11-16 14:09:39 +00:00
William S Fulton
c9ede7e622
Fix unary scope operator (::) (global scope) regression introduced in 2.0.0. The mangled symbol names were incorrect, sometimes resulting in types being incorrectly treated as opaque types.
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12264 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-10-13 05:48:59 +00:00
William S Fulton
3219746776
Apply patch #3066958 from Mikael Johansson to fix default smart pointer handling when the smart pointer contains both a const and non-const operator->.
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12240 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-10-03 13:12:00 +00:00
Vadim Zeitlin
f89181d4c8
Fix the rename_pcre_encoder unit test for Python.
...
Due to a bug in the way %rename() directives without a name currently work,
the second %rename in rename_pcre_encoder.i overrides the first one and the
function wxDoSomething() is not renamed to DoSomething() any more. Remove the
test for this renaming that doesn't work to at least let the rest of the test
to pass.
Also test that SetXXX() functions from the .i file really are renamed to
putXXX() as expected.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12217 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-09-11 11:44:26 +00:00
Vadim Zeitlin
0b2561f300
Add a test case for the regex encoder inside %rename.
...
Simple unit test checking that %rename("%(regex:...)") works as expected.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12171 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-07-22 17:00:59 +00:00