Commit graph

17,284 commits

Author SHA1 Message Date
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
23373e9ffd Revert "Octave: cleanup/restructure library files"
This reverts commit bf12d76d03.

Reverting a series of Octave commits for re-applying again without
incorrect whitespace changes.
2014-10-09 19:34:02 +01:00
William S Fulton
457ba43989 Revert "Octave: whitespace/style cleanup of Doc/Manual/Octave.html"
This reverts commit 56fefcc7e0.

Reverting a series of Octave commits for re-applying again without
incorrect whitespace changes.
2014-10-09 19:34:00 +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
b1595014e7 Revert "Octave: disable optimization of tests for faster compiles/less memory usage"
This reverts commit 8e37bcf1a8.

Reverting a series of Octave commits for re-applying again without
incorrect whitespace changes.
2014-10-09 19:33:55 +01:00
William S Fulton
f5d714378a Revert ".travis.yml: reduce Octave make jobs to 3"
This reverts commit 90c32a11c2.

Reverting a series of Octave commits for re-applying again without
incorrect whitespace changes.
2014-10-09 19:33:53 +01:00
William S Fulton
15961d581e Revert "Revert "Suppress Octave failing the build""
This reverts commit 492b1b0339.

Reverting a series of Octave commits for re-applying again without
incorrect whitespace changes.
2014-10-09 19:33:51 +01:00
William S Fulton
851f122bfe Revert "Octave: remove unused function SwigOctType::help_text()"
This reverts commit 8c7e578279.

Reverting a series of Octave commits for re-applying again without
incorrect whitespace changes.
2014-10-09 19:33:48 +01:00
William S Fulton
a9c9c9c848 Revert "Octave: remove unused field SwigOctClass::constructor_doc"
This reverts commit afa9affcd9.

Reverting a series of Octave commits for re-applying again without
incorrect whitespace changes.
2014-10-09 19:33:40 +01:00
Karl Wette
afa9affcd9 Octave: remove unused field SwigOctClass::constructor_doc 2014-10-05 20:54:20 +02:00
Karl Wette
8c7e578279 Octave: remove unused function SwigOctType::help_text() 2014-10-05 20:53:27 +02:00
Karl Wette
492b1b0339 Revert "Suppress Octave failing the build"
- This reverts commit fea2fc137e.
- Failures were probably due to gcc running out of memory
- Disabling optimization of Octave tests should both increase
  compile times and reduce memory usage, and reducing number
  of make jobs to 3 should also allow for more memory per job
2014-10-05 14:56:34 +02:00
Karl Wette
90c32a11c2 .travis.yml: reduce Octave make jobs to 3
- Allow for more memory per job to prevent gcc failures
- Disabling optimization should give enough speedup to compensate
2014-10-05 14:56:34 +02:00
Karl Wette
8e37bcf1a8 Octave: disable optimization of tests for faster compiles/less memory usage
- Filter out all but -g... and -W... flags from OCTAVE_CXXFLAGS
- Use AX_CHECK_COMPILE_FLAG() to check if -O0 is supported, if so
  add to end of OCTAVE_CXXFLAGS to ensure optimization is disabled
- Also run mkoctfile under "env -" to protect it from environment
- Also use more standard-compliant sed expressions
2014-10-05 14:56:33 +02: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
56fefcc7e0 Octave: whitespace/style cleanup of Doc/Manual/Octave.html 2014-10-04 19:19:32 +02:00
Karl Wette
bf12d76d03 Octave: cleanup/restructure library files
- Restructure runtime code into declarations, function
  and class definitions, and initialisation code
- Rename internal functions/types to follow SWIG_Octave...
  or SwigOct... naming styles
- Style/comment/whitespace cleanups
2014-10-04 19:18:32 +02:00
Karl Wette
6c04378e20 Octave: simplify Examples/octave/example.mk 2014-10-04 19:18:31 +02:00
Karl Wette
5ac475cbcd Octave: whitespace/indentation/style cleanup of octave.cxx
- Used "astyle -A10 -s2 -N -p -H -U -k1" for style cleanup
- Replaced NewString("") with NewStringEmpty()
- Used 'w' instead of 'f' for Wrapper() objects
2014-10-04 13:29:46 +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
5c07625d05 Octave: ignore test suite generated files 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
Oliver Buchtala
0a110e5138 Merge branch 'master' of https://github.com/swig/swig
Conflicts:
	CHANGES.current
2014-09-30 22:21:24 +02:00
Oliver Buchtala
08c8df5fdd Announced changes after merging #195 and #216. 2014-09-30 22:20:06 +02:00
Ian Lance Taylor
0d6cebc7c4 [Go] In configure script, require Go 1.1 or later. 2014-09-30 12:42:21 -07:00
William S Fulton
af1093d956 Add changes note for #207
[skip ci]
2014-09-30 20:37:14 +01:00
William S Fulton
412d9813f9 Typo fix in Android docs
[skip ci]
2014-09-30 20:29:17 +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
Richard
00457b6599 Making generated code more readable 2014-09-30 12:33:49 -03:00
Oliver Buchtala
6bd8e9f2c8 Merge branch 'zittix-patch-1' 2014-09-30 17:02:30 +02:00
Oliver Buchtala
2f26948ac5 Merge branch 'patch-1' of git://github.com/zittix/swig into zittix-patch-1 2014-09-30 17:02:14 +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
William S Fulton
f81042057b Add changes note for #208 - array_functions initialisation 2014-09-27 16:55:46 +01:00
William S Fulton
54118d1d61 Merge branch 'tsuna-master'
* tsuna-master:
  Initialize C++ arrays created by array_functions' new_foo().
2014-09-27 16:51:47 +01:00
William S Fulton
a9ff9ab2b9 Add changes note for #187 - Ruby data sharing fix 2014-09-27 15:14:14 +01:00
William S Fulton
1fea434400 Merge branch 'lefticus-ruby_macos_static_data_conflicts'
* lefticus-ruby_macos_static_data_conflicts:
  Fix shared data problem on MacOS 10.9 with xcode 5.1
2014-09-27 15:12:04 +01:00
William S Fulton
d03ff2b262 Changes note for #168 - JNI leak fix 2014-09-27 14:48:13 +01:00
William S Fulton
0d34a0f0bf Merge branch 'pingany-director_local_jstring_leak'
* pingany-director_local_jstring_leak:
  Use more conventional naming for generated Java LocalRefGuard variables
  Make more use of LocalRefGuard in Java
  fixup! Patch of http://sourceforge.net/p/swig/mailman/message/29816385
  Patch of http://sourceforge.net/p/swig/mailman/message/29816385
2014-09-27 14:33:31 +01:00
William S Fulton
f4964f5fb3 Use more conventional naming for generated Java LocalRefGuard variables 2014-09-27 14:32:03 +01:00
William S Fulton
2f5bf397ae Make more use of LocalRefGuard in Java 2014-09-27 13:56:11 +01:00
Ian Lance Taylor
4b64ce71a3 [Go] Adjust generated code to work with upcoming Go 1.4 release. 2014-09-25 12:10:11 -07: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
15152596f2 Change file for #228 and #229 2014-09-17 22:19:07 +01:00
Richard Pastrick
11d07bb45b add bool array type to arrays_csharp.i [issue #228] 2014-09-17 22:17:36 +01:00
William S Fulton
fea2fc137e Suppress Octave failing the build
li_std_vector testcase causing g++ internal compiler error
2014-09-16 19:19:48 +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
Ian Lance Taylor
39433f12e4 Fix one case where we test goout rather than has_goout. The effect
was to incorrect use a return statement before the goout typemap
code.
2014-09-12 17:46:21 -07: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