Commit graph

3,405 commits

Author SHA1 Message Date
William S Fulton
42da040a07 Show mono info in 'make check-csharp-version'
For diagnosing configuration of mono runtime
2014-10-14 19:22:25 +01:00
William S Fulton
8441e3eab4 Java gc tests failure fix
Sometimes the GC just won't run the finalizers, so we output a warning
instead of throwing an error, so now the test-suite will pass but with a
warning if the number of objects is not as expected.

Was notably failing on RHEL6 using OpenSUSE build testing with openjdk-1.6
2014-10-14 19:22:25 +01:00
William S Fulton
17721f4682 Correct cpp11_function_objects testcase
Fixes SWIG warning
2014-10-13 19:38:47 +01:00
Yann Diorcet
aeacff3b14 Improve cpp11_function_objects test for python 2014-10-11 20:20:10 +02:00
William S Fulton
78b904764a Merge branch 'diorcety-python_property'
* diorcety-python_property:
  Changes file entry for Python director property fix
  Python: Fix property access with director

Conflicts:
	CHANGES.current
2014-10-11 00:22:21 +01:00
William S Fulton
ef4d44e92d Fix syntax error in autodoc testcase when using Python 2.4 and earlier 2014-10-10 23:56:14 +01:00
William S Fulton
d10efb658e Merge branch 'python-builtin-test-suite'
* python-builtin-test-suite:
  Add Python -builtin Travis testing
  Bypass Python exmples not supported by -builtin
  Remove Python swigrun example
  Display testname when running the import_packages Python examples
  Fix Python 3 import_packages/relativeimport2 example clean
  Fixes when using python -builtin and STL container wrappers.
  Bypass Python tests not supported by -builtin
  Bypass Python tests not supported by -builtin
  Bypass Python tests not supported by -builtin
  Bypass Python tests not supported by -builtin
  Bypass Python tests failing with -builtin
  Bypass Python tests throwing base classes as exceptions for -builtin
  Add some more Python -builtin tests that don't work
  Disable test not relevant for Python -builtin

Conflicts:
	CHANGES.current
2014-10-10 22:49:11 +01:00
William S Fulton
97f6731e3c Revert "Octave: simplify Examples/octave/example.mk"
This reverts commit 6c04378e20.

Reverting a series of Octave commits for re-applying again without
incorrect whitespace changes.
2014-10-09 19:34:04 +01:00
William S Fulton
bfa3d378ec Revert "Octave: drop support for Octave versions older than 3.2.0"
This reverts commit 952eee8f59.

Reverting a series of Octave commits for re-applying again without
incorrect whitespace changes.
2014-10-09 19:33:58 +01:00
William S Fulton
808d4b4798 Bypass Python exmples not supported by -builtin
Builtin classes as exceptions not supported, so don't run these aspects
of the examples when using -builtin.
2014-10-07 20:58:41 +01:00
William S Fulton
da394fae80 Remove Python swigrun example
By default it doesn't work as it does not call the CEO's __del__ method
as indicated in the comments. __del__ is called with -builtin but
then the base class's __del__ is not available and so it errors out.
Python 3 and -builtin goes into an endless loop. So removing as
hopelessly broken.
2014-10-07 20:58:41 +01:00
William S Fulton
a9c6196f71 Display testname when running the import_packages Python examples
For easier identification of what is running in these examples.
2014-10-07 20:58:40 +01:00
William S Fulton
9834a69c18 Fix Python 3 import_packages/relativeimport2 example clean
runme3.py files are generated and should not be checked in
2014-10-07 20:58:40 +01:00
William S Fulton
49038b30b7 Bypass Python tests not supported by -builtin
Builtin types can't inherit from pure-python abstract bases
2014-10-07 20:58:40 +01:00
William S Fulton
ab79441151 Bypass Python tests not supported by -builtin
The base class is needed for the builtin class hierarchy, like many
other languages
2014-10-07 20:58:40 +01:00
William S Fulton
185d65895f Bypass Python tests not supported by -builtin
There are a number of autodoc comment differences when using -builtin.
Some of which might need fixing, but for now we'll accept them as they
are.
2014-10-07 20:58:39 +01:00
William S Fulton
afcd61388a Bypass Python tests not supported by -builtin
The old static syntax (e.g., dc.new_A() rather than dc.A()) is not
supported with -builtin
2014-10-07 20:58:39 +01:00
William S Fulton
9f1b051c16 Bypass Python tests failing with -builtin
Reverse operators not supported in builtin types
2014-10-07 20:58:39 +01:00
William S Fulton
bbad7f96ab Bypass Python tests throwing base classes as exceptions for -builtin
Throwing builtin classes as exceptions is not supported
2014-10-07 20:58:30 +01:00
Karl Wette
952eee8f59 Octave: drop support for Octave versions older than 3.2.0
- Latest non-supported version is 3.0.5, released 2009-04-09
- Earliest supported version is 3.2.0, released 2009-06-05
2014-10-04 19:40:52 +02:00
Karl Wette
6c04378e20 Octave: simplify Examples/octave/example.mk 2014-10-04 19:18:31 +02:00
Karl Wette
a93d5eac4e Octave: turn on autodoc in examples, so that feature is tested 2014-10-04 13:28:46 +02:00
Karl Wette
0d16b19122 Octave: remove '\' line continuation in director_detect_runme.m
- Deprecated in Octave 3.8.1
2014-10-04 13:28:46 +02:00
William S Fulton
34eb4b15d3 Add some more Python -builtin tests that don't work 2014-10-02 19:08:58 +01:00
Yann Diorcet
558af639bd Python: Fix property access with director 2014-10-01 11:07:02 +02:00
William S Fulton
0fb34cb019 Disable test not relevant for Python -builtin 2014-10-01 07:57:23 +01:00
William S Fulton
a06dff17ad Merge pull request #207 from johan-hake/johanhake/fix-206-swig-relative-import
Fix issue with relative import when using single header file import [Python]
2014-09-30 20:22:55 +01:00
Oliver Buchtala
53d7fc8a16 Merge branch 'Richie765-master'
Conflicts:
	CHANGES.current
2014-09-30 18:46:25 +02:00
Johan Hake
de4f30bd3c Small fixes to the relative import fix.
-- Now the tests actually runs
  -- Corrected the syntax for the fix in the yacc file
2014-09-29 17:37:41 +02:00
Thomas Maslach
de6b433cb1 Fix Python crash when using -threads iterating containers
Also fixes li_std_vector_enum testcase when run with -threads.

Patch supplied on swig-devel mailing list on 12 Sep with details...

==============================================
I just wanted to mention that I found a crash issue in bug..

I am using SWIG 2.0.11 with python and have –threads enabled.  I have a C++ std::vector that I instantiate in SWIG with %template.  I also have a method in a class that returns this vector.  I also include std_vector.i, btw..

When I iterate like so:

children = Action.getActionList()
for child in children:
  pass

Everything is fine..

When I iterate like this:

for child in Action.getActionList()
  pass

Product crashes.

The problem is the following.  This code gets called first:

SWIGINTERN PyObject *_wrap_delete_SwigPyIterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;

  if(!PyArg_UnpackTuple(args,(char *)"delete_SwigPyIterator",1,1,&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SwigPyIterator" "', argument " "1"" of type '" "swig::SwigPyIterator *""'");
  }
  arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1);
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    delete arg1;
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}

Note the SWIG_PYTHON_THREAD_BEGIN_ALLOW/END_ALLOW. In between those two statements, we delete arg1.  That in turn will eventually end up in this code:

namespace swig {
  class SwigPtr_PyObject {
  protected:
    PyObject *_obj;

  public:
    … snip! …
    ~SwigPtr_PyObject()
    {
      Py_XDECREF(_obj);
    }

Uh-oh!  We call Py_XDECREF when we aren’t supposed to because we are in a SWIG_PYTHON_THREAD_BEGIN_ALLOW/END_ALLOW section!

This takes care of the issue:

namespace swig {
  class SwigPtr_PyObject {
  protected:
    PyObject *_obj;

  public:
    … snip! …
    ~SwigPtr_PyObject()
    {
      SWIG_PYTHON_THREAD_BEGIN_BLOCK;
      Py_XDECREF(_obj);
      SWIG_PYTHON_THREAD_END_BLOCK;
    }

There are several other methods in this class that use the Python API, but don’t have the BEGIN/END block defined.  I’m not sure if they are required for all of them, but I believe they are..

I have attached a modified pyclasses.swg with what I believe are the correct changes.  This code is from 2.0.11, but as far as I can tell, it’s the same as what is in 3.0.2…

Apologies for not doing more here (making/running tests, getting it in the code repository, etc..), but I’m under some pressure to get some unrelated things done…
2014-09-23 22:33:25 +01:00
William S Fulton
783e816d89 Testcase warning suppression 2014-09-23 19:54:13 +01:00
William S Fulton
8128b1e12f For Android examples, replace hard coded tool names with those detected at configure time. 2014-09-15 19:44:18 +01:00
Olly Betts
1a99212c2c [PHP] Add support for specifying any PHP interfaces a wrapped class
implements, e.g.: %typemap("phpinterfaces") MyIterator "Iterator";
2014-09-12 12:48:37 -03:00
Olly Betts
e12322df86 [PHP] Fix throwing a PHP exception through C++ from a subclassed
director method - PHP NULL gets returned by the subclassed method
in this case, so the directorout typemap needs to allow that (at
least if an exception is active).
2014-09-11 13:09:08 -03:00
Olly Betts
fa94a29df4 Fix comment typo 2014-09-11 13:06:17 -03:00
Ian Lance Taylor
acaaa0f31f [Go] Add goargout typemap. 2014-09-09 11:28:04 -07:00
Olly Betts
0dd7b61c57 Fix segmentation faults with directors in PHP >= 5.4 2014-09-09 13:39:30 -03:00
Ian Lance Taylor
be145043df Add run test case for argout.i. 2014-09-07 15:44:12 -07:00
Ian Lance Taylor
1addbb46a8 [Go] Add imtype, goin, goout, godirectorin, and godirectorout
typemaps, to support writing Go code to convert between types.
2014-09-05 17:54:19 -07:00
Olly Betts
6eaec9ce7c Update expected output for pp_constant error test 2014-09-04 09:29:20 -03:00
Olly Betts
b9fe7b5f00 Disable case in pp_constant.i which never actually worked 2014-09-03 17:18:11 -03:00
Olly Betts
d3b3ff2c78 Fix comment typo 2014-09-02 23:12:35 -03:00
Richard
a3946e1520 Remove unneeded parameter 2014-08-28 19:46:52 -05:00
Richard
b8d7cc21b9 Use macros for V8 items 2014-08-28 19:46:52 -05:00
Richard
c23375d39d Show V8 Deprecated warnings 2014-08-28 19:46:51 -05:00
Richard
2a662502a5 Fixed buffer overrun 2014-08-28 19:46:49 -05:00
Richard
b0afc7a9a5 Allow to specify V8 version, for example:
V8_VERSION=0x031511 ENGINE=v8 make check-javascript-test-suite
2014-08-28 19:46:49 -05:00
Richard
19d2976962 Allow to specify V8 version, for example
V8_VERSION=0x031511 ENGINE=v8 make check-javascript-examples
2014-08-28 19:46:49 -05:00
Robert Stone
488aed4224 apply SF Patch #350 and add testcase 2014-08-15 21:47:10 -07:00
Johan Hake
1dd297ad9d Fix issue with relative import when using single header file import.
-- The commit propagates the package option to the newly create
     module node so it is recognized by SWIG
  -- Added a relativeimport test for this combination
     (in lack of py3 I was not able to test it with py3 but it
      "should just work")
2014-08-12 21:48:26 +02:00