throws typemaps added

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@7620 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2005-10-08 13:58:31 +00:00
commit f8ee15c278
2 changed files with 32 additions and 1 deletions

View file

@ -42,4 +42,11 @@ namespace std {
ZVAL_STRINGL($result,const_cast<char*>($1->c_str()),$1->length(),1);
}
%typemap(throws) string %{
SWIG_PHP_Error(E_ERROR, (char *)$1.c_str());
%}
%typemap(throws) const string& %{
SWIG_PHP_Error(E_ERROR, (char *)$1.c_str());
%}
}