Commit graph

218 commits

Author SHA1 Message Date
Richard Pastrick
11d07bb45b add bool array type to arrays_csharp.i [issue #228] 2014-09-17 22:17:36 +01:00
Curtis Dunham
fe91d6449f Remove register storage class declarations
They're unnecessary, anacronistic, deprecated in modern
standards, generally ignored, useless, and (most importantly)
clang complains about them.
2014-02-19 11:58:27 -06:00
William S Fulton
078dbf8d22 Merge branch 'clang_fixes' of github.com:marvingreenberg/swig into marvingreenberg-clang_fixes 2014-02-15 22:37:40 +00:00
Marvin Greenberg
843aa7cd65 Work around differences in clang libc++ std::vector<bool>::const_reference
clang++ using -stdlib=libc++ defines const_reference as a class,
to map boolean vectors onto a bit set.  Because swig does
not "see" the type as "const &" it generates incorrect code for this case,
generating a declaration like:

  const_reference result;

When const_reference is a typedef to 'bool' as is the case with stdlibc++
this works.  When this is actually a constant reference, this is clearly
invalid since it is not initialized.  For libc++, this is a class
which cannot be default constructed, resulting in an error.  The fix
is to explicitly define the various accessor extensions as having a
bool return type for this specialization.
2014-02-04 16:00:12 -05:00
William S Fulton
0383d08444 Add new swigtype_inout.i library containing SWIGTYPE *& OUTPUT typemaps. 2014-02-04 06:54:22 +00:00
William S Fulton
cc650e692e Director exceptions now derive from std::exception 2014-01-20 19:40:52 +00:00
William S Fulton
1a19451c1b Error out attempting to use directors without -c++
Remove redundant #ifdef __cplusplus markers in director.swg
2013-12-23 20:23:54 +00:00
William S Fulton
135a7cc558 Beautify director.swg files
Also some comment corrections for Perl
2013-12-23 19:50:41 +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
William S Fulton
cdefaaf794 Fixes for c_delete and c_delete_function tests 2013-11-21 20:20:56 +00:00
Brant K. Kyser
5f53503b7d Correct spelling of compatibility. 2013-10-22 14:08:47 -05:00
Brant K. Kyser
3720b48847 Add support for SWIG2_CSHARP macro to create SWIG 2 backwards compatability mode. 2013-10-21 13:13:47 -05:00
Brant K. Kyser
adb93980f2 Remove using directives from the generated C# code and fully qualify the use of all .NET framework types in order to minimize potential name collisions from input files defining types, namespace, etc with the same name as .NET framework members. 2013-10-17 15:44:24 -05:00
Brant K. Kyser
cb2df12630 Since SWIG 3.0 removes support for .NET 1.1, cleanup the C# library by removing the use of the SWIG_DOTNET_1 macro. 2013-10-17 13:58:32 -05:00
Brant K. Kyser
3235570619 Globablly qualify the use of types from the .NET framework's System namespace in the C# module and library. 2013-10-17 13:27:48 -05: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
Vadim Zeitlin
9efaf954c7 Add support for std::map<> comparator template argument for C#.
Allow exporting maps using non-default comparison function.

Closes #77
2013-08-29 19:08:15 +01: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
1386b73545 More rvalue reference typemaps 2013-01-24 20:26:02 +00:00
William S Fulton
5e507b82f1 Apply patch #3571029 which adds missing director support for const unsigned long long &.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13952 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-12-09 20:49:28 +00:00
William S Fulton
196f9b31ed Remove unused temp variable in C# intrusive_ptr wrappers
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13510 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-08-04 23:20:07 +00:00
William S Fulton
12a9671440 std::string typemap modifications so they can be used with %apply for other string classes
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13120 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-05-26 06:33:49 +00:00
William S Fulton
142f1e72bb Fix some language's std::map wrappers to recognise difference_type, size_type, key_type and mapped_type.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13092 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-05-15 19:51:06 +00:00
William S Fulton
38f6156a93 Using C++11 enum classes with just a forward reference.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2009-matevz@13013 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-04-23 22:15:37 +00:00
William S Fulton
4c898b023c The 'directorin' typemap now accepts , etc expansions instead of having to use workarounds - _name, _name etc.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12879 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-12-21 07:16:44 +00:00
William S Fulton
6a74028e65 Fix inconsistencies in Java and C# getCPtr() and pointer constructor visibility - change to protected/internal from public. Add SWIG_JAVABODY_PROXY, SWIG_JAVABODY_TYPEWRAPPER and SWIG_CSBODY_PROXY, SWIG_CSBODY_TYPEWRAPPER for users to easily change when using multiple modules.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12843 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-11-25 20:56:56 +00:00
William S Fulton
24133bacd7 Remove numerous hard coded 'result' variable name in generated c/c++ wrappers. The variable name is now defined in just one place, making it possible to change the name easily if a target language so wishes - see cwrap.c.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12830 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-10-30 21:51:50 +00:00
William S Fulton
2aeed2fd48 Add missing intrusive_ptr csvarout typemaps for C#
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12807 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-09-13 22:35:14 +00:00
William S Fulton
b00aafcad0 Add boost_intrusive_ptr.i library contribution from #3401571.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12806 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-09-13 19:01:23 +00:00
William S Fulton
8ee0593036 Remove incomplete directorin typemaps as users incorrectly assumed they were implemented and working
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12653 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-05-03 05:46:00 +00:00
William S Fulton
837835280d Remove directorout INPUT/INOUT/OUTPUT typemaps - they will never be used as they used for the return type, not parameters. Fix java directorin typemap.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12651 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-05-03 05:32:13 +00:00
William S Fulton
5f1c242f1a Apply patch #3212624 fixing std::map Keys property.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12540 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-03-15 07:30:18 +00:00
William S Fulton
2f0dc16b2e Fix C# typemaps.i so that %apply works doesn't break function returns using the same types, for example, %apply int &INPUT { int & } won't break 'int &foo(int &x);'
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12400 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-01-24 19:27:06 +00:00
William S Fulton
a4a56acd33 dos to unix fileformatting
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12261 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-10-07 06:06:12 +00:00
William S Fulton
8a05a23612 Apply patch from Tomas Dirvanauskas for std::map wrappers to avoid throwing exceptions with normal usage of iterators.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12231 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-09-28 06:36:42 +00:00
William S Fulton
25ff4e4927 merge revisions 11877-12162 from trunk to gsoc2009-matevz
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2009-matevz@12164 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-07-20 23:35:40 +00:00
William S Fulton
ab1cd03979 merge revisions 11243-11872 from trunk to gsoc2009-matevz
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2009-matevz@12162 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-07-20 21:58:41 +00:00
William S Fulton
d8cc75946b 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.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2009-matevz@12160 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-07-18 00:19:22 +00:00
William S Fulton
cc9b811281 Add spaces to avoid unintended <: digraph in SWIG_STD_VECTOR_ENHANCED
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12083 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-06-01 23:36:08 +00:00
William S Fulton
d25121a0ed Fix SWIG_STD_VECTOR_ENHANCED macro used in C# std::vector to work with commas
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12081 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-06-01 23:10:22 +00:00
William S Fulton
36c2e97a1c Add std_shared_ptr.i and document shared_ptr library
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12077 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-06-01 19:03:55 +00:00
William S Fulton
a4febe7799 Fix #2957375 (C#) - SWIGStringHelper and SWIGExceptionHelper not always being initialized before use in .NET 4 as the intermediary class was not marked as beforefieldinit.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12044 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-05-23 22:24:36 +00:00
William S Fulton
9c53d41e0f nspace fixes for smart pointers
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12038 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-05-23 00:29:58 +00:00
William S Fulton
3dfac02269 shared_ptr improvements so the proxy class does not need to be specified - SWIG_SHARED_PTR macro deprecated and replaced by %shared_ptr
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12037 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-05-22 23:57:19 +00:00
William S Fulton
12cfc251e4 Fix #2408232. Improve shared_ptr and intrusive_ptr wrappers for classes in an inheritance hierarchy. No special treatment is needed for derived classes, the SWIG_SHARED_PTR_DERIVED macro is deprecated.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12036 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-05-22 22:49:47 +00:00
William S Fulton
964382336e remove std::map specializations - not needed since the typemap matching rules were changed to follow type deducation used in template specialization
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11978 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-04-04 20:37:20 +00:00
William S Fulton
482c06c28c Remove unnecessary vector of constant pointer specialization since the improved default typemap matching rules were introduced
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11961 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-04-01 23:30:26 +00:00
William S Fulton
bdb136d611 Change typemap matching rules for the default type (SWIGTYPE) to follow template partial specialization type deduction. Fixes some containers of const pointers. SWIGTYPE*& typemps removed and replaced with SWIGTYPE *const&.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11958 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-04-01 18:26:37 +00:00
William S Fulton
96f9879511 Fixes for nspace and derived classes
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11930 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-03-09 21:15:34 +00:00
William S Fulton
7f53260203 merge revisions 11872:11876 from trunk to gsoc2009-matevz branch - license changes
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2009-matevz@11905 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-03-06 00:51:54 +00:00