Merge branch 'master' into javascript

* master:
  Fix some typos
  [PHP] The generated __isset() method now returns true for read-only properties.
  Eliminate needless casting away const from string constants
  Fix typos
  Fix missing ")" in code example
  Fix comment typos
  Fix m4 quoting of checks for yodl2man and yodl2html versions
  Fixed errors from previous commit.
  Removed all unnecessary asserts
  Remove unused variable
  Another go html fix
  Fix intgosize arg documentation
  Optimize metamethods inheritance resolving
  Updating documentation
  Whitespace cleanup of Example Makefiles
  .gitignore: ignore Lib/swigwarn.swg
  Fixing unused variable warnings
  Finish implementation with proxy functions
  Remove duplicate declarations of strtoimax and strtoumax in inttypes.i
  Ignored enum fixes.
  Further shift operator regression fixes
  Fix use of shift operators in expressions regression since 3.0.0
  Fix seg fault with extra ) brackets and >>
  More efficient end of template bracket (>>) handling
  beautify scanner.c
  Tidy up scanner.c
  DOH readme correction
  Fix typo in -lua -help output
  Remove extra </div>
  Update documentation for deprecation and removal of Close()
  Fix segfault when there are too many closing round brackets in parsed code
  Refix operator<< definition giving a syntax error
  Fix regression in 3.0.0 where legal code following an operator<< definition might give a syntax error.
  Remove unnecessary block from PHP version of SWIG_exception macro
  [PHP] Fix wrapping director constructors with default parameters with a ZTS-enabled build of PHP.
  Fix potential bugs found by Coverity analysis
  Eliminate unused parameter from SWIG_Php_GetModule()
  Fix comment typo
  Fix compiler warnings in generated Lua code
  [PHP] Pass the ZTS context we already have to avoid needing to call TSRMLS_FETCH, which is relatively expensive.
  [PHP] Pass ZTS context through to t_output_helper() so it works with a ZTS-enabled build of PHP.  Reported by Pierre Labastie in github PR#155.
  Lua test-suite can now be run out of source
  Fix out of source test-suite runs for Octave
  Add runtime test for commit 7a96fba836
  Add C++11 constexpr runtime test
This commit is contained in:
William S Fulton 2014-05-01 19:01:20 +01:00
commit f51be1ca5c
150 changed files with 935 additions and 410 deletions

View file

@ -1500,12 +1500,11 @@ Create a File object wrapper around an existing <tt>FILE *</tt> object.
</div>
<p>
<b><tt>int Close(String_or_FILE *f)</tt></b>
There's no explicit function to close a file, just call <tt>Delete(f)</tt> -
this decreases the reference count, and the file will be closed when the
reference count reaches zero.
</p>
<div class="indent">
<p>Closes a file. Has no effect on strings.</p>
<p>
The use of the above I/O functions and strings play a critical role in SWIG. It is
common to see small code fragments of code generated using code like this:
@ -1529,8 +1528,6 @@ Printf(f, "%s\n", s);
Similarly, the preprocessor and parser all operate on string-files.
</p>
</div>
<H2><a name="Extending_nn21"></a>39.6 Navigating and manipulating parse trees</H2>
@ -2832,7 +2829,6 @@ int Python::top(Node *n) {
Delete(f_header);
Delete(f_wrappers);
Delete(f_init);
Close(f_begin);
Delete(f_begin);
return SWIG_OK;

View file

@ -94,9 +94,9 @@ swig -go -help
</tr>
<tr>
<td>-intgo-type-size %lt;s%gt;</td>
<td>-intgosize &lt;s&gt;</td>
<td>Set the size for the Go type <tt>int</tt>. This controls the size
that the C/C++ code expects to see. The %lt;s%gt; argument should
that the C/C++ code expects to see. The &lt;s&gt; argument should
be 32 or 64. This option is currently required during the
transition from Go 1.0 to Go 1.1, as the size of <tt>int</tt> on
64-bit x86 systems changes between those releases (from 32 bits to
@ -125,7 +125,7 @@ swig -go -help
</tr>
<tr>
<td>-soname %lt;name%gt;</td>
<td>-soname &lt;name&gt;</td>
<td>Set the runtime name of the shared library that the dynamic linker
should include at runtime. The default is the package name with
".so" appended. This is only used when generating code for

View file

@ -990,7 +990,7 @@ The current list of operators which can be overloaded (and the alternative funct
<li><tt>__sub__</tt> operator-
<li><tt>__mul__</tt> operator *
<li><tt>__div__</tt> operator/
<li><tt>__neg__</tt> unary minus
<li><tt>__unm__</tt> unary minus
<li><tt>__call__</tt> operator<tt>()</tt> (often used in functor classes)
<li><tt>__pow__</tt> the exponential fn (no C++ equivalent, Lua uses <tt>^</tt>)
<li><tt>__concat__</tt> the concatenation operator (SWIG maps C++'s <tt>~</tt> to Lua's <tt>..</tt>)
@ -1037,7 +1037,29 @@ It is also possible to overload the operator<tt>[]</tt>, but currently this cann
void __setitem__(int i,double d); // i is the index, d is the data
};
</pre></div>
<p>
C++ operators are mapped to Lua predefined metafunctions. Class inherits from its bases the following list of metafunctions ( thus inheriting the folloging
operators and pseudo-operators):</p>
<ul>
<li><tt>__add__</tt>
<li><tt>__sub__</tt>
<li><tt>__mul__</tt>
<li><tt>__div__</tt>
<li><tt>__unm__</tt>
<li><tt>__mod__</tt>
<li><tt>__call__</tt>
<li><tt>__pow__</tt>
<li><tt>__concat__</tt>
<li><tt>__eq__</tt>
<li><tt>__lt__</tt>
<li><tt>__le__</tt>
<li><tt>__len__</tt>
<li><tt>__getitem__</tt>
<li><tt>__setitem__</tt>
<li><tt>__tostring</tt> used internally by Lua for tostring() function. __str__ is mapped to this function
</ul>
<p>No other lua metafunction is inherited. For example, __gc is not inherited and must be redefined in every class. <tt>__tostring</tt> is subject to a special handling. If absent in class and in class bases, a default one will be provided by SWIG</p>
</p>
<H3><a name="Lua_nn19"></a>27.3.12 Class extension with %extend</H3>
@ -1073,7 +1095,7 @@ Now we extend it with some new code
return tmp;
}
bool operator==(const Complex&amp; c)
{ return ($self-&gt;re()==c.re() &amp;&amp; $self-&gt;im()==c.im();}
{ return ($self-&gt;re()==c.re() &amp;&amp; $self-&gt;im()==c.im());}
};
</pre></div>
<p>

View file

@ -4690,7 +4690,7 @@ public:
C++ constructor, thus creating a new <tt>foo</tt> object.
By default, SWIG will assign the new Ruby object a "free" function.
When the Ruby object is garbage collected, the "free" function will be
called. It in turn will call <tt>Foo's</tt> destructor.</p>
called. It in turn will call <tt>Foo</tt>'s destructor.</p>
<p>Next, consider this code: </p>