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
John Lenz
b8629b298c
Fix list_vector.i in the guilescm test suite to work on amd64
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10069 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-10-29 02:12:13 +00:00
Matthias Köppe
c102472282
Another fix for test case apply_strings, for guile -gh, by adding explicit casts to the appropriate .
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10026 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-10-23 00:11:16 +00:00
Matthias Köppe
e6a07ee55b
Fix testcases apply_signed_char and apply_strings by adding explicit casts to the appropriate .
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10022 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-10-22 21:49:36 +00:00
Olly Betts
c836c81acb
When wrapping C++ code, generate code which uses
...
std::string::assign(PTR, LEN) rather than assigning
std::string(PTR, LEN). Using assign generates more efficient code
(tested with GCC 4.1.2).
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9936 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-09-17 20:10:57 +00:00
John Lenz
206e5c64af
Patch from Chris Shoemaker to clean up some warnings in the guile module
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9492 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-10-30 04:44:46 +00:00
John Lenz
56904f30d0
- Fix SF bug 1573892
...
- Minor change to chicken to make it work with version 2.5rc1
- add externaltest to chicken and guile modules
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9451 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-10-14 08:19:27 +00:00
Luigi Ballabio
2ba3707828
Fixes for std::pair typemaps
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9230 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-08-01 07:51:45 +00:00
William S Fulton
389b4813ca
more %apply char* fixes
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9093 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-05-05 23:26:57 +00:00
William S Fulton
2d24918a97
ensure %apply with char*, unsigned char* and signed char* works
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9072 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-05-03 20:58:19 +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
Matthias Köppe
6cbd9a9b3c
[Guile -scm] Add typemaps for "long long"; whether the generated code
...
compiles, however, depends on the version and configuration of Guile.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8936 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-03-03 04:00:31 +00:00
Matthias Köppe
b63f275984
[MzScheme] Typemaps for all integral types now accept the full range
...
of integral values, and they signal an error when a value outside the
valid range is passed.
[Guile] Typemaps for all integral types now signal an error when a
value outside the valid range is passed.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8844 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-02-19 19:28:42 +00:00
Matthias Köppe
06dc2432b7
(free_swig_member_function): Add missing return.
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8656 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-01-31 02:45:48 +00:00
Matthias Köppe
dadce146a2
Add some more std::string typemaps.
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8632 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-01-30 19:01:35 +00:00
William S Fulton
fdd16d7234
std::string global and member variables are wrapped as strings by default
...
No need to use the %apply const std::string& { std::string* } trick anymore
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8623 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-01-29 21:21:47 +00:00
Matthias Köppe
6ba7c1600b
Define and use %argument_fail, %as_voidptr.
...
Use SWIG_IsOK, SWIG_CheckState.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8622 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-01-29 20:36:57 +00:00
Matthias Köppe
985a5928d4
(SWIG_Guile_ConvertPtr): Use constants SWIG_OK, SWIG_ERROR.
...
(SWIG_Guile_MustGetPtr): Use SWIG_IsOK macro.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8621 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-01-29 20:35:52 +00:00
Matthias Köppe
edba3add6b
Add support for member function pointers.
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8617 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-01-29 18:47:18 +00:00
William S Fulton
b83ac2646b
Fix for typedef to void *
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8529 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-01-23 21:47:16 +00:00
William S Fulton
5ea4b63548
Resort back to SWIG-1.3.27 STL exception handling. The generic std_except.i does not work due to some problem with SWIG_exception
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8306 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-01-08 21:21:24 +00:00
William S Fulton
2387c32254
Each target language now has its own std_deque.i like the other STL wrappers.
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8303 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-01-08 20:08:44 +00:00