Kris Thielemans
f6b10f299f
small suggestions for changes in std_ios.i
...
Hi
Would it be possible to add the following 2 typedefs to std_ios.i?
typedef basic_ios<char> ios;
typedef basic_ios<wchar_t> wios;
at present, it contains only
%template(ios) basic_ios<char>;
%template(wios) basic_ios<wchar_t>;
This means however that things like std::ios::openmode are currently not
recognised by SWIG. With the above typedefs, they are. Similar typedefs
should probably be added in std_iostream.i for ostream etc.
Also, while checking std_ios.i, it seems that the definition of basic_ios
has a copy-paste error in the private section (the constructor is still as
ios_base). To avoid confusion, I suggest to change that. Below is a diff
with the suggested changes.
Kris
2014-08-12 23:45:02 +01:00
William S Fulton
be49f5caee
Another revert fragment <stdexcept> for non-UTL languages
2014-02-22 20:53:26 +00:00
William S Fulton
2feb2e6fc6
Revert fragment <stdexcept> for non-UTL languages
2014-02-22 01:11:40 +00:00
William S Fulton
0d9a8721f4
Move some header file includes into fragments for UTL languages
2014-02-21 19:02:14 +00:00
William S Fulton
bd5c340062
Add <string> fragment
...
Removes <string> include specifically for clang
Cuts down on duplicate #include <string> in general
2014-02-15 23:30:14 +00:00
Marvin Greenberg
213774e0b6
Fix issue on clang about implicit instantiation of undefined template
...
Generated code does not include <string>, which is referenced in templates.
Clang may be incorrectly or aggresively instantiating some template.
E.g.,
import_stl_b_wrap.cxx:3199:51: error: implicit instantiation of undefined template 'std::__1::basic_string<char, std::__1::char_traits<char>
2014-02-04 11:55:36 -05:00
William S Fulton
92128eef44
C++11 support for new versions of erase and insert in the STL containers.
...
The erase and insert methods in the containers use const_iterator instead
of iterator in C++11. There are times when the methods wrapped must match
the parameters exactly. Specifically when full type information for
template types is missing or SWIG fails to look up the type correctly,
for example:
%include <std_vector.i>
typedef float Real;
%template(RealVector) std::vector<Real>;
SWIG does not find std::vector<Real>::iterator because %template using
typedefs does not always work and so SWIG doesn't know if the type is
copyable and so uses SwigValueWrapper<iterator> which does
not support conversion to another type (const_iterator). This resulted
in compilation errors when using the C++11 version of the containers.
Closes #73
2013-12-22 19:52:55 +00: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
Andrew Simmons
5f1fff1849
Copied std::pair<> fragment from Lib/std/std_map.i into Lib/std/std_multimap.i. This fixes an error when a std::multimap template is wrapped by itself.
2013-07-25 18:23:45 +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
Olly Betts
f9566ad2df
Fix assorted typos.
...
From https://sourceforge.net/p/swig/patches/332/ and some others too.
2013-01-08 18:47:40 +13:00
William S Fulton
c20cacad87
Add some missing STL container typedefs for Perl
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13620 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-08-15 23:04:26 +00:00
William S Fulton
347f2782d2
Fix missing stddef.h when %import of STL containers. Was causing compile failures witht g++-4.6.
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12939 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-03-20 20:07: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
Stefan Zager
a74909f77b
Fixed bug 2811549: const vs. non-const iterators for STL types.
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12645 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-04-29 22:36:06 +00:00
William S Fulton
c339c0b4f7
Add missing headers in generated STL wrappers to fix compilation with gcc-4.6
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12547 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-03-18 06:57:11 +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
85ac524d37
formatting change of const _TP * -> _TP const* merely to aid difference debugging with vector of non-const pointers std::vector specialization
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11979 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-04-04 22:27:10 +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
William S Fulton
4308dd03cf
SWIG license change - The Examples and Lib move to a very permissive license in the LICENSE file, removing the BSD license restrictions as agreed by committers since it was inadvertently introduced. Remove some examples where the impact of the license change is not clear.
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11874 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-02-27 23:26:02 +00:00
William S Fulton
fb4ad0b18d
Add back in all the deque methods
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11783 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-12-15 07:04:32 +00:00
Olly Betts
0633acd24f
[PHP] "empty" is a reserved word in PHP, so rename empty() method
...
on STL classes to "is_empty()" (previously this was automatically
renamed to "c_empty()").
*** POTENTIAL INCOMPATIBILITY ***
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11772 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-12-04 04:33:58 +00:00
William S Fulton
132376bade
Fix std::vector of const pointers
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11704 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-10-20 18:22:16 +00:00
Matevz Jekovec
52149e219d
Removed decr-- Hash tables feature.
...
Added some comments.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2009-matevz@11569 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-08-14 16:15:36 +00:00
Matevz Jekovec
523817e4ee
Added initial support for hash tables unordered_ types.
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2009-matevz@11418 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-07-18 21:34:53 +00:00
William S Fulton
da8791792b
STL fixes when using %import rather than %include and the Solaris Workshop compiler
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10424 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2008-05-07 21:33:19 +00:00
William S Fulton
aa4d91b319
Apply patch #1925702 from Casey Raymondson which removeswarning 512 for std::vector wrappers
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10322 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2008-03-26 20:25:56 +00:00
Xavier Delacour
393391965c
Initial commit of Octave module.
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10290 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2008-03-01 23:35:44 +00:00
William S Fulton
08a45afc1b
Correct methods that were not as per the standard
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10062 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-10-28 22:33:20 +00:00
William S Fulton
69f7d011c0
add missing class declarations
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10049 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-10-26 01:01:25 +00:00
William S Fulton
0da1552b26
Mods to match the C++ standard
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10039 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-10-25 22:31:12 +00:00
Gonzalo Garramuno
6a01528488
Fixed SWIG_EXPORT_ITERATOR_METHODS in std_set.
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9823 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-05-18 23:32:55 +00:00
Gonzalo Garramuno
49c61cd129
Added missing size(), clear(), empty() functions.
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9822 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-05-18 23:31:14 +00:00
Gonzalo Garramuno
315bd2da6e
Added new iterator changes to std.
...
This change does not break backwards compatability
with python, so all works.
The python stuff, however, will still not do all
that ruby can now do.
Updated manual to reflect the change and improve
typemap documentation on the ruby side.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9787 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-05-07 05:00:46 +00:00
Gonzalo Garramuno
c18feb2af3
Fixed type_name of some std classes.
...
Remove cmp_id from GC_VALUE.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9784 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-05-06 12:46:40 +00:00
Gonzalo Garramuno
4ead0ce7b2
Removed python crap from std/std_common.i
...
and moved it to python/std_common.i
Consolidated ruby code to use std/std_common.i
Added missing include to rubystdfunctors.swg
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9781 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-05-06 06:28:23 +00:00
Gonzalo Garramuno
8622de7595
Removed allocator from constructors.
...
Added copy constructors to stack/queue.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9780 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-05-06 05:54:48 +00:00
Gonzalo Garramuno
a7aa62ce68
Added an implementation of std_queue with tests.
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9779 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-05-06 05:25:58 +00:00
Gonzalo Garramuno
5e27a6828a
Added an implementation of std_stack.i with
...
proper tests.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9778 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-05-06 05:13:17 +00:00
Gonzalo Garramuno
1cf8fd332b
Added constructor that can take functors to all
...
containers that can use one.
Created file rubystdfunctors.swg to allow passing in
Ruby procs as functors to STL functions (swig-user list
suggestion for Python).
Fixed a bug in type_info() always failing for std::set.
Fixed a bug in type_info() always accepting any failed
conversion which could lead to overloaded functions to
fail when input wrong parameters.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9775 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-05-06 03:56:33 +00:00
Gonzalo Garramuno
a100f16bbd
Fixes to std_map and multimap. There's still a problem
...
of const correctness in the std swig STL library.
Need to bring it up in the swig-devel list.
Added new functions to swig_assert.
Changed some tests to reflect these changes.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9730 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-05-01 01:08:17 +00:00
William S Fulton
49be05f4fd
Common template for head of each file detailing licence, distribution and authors information
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8973 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-03-07 00:14:10 +00:00
Marcelo Matus
c3bb0f609c
fix std_map such that is not necessary to use %template() std::pair<xx,yy> everytime
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8907 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-02-27 16:28:38 +00:00
Marcelo Matus
b9c30d7738
more fixes for old Solaris compiler
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8839 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-02-18 08:17:23 +00:00
Marcelo Matus
45a045b9f1
fix for solaris + no stlport4
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8668 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-02-01 16:24:23 +00:00
Marcelo Matus
ba1e3f9ee3
add fragment warning and fixes
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8645 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-01-30 22:22:13 +00:00
Marcelo Matus
e7191fece9
fix/apply naturalvar
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8605 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-01-29 03:29:20 +00:00
William S Fulton
6abe1ccf2d
correct some function declarations to match the standard - VC++ fails otherwise
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8424 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-01-14 00:20:37 +00:00
William S Fulton
dae3d70612
moved from Lib directory
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8301 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-01-08 20:05:23 +00:00