*** empty log message ***
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6090 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
06c6ab33f8
commit
164cff7217
1 changed files with 63 additions and 1 deletions
|
|
@ -1,6 +1,18 @@
|
||||||
Version 1.3.22 (in progress)
|
Version 1.3.22 (in progress)
|
||||||
==================================
|
==================================
|
||||||
|
|
||||||
|
08/12/2004: wsfulton
|
||||||
|
Patch #837715 from Ben Reser to correctly detect Python lib directory
|
||||||
|
on 64 bit systems.
|
||||||
|
|
||||||
|
08/12/2004: wsfulton
|
||||||
|
[C# and Java] Prevent memory leaks in the case of early return
|
||||||
|
from wrapper methods using const std::string & parameters. Modified
|
||||||
|
Mark Traudt patch #951565.
|
||||||
|
|
||||||
|
08/12/2004: wsfulton
|
||||||
|
Bug #943783 with patch fixes php char * out typemap NULL values.
|
||||||
|
|
||||||
08/03/2004: Ahmon Dancy <dancy@dancy>
|
08/03/2004: Ahmon Dancy <dancy@dancy>
|
||||||
|
|
||||||
[allegrocl] Additional case mode fixes. Also, make sure
|
[allegrocl] Additional case mode fixes. Also, make sure
|
||||||
|
|
@ -17,7 +29,7 @@ Version 1.3.22 (in progress)
|
||||||
swigrun.i.
|
swigrun.i.
|
||||||
|
|
||||||
07/23/2004: wsfulton
|
07/23/2004: wsfulton
|
||||||
[C#] Bug #917601 Maping C++ bool fix from Mark Traudt
|
[C#] Bug #917601 Mapping C++ bool fix from Mark Traudt
|
||||||
|
|
||||||
07/23/2004: wsfulton
|
07/23/2004: wsfulton
|
||||||
RPM fixes for latest CVS version including removal of runtime
|
RPM fixes for latest CVS version including removal of runtime
|
||||||
|
|
@ -938,3 +950,53 @@ Version 1.3.22 (in progress)
|
||||||
throw;
|
throw;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
01/12/2004: wsfulton on behalf of mmatus (marcelo matus)
|
||||||
|
if a method uses %exception and the method requires the use
|
||||||
|
of the throws typemap, the code in a throws typemap will be
|
||||||
|
generated inside the try body. For example:
|
||||||
|
|
||||||
|
%exception method {
|
||||||
|
try {
|
||||||
|
// method action
|
||||||
|
$action
|
||||||
|
} catch (int i) {
|
||||||
|
// method int catch handler
|
||||||
|
} catch (...) {
|
||||||
|
// method generic catch handler
|
||||||
|
}
|
||||||
|
}
|
||||||
|
%typemap(throws) Except %{
|
||||||
|
// throws typemap Except catch handler
|
||||||
|
%}
|
||||||
|
|
||||||
|
%inline %{
|
||||||
|
class Except {};
|
||||||
|
void method(int i) throw (Except);
|
||||||
|
|
||||||
|
Will generate:
|
||||||
|
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
// method action
|
||||||
|
try {
|
||||||
|
method(arg1);
|
||||||
|
}
|
||||||
|
catch(Except &_e) {
|
||||||
|
// throws typemap Except catch handler
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
} catch (int i) {
|
||||||
|
// method int catch handler
|
||||||
|
} catch (...) {
|
||||||
|
// method generic catch handler
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
As can be seen, the inner try catch block is for the throws typemaps.
|
||||||
|
Previously, this was reversed so that the inner try catch block
|
||||||
|
was the %exception code. In the example above, it would have been
|
||||||
|
impossible to catch Except as the catch all (...) would catch the
|
||||||
|
exception instead.
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue