Commit graph

302 commits

Author SHA1 Message Date
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
William S Fulton
baec61c5ab java_director_exception_feature_nspace test case changes
- The implementation for SEP for the classpath is not portable, eg the
separator should be ':' not ';' on Cygwin, but clearly it could be ';'
if using a native Windows version of Java. In the past the test-suite
has been constructed to avoid this problem and these changes go back to
this approach at the expense of not testing nspace without -package (but
not specifying -package is quite unusual when using nspace, so no great
loss). This test could be restored to how it was if the separator is
detected at configure time from the JVM itself, eg by calling Java code:

  System.out.println(System.getProperty("path.separator"));

- Mangle the non-public classes in the _runme.java file so that they are
unique to this testcase (the .class files generated can interfere with
other tests).

- Const corrections and spelling mistakes fixed in test case.

test case improvements
2013-11-07 22:50:08 +00:00
Marvin Greenberg
6736e74127 Add feature director:except for improved director exception handling in Java
Closes #91
2013-10-22 20:44:35 +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
b17456e617 Merge branch 'gsoc2009-matevz' into master - C++11 support
* gsoc2009-matevz:
  Minor cleanup prior to merging to master
  Add gsoc2009-matevz for Travis testing
  C++11 testing moved to a configure option
  Rename all C++0x to C++11 and cpp0x to cpp11
  Grab .travis.yml file from master to turn on Travis testing
  Suppress leaking memory warnings in rvalue reference tests
  Add support for extern "C++" - no warning should be issued as was previously occurring
  Add support for extern "C" thread_local
  Fixes detecting if a variable is extern when using 'extern thread_local'
  Add support for thread_local when specified with other legitimate storage class specifiers - extern and static
  Remove test tokens
  User defined literals: fix for %rename and update docs
  Add ability to suppress variadic template first argumnet warning
  Add template aliasing and type aliasing into symbol table and enable explicit warning suppression for these. They still need to be added into the parse tree and dealt with.
  Add lambda functions to the symbol tables and add ability to suppress lambda warnings.
  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.
  Initialization list doc updates and new tests. Fix functions with default arguments that are initializer lists
  Better clarification about polymorphic wrappers for function objects - std::function
  Remove generated output that should not be checked in2
  Fix shift/shift and shift/reduce errors around variadic templates since merge
  Variadic templates doc update
  Add rvalue reference typemaps
  Add rvalue reference typemaps
  Add rvalue reference typemaps
  Add rvalue reference typemaps
  Add rvalue reference typemaps
  Add rvalue reference typemaps
  Add rvalue reference typemaps
  Add rvalue reference typemaps
  Use CXXFLAGS for c++ code for Go examples
  Add missing static member to testcase
  More rvalue reference typemaps
  Fix generated code for rvalue references by converting functions returning an rvalue reference into something that can be taken the address of - via a const ref cast. Now the rvalue_reference tests compile under g++-4.7 (C# only atm)
  Remove recently added %expect in parser in case of backward compatibility problems
  Cosmetic changes to previous (unicode literals) commit
  Fixes to previous (unicode literals) commit
  Unicode literals
  Add check-cpp11 target for testing c++11 only tests
  Improve detection of C++11 compiler and set appropriate flags to use C++11/C++0x features
  Modify autoconf macro to be more flexible about how it is used - sets CXX11FLAGS, HAVE_CXX11_COMPILER and option to not error out
  Autoconf archive macro to detect c++11 - as downloaded from archive
  Update variadic templates
  result_of not working
  Add lambda tests to test-suite - gcc-4.7 supports these
  One more lambda test using constexpr
  More lambda support - for optional lambda declarators
  Add in support for initialising auto variables from lambda expressions
  Lambda expressions: parse exception specification in lambda functions. Fix lambda testcase for gcc-4.7.
  Delegating constructors and inheriting constructors clarification and split of tests
  gcc-4.7 now supports alias templates
  Update on C++11 user-defined literal status
  Fix unrestricted unions testcase and add runtime example
  Minor doc tweaks for unrestricted unions
  Some updates to c++11 warning messages and update docs on alias templates
  Provide unique c++11 warnings which were previously hijacking another warning
  Tidy up test and docs on template double brackets
  Better clarify C++11 smart pointer support
  Update c++0x tests run by default for g++-4.6
  Improve nullptr constant wrapping
  Add scoped enums into correct correct scope in type system. Note that cpp0x_strongly_typed_enumerations.i still shows further language symbol table problems which need fixing.
  Using C++11 enum classes with just a forward reference.
  Add support for c++11 strongly typed enums inheriting from non standard primitive types
  Fix parsing of forward declaration of C++0x enums
  html fixes
  sort out c++0x lambda tests and reorder cpp0x tests
  Improved C++0x rvalue reference implementation differentiating lvalue and rvalue references. The previous implementation treated rvalue references as lvalue references which leads to a number of different wrapping issues.
  simple formatting changes
  Warning suppression for explicit template instantiations
  Raw string literal changes in paper N3077 changes delimiters to use round brackets instead of square brackets
  add in more raw string literals for gcc-4.5
  typo fix
  minor warning message changes
  Add new GPL license headers to all source files in this branch
  merge revisions 11872:11876 from trunk to gsoc2009-matevz branch - license changes
  Grammar and formatting improvements
  Added developer documentation for C++0x.
  Fixed testcase warnings.
  Documented C++0x testcases.
  Updated C++0x User's manual.
  Removed decr-- Hash tables feature. Added some comments.
  Added draft user documentation for the C++0x.
  Added warning for initializer_list introduced in C++0x. Added testcase cpp0x_initializer_list.
  Fixed cpp0x_result_of testcase. Added testcase cpp0x_sizeof_object.
  Added testcase for default/delete arguments introduced in C++0x.
  Added cpp0x_result_of testcase.
  Added syntax support for template aliasing and new 'using' syntax for typedefs introduced in C++0x. Added testcase cpp0x_template_typedefs.
  Added testcase cpp0x_constructors for delegating constructors and constructor inheritance.
  Added initial support for C++0x decltype(). Added testcase cpp0x_decltype.
  Added support for user-defined string literals. Added testcase cpp0x_userdefined_literals.i
  Fixed compilation error.
  Added syntax for lambda expressions and closures introduced in C++0x. Added testcase cpp0x_lambda_functions.i.
  Fixed variadic template argument warning.
  Enabled support for variadic %template directive.
  Enabled alternate function syntax and added runtime testcases. Added support for null pointer constant introduced in C++0x.
  Fixed S/R and R/R conflicts. Fixed testcase for rvalue reference.
  Added variadic '...' syntax for inheritance introduced in C++0x. Added sizeof... syntax introduced in C++0x.
  Added initial support for variadic templates.
  Added partial support for unordered_ STL types.
  Added support for C++0x rvalue and move semantics. Added testcase.
  Added initial support for parsing C++0x strongly typed enumerations.
  Fixed bug in cpp0x testcase.
  Added testcase for cpp0x unrestricted unions.
  Disabled alternate function syntax testcase.
  Added testcase for function objects.
  Added initial support for hash tables unordered_ types.
  Added C++0x test case for the hash_tables.
  Added support for C++0x alternate function syntax. Added testcase.
  Added support for cpp0x uniform initialization. Added testcases.
  Fixed cpp0x_raw_string_literals.i test case.
  Added testcase for shared_ptr, unique_ptr and weak_ptr.
  Added keyword 'thread_local' to Swig. Added testcase.
  Added test case.
  Added C++0x support for 'extern' explicit template instantiation without the translation unit. Added test cases.
  Added support for C++0x static_assert().
  Added support for custom string delimiters.
  Added support for unicode strings and fixed support for wstrings. Added test case cpp0x_raw_string_literals.i.
  Added test case for explicit conversion operators. Some cosmetic fixes.
  Added constexpr keywords and CONSTEXPR terminal to Swig parser. Added cpp0x_constexpr.i testcase. Fixed compilation bug of cpp0x_template_double_brackets.i testcase. Removed obsolete cpp0x_template_double_brackets_broken.
  Introduced new CXXFLAGS symbol for the compilation of test suite. Added -std=c++0x to g++ compiler to enable compilation of the new C++0x tests.
  Renamed template_double_brackets -> cpp0x_template_double_brackets. Added CPP0X_TEST_CASES and CPP0X_TEST_BROKEN in common.mk.
  Added support for template double brackets for C++0x. Added test cases.
2013-10-11 21:52:05 +01:00
William S Fulton
e5f9f91807 Add naturalvar_more testcase runtime test 2013-10-11 19:42:19 +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
439a353a36 Document patch #33 from previous commit and complete run time tests 2013-04-18 23:20:48 +01:00
William S Fulton
857e447654 Fix syntax error when preprocessor macros are defined inside of enum lists
Fixes SF Bug 428, Patch 333
2013-04-18 22:48:42 +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
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
William S Fulton
6fafa8cecc Merge pull request #17 from tristan0x/fix-test-suite-if-custom-java
use executables path set at ./configure time
2013-01-18 17:13:16 -08:00
William S Fulton
bda67e1d78 Cosmetic makefile change 2013-01-19 01:06:01 +00:00
William S Fulton
95b176b6b3 Java test-suite change to make it possible to not specify a namespace. Re-add java_nspacewithoutpackage testcase 2013-01-18 23:52:48 +00:00
William S Fulton
55f4bfec8e Revert Java test-suite makefile to adf51b5249 2013-01-18 23:47:23 +00:00
Tristan Carel
219555ebea use executables path set at ./configure time 2013-01-17 19:07:30 +01:00
Brant K. Kyser
43ad8e611a Remove comment about previously outstanding TODO that has been cleaned up. 2013-01-17 08:13:04 +00:00
Brant K. Kyser
28da117186 Modify java test-suite Makefile to run the java_nspacewithoutpackage test without the -package option. 2013-01-17 08:13:04 +00:00
Brant K. Kyser
988952af65 Add test case for using nspace without -package. TODO: Fix Makefile.in to actually not use -package when invoking swig. 2013-01-17 08:13:04 +00:00
marvingreenberg
30b1eafd96 fix variable names and makefile logic to correctly set PKGDIRSETUP and SWIGOPT for different cases 2013-01-17 08:13:04 +00:00
marvingreenberg
9855e4d064 Allow certain tests to compile without -package option 2013-01-17 08:13:03 +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
079165abe2 Convert to unix fileformat 2013-01-12 16:54:45 +00:00
Brant K. Kyser
c786781e92 Add test case for SourceForge Bug #1299 2013-01-05 03:14:42 -06:00
Brant K. Kyser
d5d7655544 Merge branch 'master' into SFbug1299 2013-01-03 21:26:47 -06:00
Brant K. Kyser
f0e47b81d6 Added a test case for SourceForge Bug #1283.
This test case exercise directors used in conjunction with smart pointers.
2013-01-04 00:31:55 +00:00
Brant K. Kyser
60525e800d Added a test case for SourceForge Bug #1283.
This test case exercise directors used in conjunction with smart pointers.
2013-01-03 14:09:14 -06:00
Brant K. Kyser
7ff0dfe426 Fix for SourceForge Bug #1278
* Modify test-suite to test Java directors with multi-level namespaces.
* Path java module to correctly generate method descriptors when multilevel namespaces are used.
2013-01-02 15:07:56 -06:00
William S Fulton
b40f678115 Tweak test so it works if test-suite is run using -copyctor
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13880 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-11-13 22:17:55 +00:00
William S Fulton
b17a77c6ea Support special variable expansion in %extend.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13871 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-10-11 19:28:02 +00:00
William S Fulton
2598a1daf2 Two additional special variable are expanded in %exception - $parentname
and $parentsymname

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13870 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-10-11 19:24:24 +00:00
William S Fulton
323f841d93 Add a testcase for the Curiously Recurring Template Pattern - CRTP
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13839 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-09-13 20:15:03 +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
289b8bb269 Fix additio of assumeoverride testcase
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13607 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-08-13 21:59:14 +00:00
William S Fulton
009c191430 Add assumeoverride feature option for Java directors to improve performance when it can be assumed that all methods are overridden by the Java derived classes
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13606 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-08-13 21:41:08 +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
6e6ce16e4e Fix using declarations combined with using directives with forward class
references.

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13502 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-08-04 20:23:07 +00:00
William S Fulton
1ce0058256 Fix symbol table bug with combinations of using directives and using declarations
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13190 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-06-25 06:36:29 +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
a0e21e82ca char **STRING_ARRAY typemaps fixed to handle null pointers
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13021 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-04-28 14:29:23 +00:00
William S Fulton
196097949b Add JNI checking when running Java test-suite
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12962 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-03-29 20:27: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
debd5e9246 Add support for %nspace when using directors - Java
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12891 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-01-06 18:57:25 +00:00
William S Fulton
b50e6858ac keyword variable workaround in testcase
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12880 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-12-21 07:18:45 +00:00
William S Fulton
468ca084fc Correct special variables in 'directorargout' typemap. This change will break any 'directorargout' typemaps you may have written. Please change: to and to \n Also fix the named 'directorargout' DIRECTOROUT typemaps for these languages which didn't previously compile and add in , etc expansion.\n [C#, Go, Java, D] Add support for the 'directorargout' typemap.\n [Java] Add (char *STRING, size_t LENGTH) director typemaps.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12877 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-12-20 20:50:36 +00:00
William S Fulton
4c6f66577a Add warnings for badly named destructors. Fix %extend and destructors for templates - they weren't always being wrapped. Fix destructor "name" attribute.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12804 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-09-13 06:15:29 +00:00
William S Fulton
a141af9574 Fix regression introduced in r12784 where SWIG accepts a non standard constructor and destructor name in %extend, where the typedef name is used as the constructor/destructor name.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12801 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-09-08 18:19:45 +00:00