Olly Betts
a5a6da9547
Fix comment typo
2016-12-13 12:19:09 +13:00
Olly Betts
2b4c1cdd5e
Fix "set but not used" warning
2016-12-13 11:40:45 +13:00
Olly Betts
971b94f5fe
Remove dead assignment
2016-12-13 11:29:30 +13:00
Olly Betts
2e98fddd78
Remove pointless casting away of const
2016-12-13 09:34:48 +13:00
Olly Betts
33c58818cd
Suppress unused parameter warning properly
...
Use SWIGUNUSEDPARM rather than assigning a dummy value to the parameter
(which then causing warnings about an assignment whose value is never
used.
2016-12-13 09:33:00 +13:00
William S Fulton
b9ad35733a
Install newer version of pep8 on Travis
2016-12-11 22:27:15 +00:00
William S Fulton
bdad87a242
Detect pep8 for both python 2 and python 3 and show version
2016-12-11 22:27:15 +00:00
Vadim Zeitlin
07ebbe84b8
Fix pep8 E265 error in testcase
2016-12-11 22:20:44 +00:00
Olly Betts
d21bb11153
[CI] Remove PHP 7.1 from allow_failures
...
Example reference now works
2016-12-06 16:46:40 +13:00
Olly Betts
2aa2219f28
Fix reference example under PHP 7.1
...
PHP 7.1 no longer supports calling methods with fewer parameters
than declared, so we need to generate __construct() with default
values for all but the first parameter.
2016-12-06 11:01:55 +13:00
Olly Betts
fa785cdd46
[PHP7] Send errors to stderr so they escape RUNPIPE
2016-12-06 08:35:22 +13:00
William S Fulton
3546d096a7
Test php 7.0 and 7.1 on Travis
...
- php-7.1 set as failing for now due to one broken example (references)
- Look for php 7.1 in configure.ac.
2016-12-04 22:48:09 +00:00
William S Fulton
f632ed34f7
Fix python_moduleimport test for -builtn
2016-12-03 16:07:59 +00:00
William S Fulton
2d8ce2a5d7
Slight tweak to empty lines generated in python proxy file
2016-12-03 15:56:09 +00:00
William S Fulton
bed5e5c105
Fix previous commit adding moduleimports option
2016-12-03 15:28:18 +00:00
Olly Betts
efa0c1de36
Fix travis for php->php5 rename
2016-12-02 13:25:28 +13:00
William S Fulton
2a42031b08
Custom Python module importing code
...
Add optional moduleimport attribute to %module so that the
default module import code can be overridden. See the
"Searching for the wrapper module" documentation in Python.html.
Example:
%module(moduleimport="import _foo") foo
$module also expands to the low-level C/C++ module name, so
the following is the same as above
%module(moduleimport="import $module") foo
Issue https://github.com/swig/swig/issues/769
2016-12-01 18:59:33 +00:00
Olly Betts
da1dd2ffd2
[PHP] Pick a default dtor which can't collide
2016-12-01 15:09:53 +13:00
Olly Betts
76a98b0b1a
[PHP] Emit at most one copy of the default dtor
...
Can reduce the wrapper source size significantly, though at least
with recent GCC the stripped compiled size seems unchanged.
2016-12-01 14:21:29 +13:00
Olly Betts
659116a1b2
Fix memory leaks introduced by previous commit
2016-12-01 14:04:10 +13:00
Olly Betts
4993991d28
[PHP] Only emit one copy of each distinct arginfo
...
Previously we emitted a separate one for every wrapped function,
but typically many functions have the same number of parameters
and combinations of parameters passed by reference or not.
This change significantly reduces both the size of the generated
wrapper, and of the compiled PHP extension module (e.g. by ~6% for
the stripped extension module for Xapian's PHP7 bindings).
2016-12-01 13:05:41 +13:00
Olly Betts
774311f11e
Add explicit check for expected PHP version
...
Should give a clearer error if PHP7 bindings are compiled against
PHP5 or vice versa.
2016-12-01 12:12:06 +13:00
Olly Betts
0ada392cee
[PHP] Fix minor misindentation in generated wrapper
2016-12-01 12:02:52 +13:00
Olly Betts
855b8dfcf6
Fix PHP5 examples to use php5 make targets
...
Only a subset had been updated.
2016-12-01 11:52:25 +13:00
Olly Betts
c8a5f84cd1
[PHP7] Wrap bool constants as PHP booleans
...
Leave PHP5 wrapping them as integers as this change could cause
incompatibilities.
Fixes issue https://github.com/swig/swig/issues/686 noted by Nishant
Gupta.
2016-11-30 17:19:11 +13:00
Olly Betts
d6c5f64ec3
Eliminate some differences between -help and the manual
2016-11-30 13:29:40 +13:00
Olly Betts
75a00cd15e
[PHP7] Make default C++ extension .cxx
...
This is SWIG's default for every language except PHP, and now is a
good time to make this change so that once we drop PHP5 support, we'll
have the same default everywhere. It's easy to override the default
with -cppext cxx to get the PHP5 behaviour.
2016-11-30 13:27:13 +13:00
Olly Betts
c7f593e1b1
Enable li_factory testcase for PHP
...
It already works and already even has a runtest!
2016-11-30 13:07:36 +13:00
Olly Betts
f4d8a7f78b
PHP now generates E_NOTICE for misspelled constant
2016-11-30 13:07:17 +13:00
Olly Betts
1169874f59
[PHP] Add support for PHP7.
...
PHP5's C extension API has changed substantially so you need to use
-php7 to specify you want PHP7 compatible wrappers.
Fixes https://github.com/swig/swig/issues/571
2016-11-30 13:05:59 +13:00
Olly Betts
bb98147965
Remove 'static' targets from PHP examples
...
The machinery these targets need to work no longer exists, and as
far as I can make out was removed before the code was put under
version control.
2016-11-30 12:15:42 +13:00
William S Fulton
3b03e6addd
Fix a few minor inconsistencies in the STL wrappers
...
Mainly to use a more normal constructor declaration and to enable
classes with more than one template parameter to be used as container types.
2016-11-29 19:35:09 +00:00
William S Fulton
7268f58c4c
Fix %rename override of wildcard %rename for templates
...
%rename(GlobalIntOperator) *::operator bool; // wildcard %rename
%rename(XIntOperator) X::operator bool; // fix now overrides first %rename above
OR
%rename(XIntOperator) X<int>::operator bool; // fix now overrides first %rename above
template<typename T> struct X {
operator bool();
...
};
%template(Xint) X<int>;
2016-11-28 22:50:52 +00:00
William S Fulton
5d50ebc769
CHANGES file entry for improved python division wrappers
2016-11-26 23:14:50 +00:00
William S Fulton
1079ba7ff8
Merge branch 'm7thon-python23-division-operators'
...
* m7thon-python23-division-operators:
[Python] improved wrapping of division operators
2016-11-26 22:00:21 +00:00
William S Fulton
c27b8622bd
Update C# compilers
2016-11-25 18:55:52 +00:00
William S Fulton
6109e217aa
Merge branch 'q-p-master'
...
* q-p-master:
Python: Fix mixed signedness warning for std::array
2016-11-25 07:39:24 +00:00
William S Fulton
9d5e37e7f9
Fix outdated info in Doc Makefile about pdf file generation
2016-11-25 07:39:06 +00:00
Daniel Vollmer
e4c5d82c71
Python: Fix mixed signedness warning for std::array
2016-11-23 22:21:46 +01:00
William S Fulton
0a22fa0df1
Missing transient keywords in Java proxy class
...
Further security exploit refinements to a1771c
2016-11-13 19:55:50 +00:00
Joseph C Wang
9566d68120
add changes
2016-11-12 08:06:32 +08:00
Joseph C Wang
377f756f49
Fix #555 - Add stdio.h
...
This corrects for compilers that need stdio.h
2016-11-12 00:28:39 +08:00
Joseph C Wang
bff182d556
fix #697 - miscounting comma in member lists
...
fix method for counting comma in member list
2016-11-12 00:23:41 +08:00
William S Fulton
6310cdb28a
html fix
...
[skip ci]
2016-11-03 19:26:38 +00:00
William S Fulton
108d82a886
Java doc update for directorin typemaps and Swig::LocalRefGuard
...
Motivated by fixes in patch #704
[skip ci]
2016-11-03 19:23:29 +00:00
William S Fulton
bdda0a0829
Python - fix compilation error when using -extranative and -builtin.
...
Closes #816
2016-11-02 22:00:54 +00:00
William S Fulton
20cd562e62
C++11 alias templates doc and changes file update
2016-11-02 10:05:39 +00:00
William S Fulton
c74397bfd0
Merge branch 'liorgold-alias-template'
...
* liorgold-alias-template:
Warning header cosmetics
Fix decl attribute in C++11 alias templates
Add C++11 alias templates
2016-11-02 09:10:59 +00:00
William S Fulton
257822cc6d
Warning header cosmetics
...
C++11 aliasing warnings are no longer needed as missing functionality
has been implemented.
2016-11-02 09:08:50 +00:00
William S Fulton
eda0779e76
C# std::array changes file addition
...
Fix C# warnings in test-case too.
2016-10-30 22:35:59 +00:00