William S Fulton
e531578c54
Modify typedef_typedef testcase to work for all languages
...
Add CHANGES note
Closes #112 .
2014-01-14 07:21:40 +00:00
Yann Diorcet
2e186244d6
Add test for checking prefix resolving in typedef
2014-01-14 07:21:40 +00:00
Vadim Zeitlin
cdf1ba9120
Don't accept strings too long to fit in char[N] with trailing NUL.
...
It was previously possible to assign "hello" to a variable backed by char[5]
storage in C, and the array contained the correct character data but without
the trailing NUL, which was unexpected in C.
This is not allowed any more, only "helo" can fit into a char[5] now and
anything else fails the type check, just as it already happened for the longer
strings before.
Closes #122
2013-12-23 21:13:25 +00:00
Vadim Zeitlin
88a0e228a9
Change the length of strings created from fixed-size buffers.
...
Use the usual C rule for NUL-terminated strings instead of discarding all the
trailing NUL characters.
This was unexpected (as buffers in C code are not necessarily always padded
with NULs to their full length) and also inconsistent among languages as this
was only done for those of them using typemaps/strings.swg but not for C# or
Java, for example, which terminated the string at the first NUL even before
this change.
Notice that this patch couldn't use strlen() or wcslen() with possibly not
NUL-terminated strings, so we had to add [our own equivalents of] strnlen()
and wcsnlen() and use them instead. This required adding yet another parameter
to string typemap macros, so update the example using them accordingly too.
2013-12-23 21:12:17 +00:00
Vadim Zeitlin
ed28725a15
Add std_auto_ptr.i defining typemaps for returning std::auto_ptr<>.
...
These typemaps are currently defined for C#, Java and Python only and the
tests are provided only for these languages.
Also add a brief description of the new header to the documentation.
2013-12-03 23:45:20 +01:00
Vadim Zeitlin
72afb74f47
Add support for case conversion characters in regex substitutions.
...
Allow using Perl-like \l, \L, \u, \U and \E escape sequences in the
substitution string used with %rename("%(regex:/pattern/subst/)s").
This is useful for e.g. title casing all string after removing some prefix.
Closes #82
2013-10-15 07:17:56 +01:00
William S Fulton
bcb7aee022
Merge branch 'master' into gsoc2009-matevz
...
Conflicts:
Examples/Makefile.in
Examples/guile/Makefile.in
Lib/php/php.swg
Makefile.in
Source/CParse/parser.y
configure.ac
2013-10-10 07:26:09 +01:00
William S Fulton
738cc36aab
Rename all C++0x to C++11 and cpp0x to cpp11
2013-10-07 20:37:00 +01:00
William S Fulton
a91cd0bc5c
Infinity is now by default an acceptable value for type 'float'.
...
This fix makes the handling of type 'float' and 'double' the same. The implementation requires the
C99 isfinite() macro, or otherwise some platform dependent equivalents, to be available.
2013-09-12 07:28:12 +01:00
William S Fulton
b58dabced9
%implicitconv is improved for overloaded functions.
...
Like in C++, the methods with the actual types are considered before trying implicit conversions.
2013-08-28 20:30:46 +01:00
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
Marko Klopcic
1bf26f216d
tests updated according to fix for the link tag'
2013-04-22 23:08:50 +02: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
Marko Klopcic
02d0acfbb3
doxygen translation tests updated for tags 'anchor' and 'ref'
2013-03-17 21:42:22 +01:00
Marko Klopcic
4663fce63c
fixed bug in handling of ref tag in Java, added handling in Python
2013-03-17 20:09:34 +01:00
Marko Klopcic
3b7908fa6e
fixed leading spaces for the second row of table in pydoc, sources formatted
2013-02-23 15:20:27 +01:00
Marko Klopcic
b5dea7456b
improved handling of word commands if puntuation is following the word, preserved spaces at start of comment line
2013-02-21 09:05:11 +01:00
Marko Klopcic
fa8fc4baf3
all doxygen tests pass
2013-02-15 23:05:14 +01:00
Marko Klopcic
9b52972c24
HTML tags and entities tests pass for Python
2013-02-14 21:53:09 +01:00
Marko Klopcic
0b6bc80038
Translation of HTML tags to Python almost finished
2013-02-13 23:06:20 +01:00
Marko Klopcic
560dedb6c0
added handling of HTML tags and HTML entities to PyDocConverter, updated tests
2013-02-12 22:58:50 +01:00
William S Fulton
8778724768
Add support for extern "C++" - no warning should be issued as was previously occurring
2013-02-08 18:55:16 +00:00
William S Fulton
e44656cfe5
Add support for extern "C" thread_local
2013-02-08 18:45:29 +00:00
William S Fulton
b725625e6f
Add support for thread_local when specified with other legitimate storage class specifiers - extern and static
2013-02-08 06:36:39 +00:00
Marko Klopcic
77b6099c05
updated two additional python doxygen tests
2013-02-07 08:46:38 +01:00
Marko Klopcic
08093ec17e
updated two additonal tests for python doxygen code comments
2013-02-06 22:59:30 +01:00
Marko Klopcic
ee3e4024a6
updated test doxygen_misc_constructs for Python
2013-02-05 07:57:49 +01:00
William S Fulton
d613ef42f2
Rework std::initializer_list handling to warn about usage in any method, not just constructors. A typemap is used to issue the warning and can be overridden with user defined behaviour.
2013-02-04 20:03:22 +00:00
Marko Klopcic
29d1bba70a
improved comment formatting for Python
2013-02-02 23:01:09 +01:00
William S Fulton
c8ff23de0c
Initialization list doc updates and new tests. Fix functions with default arguments that are initializer lists
2013-02-02 20:03:10 +00:00
William S Fulton
a043b55b69
Better clarification about polymorphic wrappers for function objects - std::function
2013-02-01 19:17:21 +00:00
William S Fulton
2a90cc6a98
Remove generated output that should not be checked in2
2013-01-28 07:11:08 +00:00
William S Fulton
e805d5f925
Merge branch 'master' into gsoc2009-matevz
...
parser.y still to be fixed up
Conflicts:
Doc/Devel/engineering.html
Examples/Makefile.in
Lib/allegrocl/allegrocl.swg
Lib/csharp/csharp.swg
Lib/csharp/enums.swg
Lib/csharp/enumsimple.swg
Lib/csharp/enumtypesafe.swg
Lib/java/java.swg
Lib/python/pydocs.swg
Lib/r/rtype.swg
Source/Include/swigwarn.h
Source/Modules/octave.cxx
Source/Modules/python.cxx
Source/Modules/ruby.cxx
Source/Swig/scanner.c
Source/Swig/stype.c
Source/Swig/swig.h
configure.ac
2013-01-28 07:01:37 +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
e25da884cb
Fix unrestricted unions testcase and add runtime example
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2009-matevz@13849 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-09-21 19:15:44 +00:00
Marko Klopcic
af74b4f96a
renamed test case
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2012-doxygen@13726 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-08-27 20:25:00 +00:00