Commit graph

4,015 commits

Author SHA1 Message Date
Olly Betts
c2972b8bf0 [Python] Deal with an integer as the default value of a bool
parameter in the C++ prototype.  Fixes github #327, reported by
Greg Allen.
2015-05-07 16:25:32 +12:00
Olly Betts
8fc7796643 Merge pull request #403 from LindleyF/master
Zero-initialize swig_override in the director constructor.
2015-05-07 13:26:04 +12:00
Olly Betts
b19d506db7 Suppress warning 325 "Nested class not currently supported (Foo
ignored)" when Foo has already been explicitly ignored with
"%ignore".
2015-05-05 18:07:49 +12:00
William S Fulton
428b6176df Add support for friend templates, including operator overloading.
Closes #196.
2015-05-05 06:48:25 +01:00
Ian Lance Taylor
e044dc4405 [Go] Fix Go multimap example to use Swig_AllocateString and swigCopyString. 2015-05-04 17:16:44 -07:00
Lindley French
3ce7867a0a Added missing untracked files. 2015-05-04 15:27:51 -07:00
Lindley French
bd0fa56705 Added director_ref test. 2015-05-04 15:22:14 -07:00
Ian Lance Taylor
48263f4802 [Go] Make sure that arguments for which use memcpy when calling C are
still live after the call.  This ensures that they will not be
collected if the GC runs during the call.
2015-05-04 15:11:31 -07:00
William S Fulton
140782054a Fix unresolved symbols in testcase 2015-05-02 00:25:15 +01:00
William S Fulton
cf29b90a2b Fix comments and newlines within operator definitions
Fix handling of conversion operators where the operator is split over multiple lines or
has comments within the operator type.

Also fix similar problem with normal operators which gave a syntax error if split over
multiple lines or had a comment within the operator declaration.

Closes #401
2015-05-01 19:22:38 +01:00
Olly Betts
50ba1ea6fa Adjust testcase for unknown directive error
Fixes testcase failure caused by fix for issue #394.
2015-04-30 15:27:12 +12:00
Olly Betts
d26a505dad Ignore unknown preprocessor directives which are inside an inactive
conditional (github issue #394, reported by Dan Wilcox).
Regression introduced in 3.0.3.
2015-04-30 13:40:42 +12:00
Vadim Zeitlin
6988b00aba Fix handling of default arguments after ignored ones in Python.
Don't skip checking subsequent arguments just because one of them has "in"
typemap with numinputs=0 attribute.

Add a unit test showing the problem which is relatively rare as it doesn't
happen for the class methods and is hidden unless autodoc feature is used for
the global functions.

Closes #377.
2015-04-27 23:17:14 +02:00
William S Fulton
605b95d706 Merge branch 'yazug-ignore_generated_example_files'
* yazug-ignore_generated_example_files:
  Guile gitignore and consistent naming in examples
  Add language specific files to gitignore
  gitignore for python
  Add generated director header files to .ignore
  fix typo of Perl in .gitignore
  Add some generated example files to the .gitignore list
2015-04-26 00:23:24 +01:00
William S Fulton
d7f37f3974 Guile gitignore and consistent naming in examples
Use my-guile for the executable for all the augmented examples
Fix gitignore for Guile
2015-04-26 00:17:42 +01:00
William S Fulton
416277b3a5 Python code generated with '-builtin -modernargs' segfaults for any method taking zero arguments.
Also fixes: "SystemError: error return without exception set" during error checking
when using just -builtin and the incorrect number of arguments is passed to a class
method expecting zero arguments.

Closes #256
Closes #382
2015-04-24 21:08:17 +01:00
Vadim Zeitlin
5569d91bd0 Fix handling of "default" typemap in Python.
Use "compact" arguments form for the function if "default" typemap is defined
for any of its arguments to allow omitting this argument when calling it from
Python.

Closes #377.
2015-04-23 15:11:05 +02:00
Vadim Zeitlin
0eae8a8efa Fix handling of NULL default argument values for pointer types.
Accept not only manifest pointer types (such as e.g. "void *") but also types
that are typedefs for pointer types when checking whether C++ value of 0 must
be represented as 0 or None in Python.

Closes #365, #376.
2015-04-23 15:11:02 +02:00
William S Fulton
b886a54fce Merge branch 'amaeldoe-master'
* amaeldoe-master:
  Add python runtime test for dynamically added attributes
  Attribute of SWIG wrapped classes instances were overwritten on __init__()
  Fix SwigPyObject->dict memory leak
  Make __dict__ accessible for Python builtin classes
2015-04-11 12:37:11 +01:00
William S Fulton
1a64e74c46 Add python runtime test for dynamically added attributes
From #320
2015-04-11 12:35:58 +01:00
William S Fulton
fa4223e496 Fix parsing of extern "C" and typedef for example:
extern "C" typedef void (*Hook2_t)(int, const char *);
extern "C" typedef int Integer;

Closes #375
2015-04-07 21:34:23 +01:00
William S Fulton
3d61e84be6 Add CSHARPOPTIONS for users to customise C# compiler flags 2015-04-04 02:17:57 +01:00
William S Fulton
ec7e7145aa Portability fixes for python example 2015-04-04 02:17:57 +01:00
William S Fulton
f6e25f5786 PY3 fixes for import_package example 2015-04-04 02:17:57 +01:00
William S Fulton
2347e87451 CSharp test-suite support on windows
- Add pathconvert tool to convert to a windows path for input files for
  C# compiler
- Simplify vcfilter
2015-04-04 02:17:56 +01:00
Olly Betts
dba8d4a7ea Add regression test for 6b6b360
Reported in issue#368 by clintonstimpson.
2015-03-28 11:26:13 +13:00
Olly Betts
226b4dec5b Probe for camlp4 in configure
See issue #364.
2015-03-25 12:44:05 +13:00
Simon Marchetto
cfebdc36af scilab: compile examples & test-suite with debug infos 2015-03-24 16:52:18 +01:00
Olly Betts
064f18131d Fix "check_quant" target in ocaml testsuite
Previously it would be confused by testcases names which were a suffix
of another testcase name (e.g. name and keyword_rename).
2015-03-18 15:49:48 +13:00
Olly Betts
eec4e7e2ee Use the ocamlc configure found 2015-03-18 13:12:12 +13:00
Olly Betts
87a1892719 Trim trailing blank lines 2015-03-16 14:41:15 +13:00
Ian Lance Taylor
4c399718d0 [Go] Add -I $(SRCDIR) to CGO_CPPFLAGS. 2015-03-09 10:06:04 -07:00
Ian Lance Taylor
b1311b0d88 [Go] Use -I ../../.. instead of -I $(pwd) to see if this helps with
Travis.  (Travis is reporting failures that I can not recreate.)
2015-03-08 20:30:47 -07:00
Ian Lance Taylor
a6a9a89524 [Go] Fix overloading on an undefined type. 2015-03-06 17:51:30 -08: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
40f5b1ecc6 [Go] Fixes so that the go_subdir_import test will work with gccgo. 2015-02-22 11:01:24 -08:00
Misha Seltzer
beed5f3479 Changed to using $() instead of ${} in the makefile for consistancy 2015-02-17 10:27:45 +02:00
Misha Seltzer
9e2c75c2a8 Fix running tests when the test build outputs are generated in a different folder. (Fixes Travis' test runs). 2015-02-17 10:27:45 +02:00
Misha Seltzer
fcf2b68e84 Fixed errors due to last sync. 2015-02-17 10:27:45 +02:00
Misha Seltzer
8da4d20308 Fixed SWIG go for cases when SWIG %import-s another package which is located in a subdirectory. 2015-02-17 10:27:45 +02:00
William S Fulton
f8491f8ab0 Merge branch 'clang-warning-fixes'
* clang-warning-fixes:
  Correct Examples makefile for guile
  Suppress clang warning in testcase
  preproc_constants warning suppression when using clang
  Warning suppression in li_std_vector_extra testcase for clang
  preproc_constants warning suppression when using clang
  Modify preproc testcase to remove clang warning
  Rename test warning suppressions when using clang
  primitive_types testcase improvement
2015-02-11 23:44:20 +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
ec9e347a07 Warning fix in testcase for Javascript node
Fix warning when using node to compile Javascript wrappers:
warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
2015-02-11 23:32:45 +00:00
William S Fulton
ed084f30f2 nested_extend_c testcase fix when compiled by C++ target languages
Javascript v8 and node compiles the wrappers as C++, fix this warning:
anonymous type with no linkage used to declare variable ‘<anonymous struct> THING’ with linkage
2015-02-11 23:32:45 +00:00
William S Fulton
a73a783fcd Warning suppression change
Earlier gcc (4.7) will warn about unknown warning pragmas!
-Wpedantic suppression is only available in 4.8 and later
2015-02-11 23:32:29 +00:00
William S Fulton
9402f14393 compiler warning suppression correction in testcase 2015-02-11 23:24:40 +00:00
William S Fulton
3a10bba9ee Suppress pedantic warnings in C# testcases 2015-02-11 23:24:40 +00:00
William S Fulton
ec1eac5b72 Suppress pedantic warnings in testcases 2015-02-11 23:24:40 +00:00
William S Fulton
a4ba9528b4 Pedantic warning fix in testcase 2015-02-11 23:24:39 +00:00
William S Fulton
c84838fded Correct Examples makefile for guile
C++ testcases were not rebuilding
2015-02-11 19:49:21 +00:00