| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We aim to produce code that works with C90 or C++98 so we can't
assume snprintf() is available, but it almost always is (even
on systems from before it was standardised) so having a way to
use it is helpful.
Enable this automatically if the compiler claims conformance
with at least C90 or C++98 and check SWIG_HAVE_SNPRINTF to allow
turning on manually, but disable if SWIG_NO_SNPRINTF if defined.
The fallback is to call sprintf() without a buffer size check -
checking after the call is really shutting the stable door after
the horse has bolted, and most of our uses either have a fixed maximum
possible size or dynamically allocate a buffer that's large enough.
Fixes: #2502 (sprintf deprecation warnings on macos)
Fixes: #2548
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add Swig_obligatory_macros which must be called by each
target language to define SWIG_VERSION correctly
in the generated code, as well as the language specific
macro SWIGXXX where XXX is the target language name.
Drop the #ifdef SWIGXXX that was previously generated -
I can't see the point of this and if users are defining
this macro somehow, then users will need to change this
Closes #1050
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Ensure that SWIG_VERSION is defined both at SWIG-time and in the
generated C/C++ wrapper code (it was only defined in the wrapper
for some target languages previously).
SWIGGO and SWIGJAVASCRIPT are now defined in the generated wrappers
to match behaviour for all other target languages.
Stop defining SWIGVERSION in the wrapper. This only happened as a
side-effect of how SWIG_VERSION was defined but was never documented and
is redundant.
The new testcase also checks that SWIG is defined at SWIG-time but not
in the generated wrapper, and that exactly one of a list of
target-language specific macros is defined.
Fixes #1050
|
|
|
|
|
|
|
| |
Go, Guile, Racket, Scilab: Add throws typemaps for std::string so that
thrown string exception messages can be seen.
Test all language for std::string throws typemaps
|
| |
|
|
|
|
| |
To fix overloading when using these types.
|
|
|
|
|
|
|
|
|
|
|
|
| |
For implementing full move semantics when passing parameters by value.
Based on SWIGTYPE && and std::unique_ptr typemaps which implement move
semantics.
Added for all languages, but untested for: Go, Ocaml, R, Scilab (and
unlikely to be fully functional for same reasons as for std::unique_ptr
support).
Issue #999
|
|
|
|
|
|
|
|
|
| |
SWIG now converts a C/C++ NULL pointer into a null value by calling
scheme_make_null(), so that scheme's null? is true for a NULL C/C++
pointer value.
Consistency with Guile and needed for a pending commit for handling
NULL and std::unique_ptr.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Replicated Java implementation.
Fully implemented for:
- C#
- D
- Guile
- Javascript (UTL)
- Lua
- MzScheme
- Octave (UTL)
- Perl (UTL)
- PHP
- Python (UTL)
- Ruby (UTL)
- Tcl (UTL)
PHP std::auto_ptr std::unique_ptr minor tweaks and testcase corrections
|
| |
|
|
|
|
|
|
|
| |
Equivalent to Guile implementation.
Slight tweak to proxy ownership was required by adding in
the own member to swig_mz_proxy.
|
|
|
|
|
| |
More removal of casts in the out typemaps when copying objects to enable
C++ compilers to possibly make use of move semantics.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Enhance SWIGTYPE "out" typemaps to use std::move when copying
objects, thereby making use of move semantics when wrapping a function returning
by value if the returned type supports move semantics.
Wrapping functions that return move only types 'by value' now work out the box
without having to provide custom typemaps.
The implementation removed all casts in the "out" typemaps to allow the compiler to
appropriately choose calling a move constructor, where possible, otherwise a copy
constructor. The implementation alsoand required modifying SwigValueWrapper to
change a cast operator from:
SwigValueWrapper::operator T&() const;
to
#if __cplusplus >=201103L
SwigValueWrapper::operator T&&() const;
#else
SwigValueWrapper::operator T&() const;
#endif
This is not backwards compatible for C++11 and later when using the valuewrapper feature
if a cast is explicitly being made in user supplied "out" typemaps. Suggested change
in custom "out" typemaps for C++11 and later code:
1. Try remove the cast altogether to let the compiler use an appropriate implicit cast.
2. Change the cast, for example, from static_cast<X &> to static_cast<X &&>, using the
__cplusplus macro if all versions of C++ need to be supported.
Issue #999
Closes #1044
More about the commit:
Added some missing "varout" typemaps for Ocaml which was falling back to
use "out" typemaps as they were missing.
Ruby std::set fix for SwigValueWrapper C++11 changes.
|
| |
|
| |
|
|
|
|
| |
Also provide consistent copy constructor declarations.
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
|
|
|
| |
Mostly in STL copy constructors.
Best to have parameter names as they make their way into the wrappers in
some target languages.
|
|
|
|
|
| |
Same file now for all languages except R which is still missing std_map.i.
Recent Java changes adding in std_set.i removed.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
- 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'.
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
Examples/Makefile.in
Examples/guile/Makefile.in
Lib/php/php.swg
Makefile.in
Source/CParse/parser.y
configure.ac
|
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| | |
|
|\ \
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |
| |
| |
| | |
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13734 626c5289-ae23-0410-ae9c-e8d60b6d4f22
|
| |
| |
| |
| |
| |
| | |
string classes
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13120 626c5289-ae23-0410-ae9c-e8d60b6d4f22
|
| |
| |
| |
| |
| |
| | |
size_type, key_type and mapped_type.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13092 626c5289-ae23-0410-ae9c-e8d60b6d4f22
|
|/ |
|
|
|
|
| |
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11986 626c5289-ae23-0410-ae9c-e8d60b6d4f22
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
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
|
|
|
|
| |
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10240 626c5289-ae23-0410-ae9c-e8d60b6d4f22
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9293 626c5289-ae23-0410-ae9c-e8d60b6d4f22
|
|
|
|
| |
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9230 626c5289-ae23-0410-ae9c-e8d60b6d4f22
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
at runtime. This allows for code to be generated at some site, and
distributed without the need for SWIG.
The distribution needs only the header filesfor which the code has been
generated. Linking is done at runtime, by loading the dynamic libraries.
Functions are resolved when needed.
Though somewhat inefficient, it provides for a way to distribute code
or binaries that are independent of the version of the installed libraries,
which comes in especially handy for e.g. binding against Gtk.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9211 626c5289-ae23-0410-ae9c-e8d60b6d4f22
|
|
|
|
|
|
| |
authors information
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8973 626c5289-ae23-0410-ae9c-e8d60b6d4f22
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
No need to use the %apply const std::string& { std::string* } trick anymore
Please test if possible, I can't run these languages.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8618 626c5289-ae23-0410-ae9c-e8d60b6d4f22
|
|
|
|
| |
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8303 626c5289-ae23-0410-ae9c-e8d60b6d4f22
|
|
|
|
|
|
| |
language
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8232 626c5289-ae23-0410-ae9c-e8d60b6d4f22
|
|
|
|
| |
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7871 626c5289-ae23-0410-ae9c-e8d60b6d4f22
|
|
|
|
| |
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7352 626c5289-ae23-0410-ae9c-e8d60b6d4f22
|
|
|
|
| |
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7292 626c5289-ae23-0410-ae9c-e8d60b6d4f22
|
|
|
|
| |
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7221 626c5289-ae23-0410-ae9c-e8d60b6d4f22
|