| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
Make argc and argv test works in C.
Signed-off-by: Erez Geva <ErezGeva2@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
Not fully implemented and Untested.
Go's implementation needs fixing to fully support typemaps
before this can be done.
OCaml implementation does not have support for releasing ownership
which is required to add error checking preventing double deletes.
|
|
|
|
|
|
|
| |
Rearrange generation of director methods and rename
receiver argument from p to swig_p.
Fixes #2245
|
|
|
|
|
|
|
| |
The directorin typemaps in the director methods now use std::move on the
input parameter when copying the object from the stack to the heap prior
to the callback into the target language, thereby taking advantage of
move semantics if available.
|
|
|
|
|
|
|
|
| |
We no longer support Go < 1.2 so we can default intgo to ptrdiff_t
and uintgo to size_t.
Fixes #683
Fixes #2233
|
|
|
|
| |
Fixes #2214
|
|
|
|
|
|
|
| |
Let Go code pass "nil" when calling a C++ function that accepts a
pointer to a class. The Go "nil" will be treated as a C++ "nullptr".
Fixes #2203
|
| |
|
|
|
|
|
|
|
| |
Also clean up the handling of int* and int& to convert between the C
type int and the Go type int, which are often different sizes.
Fixes #2210
|
|
|
|
|
|
| |
This is necessary for regex-like renames (where you can't use the #define trick
as is done in many of the %keywordwarn directives). It's now unnecessary to print
the "renaming to '`x`'" code explicitly by the kw.swg files.
|
|
|
|
|
| |
Support std::array in Golang
Closes #2045
|
|
|
|
| |
Instead rely only on documented and exported interfaces.
|
|
|
|
|
| |
It only worked for Go versions before 1.5, which is more than five
years ago and long-unsupported.
|
| |
|
|
|
|
| |
Also provide consistent copy constructor declarations.
|
|
|
|
|
|
| |
Numerous missing typedefs added.
std::list<T*>::const_reference and std::list<T*>::reference
specialization typedef fixes.
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
| |
Changes the location of the director code wrt to the generated _wrap.h
file to fix throw macro skullduggery in the director_throws testcase
(see previous commit).
|
|
|
|
|
|
| |
returning pointers by reference.
Closes #1167
|
|
|
|
|
|
|
|
|
|
| |
Add director.swg for Go as was completely absent.
This is just the start of a common exception handling approach to directors.
An exception thrown in a Java director method will be propogated back to
Java via a C++ DirectorException.
DirectorException throws typemap for Java is fully working, all other languages need work.
DirectorException throws typemap for Perl added just to fix compilation errors.
Add director_exception_catches test.
|
|
|
|
| |
Also fix Go wrapping of member const function pointers.
|
| |
|
|
|
|
|
|
| |
This exception occurs when dynamic_cast<T&> fails.
Fixes #783.
|
|
|
|
|
|
| |
by value.
Closes #434
|
| |
|
|
|
|
|
| |
directors that return string values; add a trailing 0 byte
when treating Go string as C char*.
|
|
|
|
| |
From https://github.com/swig/swig/pull/262.
|
| |
|
|
|
|
|
|
|
| |
With this change, generated code for golang treats char* as a string but
treats signed char* and unsigned char* as normal pointers. This seems to
fit better with the expected behavior, as the latter are more often used
as non-string data.
|
|
|
|
|
| |
still live after the call. This ensures that they will not be
collected if the GC runs during the call.
|
|
|
|
|
|
| |
_swig_makegostring will no longer work in the Go 1.5 release.
Keep the existing code so that existing users with current versions of
Go will not break suddenly.
|
| |
|
|
|
|
|
|
|
| |
In future releases of Go it will not be possible to pass Go pointers
into C/C++ code. The handle is automatically translated back to the
Go value using a Go map. Since directors must be explicitly deleted,
we can reliably use that call to remove the handle from the map.
|
|
|
|
| |
GCC warnings -Wpointer-to-int-cast and -Wdeclaration-after-statement
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
longer as of Go 1.5. In Go 1.5 or later user calls to
_swig_makegostring will fail at link time.
Instead, use goout and godirectorin typemaps to allocate strings in Go
code.
Change the Go typemaps support to ignore empty strings, so that we can
define empty strings for regular types so that %apply will override
the definitions for string types.
Fix the gccgo code to wrap SwigCgoCallback around all godirectorin
typemaps.
Add a few newlines after typemap code so that the typemaps don't have
to include them.
|
|
|
|
|
|
| |
for the one from _swig_makegostring. _swig_goallocate can not work
with the future Go 1.5 release. When using Go 1.5 attempts to call
_swig_goallocate will fail at link time.
|
|
|
|
|
| |
Tests added for previous commit. Further refinements to patch #308 and
fixes #307.
|
|
|
|
|
|
| |
variable. Only set the variable if another global variable is true,
but that variable is always false. The effect is that the variable is
never written, but as far as the compiler is concerned it might escape.
|
| |
|
| |
|
|
|
|
|
|
|
| |
- in configure.ac: modify sed expression to only look at first line of
gccgo --version, extract the last numeric token, and remove periods;
this parses e.g. "gccgo (Debian 4.7.2-5) 4.7.2"
- in goruntime.swg: fix typo in __GNUC_PATCHLEVEL__ (SF Bug #1298)
|