Commit graph

3,103 commits

Author SHA1 Message Date
Olly Betts
7ba0652677 Create director_common.swg for language-indep code
Move -DSWIG_DIRECTOR_STATIC handling there, so this is now supported for
all languages with director support, not just Python and PHP.
2015-03-12 19:51:11 +13:00
Olly Betts
c4268c369b Fix cut-and-paste typo 2015-03-12 17:50:52 +13:00
Ian Lance Taylor
9ad497c08e [Go] Add -cgo option, required for Go version 1.5 and later. 2015-03-02 14:03:33 -08:00
Ian Lance Taylor
1dd401899f [Go] Change SWIG directors to use a handle instead of a Go pointer.
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.
2015-02-22 11:09:58 -08:00
Simon Marchetto
4b2ccd2892 scilab: fix compilation error on Windows 2015-02-13 12:07:27 +01:00
William S Fulton
2947b711d9 Warning fixes in Go cdata library
GCC warnings -Wpointer-to-int-cast and -Wdeclaration-after-statement
2015-02-11 23:34:16 +00:00
William S Fulton
1ef899a57b Merge branch 'stricter-warnings'
* stricter-warnings:
  Go changes for wrappers to compile as ISO C90
  Scilab typecheck typemaps fix for C90
  No error for one Javascript node warning
  Warning fix in testcase for Javascript node
  nested_extend_c testcase fix when compiled by C++ target languages
  Temporarily remove -Werror for Scilab testing
  C90 fixes for Javascript JSC
  There are a couple of testcases that aren't compliant and supression via pragmas doesn't work for gcc < 4.8
  Warning suppression change
  Scilab typemap fixes for C89
  compiler warning suppression correction in testcase
  Suppress pedantic warnings in C# testcases
  Suppress pedantic warnings in testcases
  Pedantic warning fix in testcase
  pedantic warning fix for D wrappers
  Travis testing to use testflags.py for setting CFLAGS and CXXFLAGS
  Add travis build for error-declaration-after-statement branch
2015-02-11 23:33:26 +00:00
William S Fulton
4e86210e74 Scilab typecheck typemaps fix for C90
Fix mix of mixed declarations and code.
Also redo these typemaps so that the SWIG preprocessor comments don't appear
in the generated code.
2015-02-11 23:32:45 +00:00
William S Fulton
59ff3e6a3a C90 fixes for Javascript JSC 2015-02-11 23:32:45 +00:00
William S Fulton
0236435c48 Scilab typemap fixes for C89 2015-02-11 23:24:40 +00:00
William S Fulton
ef75735e9b pedantic warning fix for D wrappers 2015-02-11 23:24:39 +00:00
Björn Esser
4490f19dcc Deal with Apple's deprecated 'AssertMacros.h' from Carbon-framework 2015-02-10 16:40:56 +01:00
Ian Lance Taylor
0a021a938e [Go] Remove all generated calls to _swig_makegostring, as it will no
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.
2015-02-05 10:15:37 -08:00
Ian Lance Taylor
603e3b49b3 Merge branch 'master' of git://github.com/swig/swig 2015-02-04 16:09:51 -08:00
Ian Lance Taylor
2562c1eb41 [Go] Remove all calls to _swig_goallocate in the Go runtime, except
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.
2015-02-04 16:08:44 -08:00
William S Fulton
2f22e9c889 Typo fix in error messages from swigarch.i 2015-02-04 23:07:18 +00:00
Witold Wolski
70cccf38fd add @SuppressWarnings("unused") to constructors generated using SWIG_JAVABODY_TYPEWRAPPER macro 2015-02-04 10:12:37 +01:00
Simon Marchetto
adc4b788df Merge remote-tracking branch 'origin/master' into gsoc2012-scilab
Conflicts:
	.gitignore
	.travis.yml
	configure.ac
2015-01-26 10:50:20 +01:00
Olly Betts
8fe85e764f Eliminate "found" flag for simpler, clearer code 2015-01-24 15:12:29 +13:00
Olly Betts
2a43178021 Fix comment grammar 2015-01-24 14:57:05 +13:00
DavidMazary
3667d0c583 Remove unused assignment
The value of module_head is not used after this assignment in this branch of the function.
2015-01-23 15:58:50 -05:00
William S Fulton
d3051c5b04 Merge branch 'ConroyJ-master'
* ConroyJ-master:
  Updated usage string for -cppcast/-nocppcast in octave.cxx
  Attempting fixes for Octave shared_ptr support
2015-01-22 20:06:55 +00:00
William S Fulton
fd8dcf44bf C++11 strongly typed enum fixes for directors
Tests added for previous commit. Further refinements to patch #308 and
fixes #307.
2015-01-15 19:48:07 +00:00
Ahti Legonkov
6a7250d71b Fix #307. 2015-01-14 18:59:53 +02:00
Olly Betts
0dd685bad2 Fix PHP crash in director_finalizer 2015-01-14 15:38:55 +13:00
William S Fulton
9d87b9f099 Revert introduction of python:defaultargs feature
See issue #294
2015-01-12 21:35:47 +00:00
Thomas Trocha
4e7af7db80 [lua/luarun] change return type from int to void on functions not returning anything
Using emscripten compiler to crosscompile to javascript lead to "traps" on this functions which results in a crash
2015-01-11 15:34:07 +01:00
William S Fulton
38ba81811e Fix Python default argument handing broken since swig-3.0.3
Default values are no longer generated as Python code by default.
They must be explicitly turned on using the "python:defaultargs" feature.

Closes #294
Closes #296

The problems in these two issues when "python:defaultargs" is turned
on still need to be fixed and should be addressed in separate patches.
The important thing is the default code generation is now fixed.
2015-01-09 00:34:17 +00:00
Olly Betts
9ca6f78b07 Update link to point to 3.0 docs 2015-01-08 11:16:48 +13:00
Simon Marchetto
78705a5175 gateway source is moved into wrapper source 2015-01-07 18:04:29 +01:00
Jeremy
e301457a43 Attempting fixes for Octave shared_ptr support 2015-01-05 10:53:06 -05:00
William S Fulton
cb4d0dbba5 %constant and structs support for Lua 2014-12-29 17:36:56 +00:00
Robert Stone
03570f85f2 [Perl] tidy "warning: duplicate 'extern' declaration specifier" when building generated code under clang 2014-12-27 20:45:11 -08:00
William S Fulton
1db561cf08 Improve Python builtin and %constant structs
Tweak to previous commit from issue #250 for C compatibility.
Set self to zero too.
2014-12-18 07:01:08 +00:00
Paweł Tomulik
0ad384bb28 fixed python global object constants
Fix for Python and -builtin
Fix from Github issue #250
2014-12-18 07:01:08 +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
b45c3737c8 Add c++11 strongly typed enum support for D 2014-11-28 08:13:27 +00:00
William S Fulton
3efd3affbd Add c++11 strongly typed enum support for PHP 2014-11-27 19:59:20 +00:00
David Nadlinger
278308cfd3 D: Fix exception handling support.
The original code was ported from the C# module. It looks like it
tried to avoid reading TLS data by using a shared counter. However,
without also synchronizing on the counter check (or using atomics)
the code is racy. While the races might be benign (the thread that
sets the exception also increments the counter, so when there is
actually an exception, the visible value will always be non-zero
even if it is outdated), they are still undefined behavior,
strictly speaking. Additionally, just using TLS isn't expensive
either.
2014-11-06 23:04:36 +01:00
David Nadlinger
95e8db7c62 D: Fix class/method name ambiguity in test-suite/c_delete.i.
There might be other cases where this happens when $dclassname
is used for code emitted into the proxy class itself, but so
far, there are none in the test suite or any bug reports.
2014-11-06 23:04:35 +01:00
William S Fulton
6029b2f7d8 Fix for 'self' being used as a parameter name 2014-10-30 07:22:59 +00:00
William S Fulton
ede1e9544c Fix R Lib files and testcase failing due to new preprocessor checks
Fixes unknown preprocessor directive error introduced in #217
commit 255c929c56
These were probably intended as script comments using # when C/C++
comments using // or /* */ should have been used.
2014-10-29 23:11:09 +00:00
William S Fulton
7d4af72dde Revert "Fix when is 'self' used as a parameter name in Python"
This reverts commit a6efdb7999.
2014-10-29 09:42:11 +00:00
William S Fulton
a6efdb7999 Fix when is 'self' used as a parameter name in Python
Fix corner case for variable names called 'self' after merging in patch #201
2014-10-28 07:07:44 +00:00
David Nadlinger
732bb8f8ec Merge pull request #205 from timotheecour/dev
Use core.atomic.atomicOp to mutate shared variables
2014-10-24 20:17:38 +02:00
Simon Marchetto
aba56486fe scilab: fix std::string length issue 2014-10-23 11:08:34 +02:00
Simon Marchetto
06614ebb79 scilab: fix compilation warnings in primitive_types test 2014-10-21 10:03:29 +02:00
William S Fulton
3dcc501ac0 Spelling fix 2014-10-21 07:55:07 +01:00
Simon Marchetto
f93e23b32f scilab: fix matrix2 example compilation warnings 2014-10-20 17:44:46 +02:00
Simon Marchetto
d3afd65698 scilab: fix compilation error in scilab 5.3.3 2014-10-20 17:03:17 +02:00