Commit graph

169 commits

Author SHA1 Message Date
William S Fulton
52063a732b Consistent parameter names for std::pair 2019-02-14 22:44:27 +00:00
William S Fulton
6d27ead9c0 Add STL container copy constructors where missing
Also provide consistent copy constructor declarations.
2019-02-14 18:53:05 +00:00
William S Fulton
e26f6bb4e2 Add missing typedefs to std::vector + typedef corrections
Tests for std::vector of pointers added which check
 std::vector<T*>::const_reference and std::vector<T*>::reference
usage which gave compilation errors in Python and Perl which had
specialized these vectors incorrectly.
2019-02-13 22:46:28 +00:00
William S Fulton
a47c2553f5 Add missing typedefs to std::pair 2019-02-13 22:46:28 +00:00
William S Fulton
9dd33e6367 Add missing typedefs to std::map 2019-02-13 22:46:27 +00:00
William S Fulton
6d0c495fd0 Add missing parameter names in STL container wrappers
Mostly in STL copy constructors.

Best to have parameter names as they make their way into the wrappers in
some target languages.
2019-02-13 22:45:47 +00:00
William S Fulton
68e86614ff Create a consistent stl.i library file
Same file now for all languages except R which is still missing std_map.i.
Recent Java changes adding in std_set.i removed.
2019-02-12 18:46:05 +00:00
William S Fulton
eb151e43be Fix overloading for non-pointers and NULL - Guile 2018-12-30 09:26:33 +00:00
William S Fulton
c8fc6a0322 Fix guile std::map bug in out typemap 2018-10-09 19:46:27 +01:00
William S Fulton
ca287ae13b Add support for non-default compare template argument in std::map wrappers 2018-10-09 19:44:00 +01:00
Chris Hogan
38f2ab0c30 Fix garbage collection for guile >= 2.0.12 2018-07-16 14:07:53 -05:00
Geert Janssens
a95ceabb70 guile - drop GDB_INTERFACE related stuff
Guile itself has removed it a long time ago:
http://git.savannah.gnu.org/gitweb/?p=guile.git;a=commit;h=8510e39278161d3cbf8ec4ba87b123fe28763ed4
There's no need for it. I suspect it's just there because the
interface file was created based on the then real main source file of guile.
2018-04-20 08:36:49 +02:00
Geert Janssens
d1f7054b7e guile - replace obsolete scm_listify with scm_list_n
scm_list_n is available in all guile versions supported by swig, while
scm_listify no longer is in guile 2.2
2018-04-20 08:36:48 +02:00
Geert Janssens
46ab0c252d Fix off-by-one error
The condition only applies to guile 1.8 and older so it should really
have been '<2' all along. As we already have such a conditional block
earlier up, merge the two together as well.
2018-04-18 13:07:03 +12:00
William S Fulton
72ba741d1c Fix wrapping of references/pointers and qualifiers to member pointers
Also fix Go wrapping of member const function pointers.
2017-03-16 21:04:38 +00:00
Brian Caine
892f3592cc Redid the source and the text to check for SCM_MAJOR_VERSION >= 2 2017-01-27 19:06:33 +00:00
Brian Caine
a4ec4df5c9 Disabled pointer conversion when the relevant macros are unavailable (for Guile 1.8) 2017-01-27 19:05:59 +00:00
William S Fulton
d9db3cf628 Add some missing SWIGINTERN usage 2017-01-17 20:08:46 +00:00
Brian Caine
391bb79cba Added support for guile's native pointer type 2016-12-16 15:15:13 +13:00
Daniel Vollmer
dd7a5a6e6e Fix missed files 2016-09-17 19:01:42 +02:00
William S Fulton
624195f313 Fix unused variable warnings in Guile wrappers 2016-05-28 00:45:24 +01:00
William S Fulton
6b4e57245d Fix STL wrappers to not generate <: digraphs.
For example std::vector<::X::Y> was sometimes generated, now
corrected to std::vector< ::X::Y >.
2015-12-12 14:05:46 +00:00
William S Fulton
cf3be359cf Add c++11 strongly typed enum support for Guile 2014-11-28 23:27:22 +00:00
William S Fulton
3191473523 Fix compiler warnings in generated code when using -std=c++98 -std=gnu89 -pedantic -Wreturn-type 2014-05-24 14:13:19 +01:00
Karl Wette
d5b765d388 Whitespace cleanup of all Makefiles*
- some of the %.clean rules in the test-suite Makefiles were using a single tab
  as an empty rule, dangerous! I've replaced these with the safer '@exit 0'.
2014-05-02 20:06:11 +02:00
Geert Janssens
c6d03a6a9f Guile: make scm to string conversion work with non-ascii strings 2014-02-05 12:17:16 +01:00
William S Fulton
d15220cba4 Remove a couple of unused variable warnings in generated code 2013-10-18 19:10:42 +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
04b9037c70 Simplify and improve Guile FILE * in typemap
Fix incorrect special variable $name and remove unnecessary temporary
variable.
2013-05-16 19:21:59 +01:00
Geert Janssens
9110d47ea6 Use freearg instead of argout to free temp variable 2013-04-28 22:06:25 +02:00
William S Fulton
6a60efffd1 Some C++ experience needed
On 19/04/13 18:41, Geert Janssens wrote:
> Hi,
>
> I'm working through the failing testcases for guile. One testcase fails
> with a compilation error in some generated code based on std_map and
> std_pair. I know exactly where this generated code comes from, but my
> C++ knowledge is insufficient to understand the error, let alone remedy
> it. I gather some kind of const violation, but that's all I can read
> from it :( My hope is that someone used to working with stl will more
> easily understand it.
>
> So, if someone can help me understand the error and what the fix would
> be in C++, I can fix the corresponding .i file.
>
> This is the code snippet the causes the error:
>

<snip>

>
> /usr/lib/gcc/i686-redhat-linux/4.7.2/../../../../include/c++/4.7.2/bits/stl_pair.h:88:12:
> error: non-static const member ‘const std::pair<int, A*> std::pair<int,
> const std::pair<int, A*> >::second’, can’t use default assignment operator

This is the main problem - it is saying there is no default assignment
operator (because one of the members in pair is const). The solution is
to avoid assignment. I've attached a patch to do this plus some error
message corrections.

William
2013-04-28 22:06:25 +02:00
Geert Janssens
140829a826 guile: fix std_map.i "$1 not found" error 2013-04-28 22:06:25 +02:00
Geert Janssens
d689d9a860 Fix deprecation warnings for test suite under guile 2.0 2013-04-28 22:06:24 +02:00
Geert Janssens
b819d2a91e Drop guilegh interface
All of guile's interface files now use the scm interface.
This should not affect any users. Swig generated code
using the scm interface can be mixed with gh interface
using user code.
It does simplify maintenance of the guile swig code though.
2013-04-28 22:06:24 +02:00
Geert Janssens
3c47730803 Drop support for guile 1.6 and older 2013-04-28 22:06:22 +02:00
Geert Janssens
2c23a5d2cd Add support for guile 2.0: update swg and interface files
Note: only the scm interface is considered.
2013-04-28 22:06:22 +02:00
William S Fulton
1f4bd0bfa5 Minor extraneous makefiles tidy up 2013-04-19 22:47:29 +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
9bd2fb2cad Add rvalue reference typemaps 2013-01-24 20:27:28 +00:00
William S Fulton
2c74c90430 Fix for gcc warning -Wunused-value without triggering -Wunused-parameter
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13735 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-09-07 06:06:00 +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
924be5044d cosmetic style fix on pointer declarations
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12716 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-05-25 17:13:45 +00:00
William S Fulton
ac06518319 Patch #3191625 fixing overloading of integer types.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12692 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-05-19 19:49:48 +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
William S Fulton
2535297efb minor formatting change
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11995 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-04-23 06:44:47 +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
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
336b50b43d Add the optimal attribute to the out typemap for more optimal code generation when returning objects by value
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10450 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2008-05-14 22:12:31 +00:00
William S Fulton
a91e4906b5 Add newmemory parameter for SWIG_TypeCast
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10240 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2008-02-10 00:35:11 +00:00