Commit graph

7 commits

Author SHA1 Message Date
Olly Betts
1392a6e497 [PHP] When using %throws or %catches, SWIG-generated PHP5 wrappers
now throw PHP Exception objects instead of giving a PHP error of
type E_ERROR.

This change shouldn't cause incompatibility issues, since you can't
set an error handler for E_ERROR, so previously PHP would just exit
which also happens for unhandled exceptions.  The benefit is you can
now catch them if you want to.

Fixes SF#2545578 and SF#2955522.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12055 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-05-26 07:32:20 +00:00
Olly Betts
ed98187e3b Tidy up typemaps, combining variants with the same code.
Use const_cast to remove const-ness from const char * for stupid PHP API in
%throws typemap.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12054 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-05-26 00:19:08 +00:00
Olly Betts
9207a2fe37 [PHP] Add missing directorin typemap for const std::string &.
Fixes SF#3006404 reported by t-Legiaw.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12053 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-05-25 23:38:44 +00:00
Olly Betts
08cdb5a7ee Set string contents when we allocate it for a small efficiency gain.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12052 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-05-25 21:46:23 +00:00
William S Fulton
4308dd03cf SWIG license change - The Examples and Lib move to a very permissive license in the LICENSE file, removing the BSD license restrictions as agreed by committers since it was inadvertently introduced. Remove some examples where the impact of the license change is not clear.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11874 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-02-27 23:26:02 +00:00
Miklos Vajna
0249eea389 Merge https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2009-vmiklos/
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11434 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-07-22 11:08:29 +00:00
Olly Betts
7dfd9aae31 WARN_* constants are user visible, so keep existing WARN_PHP4_* for
backward compatibility, but add preferred forms WARN_PHP_* and use
these ourselves.

Rename Lib/php4 to Lib/php, Source/Modules/php4.cxx to Source/Modules/php.cxx.
 
Add typemaps for const reference so Examples/test-suite/apply_signed_char.i
works.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10633 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2008-07-03 00:09:56 +00:00
Renamed from Lib/php4/std_string.i (Browse further)