Commit graph

16,160 commits

Author SHA1 Message Date
William S Fulton
053856893c Add gsoc2009-matevz for Travis testing 2013-10-10 07:28:44 +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
de5e0c8655 C++11 testing moved to a configure option
Use './configure --enable-cpp11-testing' to enable the C++11 test.
Off by default for now.
2013-10-08 20:12:18 +01:00
William S Fulton
738cc36aab Rename all C++0x to C++11 and cpp0x to cpp11 2013-10-07 20:37:00 +01:00
William S Fulton
3fcbb40af9 Remove incorrectly and newly introduced assert
Was failing in li_boost_shared_ptr.i for some languages. A similar
testcase has been added into naturalvar_more.i.
2013-10-05 02:16:02 +01:00
William S Fulton
e186d2176a Fix %naturalvar and templated methods using enums
%naturalvar was not being picked up - use the symbol table instead for
looking up the feature.

use_naturalvar_mode() has been moved to Language class (not strictly necessary though)
2013-10-04 23:08:33 +01:00
William S Fulton
c4d40c7b64 PHP directors - generate call_user_function on one line 2013-10-01 22:13:57 +01:00
Olly Betts
12708c9241 Fix typos 2013-09-25 17:29:33 +12:00
William S Fulton
173c4b3bba Grab .travis.yml file from master to turn on Travis testing 2013-09-20 19:39:30 +01:00
William S Fulton
ab2a8b7379 Document Java char **STRING_ARRAY typemap fix 2013-09-20 18:47:46 +01:00
Gavin Kinsey
43032339d0 Fixed a memory leak for java STRING_ARRAY
The allocation loop uses size, so the free loop should do the same,
not size-1.
2013-09-20 18:44:44 +01:00
William S Fulton
d0cb2b73db Remove X11 detection during configure
X11 is not used anywhere.
2013-09-18 00:40:24 +01:00
William S Fulton
37bccfd517 Bump version to 3.0.0
SWIG 3 is open for business - looks go crazy!
2013-09-18 00:40:17 +01:00
William S Fulton
b0b8d4c87e Add hint about pushing tags post release
[ci skip]
2013-09-15 22:42:19 +01:00
William S Fulton
80b108eb70 Add swig-2.0.11 release info and date 2013-09-15 15:11:43 +01:00
William S Fulton
0431664b18 Guile OUTPUT typemap fix
Fixes 'attempt to free a non-heap object' in some OUTPUT typemaps.
2013-09-15 10:43:49 +01:00
William S Fulton
f01b52c44c Tweak 'make beautify-file'
unix2dos and dos2unix were renamed to todos and fromdos - they aren't
really needed (on Linux anyway), so removed.
2013-09-15 01:35:28 +01:00
William S Fulton
f618a69990 Better detection of Ruby shared library extension
Use Config to detect dll extension (needs to be .so for Ruby 1.9 on Cygwin)
2013-09-14 17:32:54 -07:00
William S Fulton
cb4a23b2df Cygwin test-suite fix for tcl 8.5 on Cygwin 2013-09-14 15:52:42 -07:00
William S Fulton
c4e29fb686 Remove mkstemp replacement for ccache-swig on Cygwin
Cygwin 1.7.0 as well as Cygwin 1.7.24 seem to be working okay
Cygwin 1.7.24 gives gcc warning about dangerous use of mktemp
2013-09-14 15:51:50 -07:00
William S Fulton
ba9baefdd9 sed portability fix creating swigwarn.swg 2013-09-14 12:53:45 +01:00
Sylvestre Ledru
7a88729c87 Remove trailing spaces in the generated code.
No functional changes
2013-09-13 10:02:39 +02:00
Artem Serebriyskiy
c3f3880d0c Lua static member access improvements.
1) Static members and static functions inside class can be accessed as ModuleName.ClassName.FunctionName (MemberName respectively). Old way aka ModuleName.ClassName_FunctionName still works.
2) Same goes for enums inside classes: ModuleName.ClassName.EnumValue1 etc.
3) More 'runme' tests for lua + modifications to existing tests to test new changes.

Code is loosely based upon python implemenation of the same thing.

Patch #62.
2013-09-12 21:32:26 +01:00
William S Fulton
a91cd0bc5c Infinity is now by default an acceptable value for type 'float'.
This fix makes the handling of type 'float' and 'double' the same. The implementation requires the
C99 isfinite() macro, or otherwise some platform dependent equivalents, to be available.
2013-09-12 07:28:12 +01:00
William S Fulton
f47075ec99 Smart pointer documentation improvement 2013-09-03 23:58:05 +01:00
William S Fulton
67659773cc Remove some Java references from C# module 2013-09-02 19:14:20 +01:00
William S Fulton
4492a3d76b Document Include Lua error locus in SWIG error messages patches.
Closes #81
2013-08-30 07:11:43 +01:00
Miles Bader
c746ae7a0f Include Lua error locus in SWIG error messages
This is standard information in Lua error messages, and makes it much
easier to find bugs.
2013-08-30 06:56:33 +01:00
Miles Bader
663c41e248 Add Lua runtime helper functions for error-handling
Add two helper functions to the Lua runtime, "SWIG_Lua_pusherrstring"
and "SWIG_Lua_pushferrstring".

These are like the standard Lua functions lua_pushstring and
lua_pushfstring respectively, except that the strings are prefixed
with the location of the innermost Lua call-point (as generated by
luaL_where).
2013-08-30 06:56:33 +01:00
William S Fulton
ada7dd92e4 Fix testcase name 2013-08-29 22:49:59 +01:00
William S Fulton
f55ff50dd5 Skip the UTF-8 BOM of including files.
For avoiding illegal token error when parsing include files which have the UTF-8 BOM.

Closes #75.
2013-08-29 19:22:50 +01:00
Vadim Zeitlin
9efaf954c7 Add support for std::map<> comparator template argument for C#.
Allow exporting maps using non-default comparison function.

Closes #77
2013-08-29 19:08:15 +01:00
Olly Betts
6efe3d61f2 Strip trailing whitespace 2013-08-29 11:16:58 +12:00
William S Fulton
b58dabced9 %implicitconv is improved for overloaded functions.
Like in C++, the methods with the actual types are considered before trying implicit conversions.
2013-08-28 20:30:46 +01:00
William S Fulton
1cc735df5e %implicitconv will now accept None where the implicit conversion takes a C/C++ pointer.
Problem highlighted by Bo Peng on the swig-user mailing list. SF patch #230.
2013-08-28 20:28:15 +01:00
Olly Betts
628b4710e5 [Python] Fix clang++ warning in generated wrapper code. 2013-08-24 08:40:08 +12:00
Olly Betts
b477cb66be Use offsetof() rather than icky homemade equivalent 2013-08-24 08:34:50 +12:00
Kris Thielemans
a495b5a985 Remove SwigPyObject_print and SwigPyObject_str, and make the generated wrapper use the default python implementations, which will fall back to repr (for -builtin option).
Advantages:
- it avoids the swig user having to jump through hoops to get print to
  work as expected when redefining repr/str slots.
- typing the name of a variable on the python prompt now prints the
  result of a (possibly redefined) repr, without the swig user having to
do any extra work.
- when redefining repr, the swig user doesn't necessarily have to
  redefine str as it will call the redefined repr
- the behaviour is exactly the same as without the -builtin option while
  requiring no extra work by the user (aside from adding the
%feature("python:slot...) statements of course)
- the patch simplifies pyrun.swg a tiny bit.

Disadvantage:
- default str() will give different (but clearer?) output on swigged
  classes compared to unpatched swig

SF Bug #326
2013-08-07 20:22:03 +01:00
William S Fulton
a0af86811d Travis builds - add in apt-get update
php tests were failing. Travis suggest running this before any install - http://about.travis-ci.org/docs/user/build-configuration/#Installing-Packages-Using-apt
2013-08-06 21:16:11 +01:00
William S Fulton
80f8d1d922 Fix for missing C++ code in std::multimap wrappers.
%template for a std::multimap generated uncompilable code unless a
%template for a std::map of the same template types was also coded up.

This patch is needed in conjunction with previous commit - 5f1fff1849

Closes #64
Closes #65
2013-08-06 07:02:49 +01:00
Andrew Simmons
5f1fff1849 Copied std::pair<> fragment from Lib/std/std_map.i into Lib/std/std_multimap.i. This fixes an error when a std::multimap template is wrapped by itself. 2013-07-25 18:23:45 +01:00
William S Fulton
83178a1fe4 Correction for detecting invalid Octave options 2013-07-16 23:05:59 +01:00
Karl Wette
b28de20869 Octave: fixups to previous configuration patch
- remove unneeded test -n "$OCTAVE"
- do not rely on Octave returning non-zero status for unrecognised option;
  search first line of output for 'unrecognized' instead
2013-07-16 20:59:50 +01:00
Karl Wette
479df82616 Octave: more robust configuration
- do not rely on --eval argument to find mkoctfile, instead assume it
  is in the same directory as octave itself (which it always should be)
- check Octave options to make sure they are supported, including
  --no-window-system to prevent warnings if building without an X server
- disable Octave if any vital tests fail
2013-07-16 20:59:50 +01:00
joequant
e8c6384f77 add regression tests for SEXP return values 2013-07-14 20:29:37 +08:00
joequant
93b63969f9 change to allow file SEXP return values 2013-07-14 20:28:17 +08:00
William S Fulton
d0af4f50d3 Add %pythonbegin directive.
For adding code at the beginning of the generated .py file.
2013-07-05 06:30:16 +01:00
William S Fulton
eb98c0be99 Correct dates in recent commits to CHANGES file 2013-07-05 06:25:07 +01:00
William S Fulton
1c44078751 Improve testing of %pythonprepend and %pythonappend 2013-07-02 20:00:17 +01:00
William S Fulton
ace8fcd972 SWIG_AsWCharPtrAndSize improper operation if cptr NULL
SF bug #1327

This doesn't have any noticeable effect with the usage of
SWIG_AsWCharPtrAndSize as shipped by SWIG, but could be a problem if a
user is using this function with cptr equal to zero and psize is non-zero
 - the length would be incorrectly set due to the call to PyUnicode_GetSize
failing.
2013-07-02 18:58:56 +01:00