diff --git a/CHANGES.current b/CHANGES.current index 9839e13bc..68b92fbbd 100644 --- a/CHANGES.current +++ b/CHANGES.current @@ -1,6 +1,10 @@ Version 2.0.0 (in progress) ============================ +2010-05-25: olly + [PHP] Add missing directorin typemap for const std::string &. + Fixes SF#3006404 reported by t-Legiaw. + 2010-05-23: wsfulton [C#] Fix #2957375 - SWIGStringHelper and SWIGExceptionHelper not always being initialized before use in .NET 4 as the classes were not marked beforefieldinit. diff --git a/Lib/php/std_string.i b/Lib/php/std_string.i index f6b036bd8..6eb8ac22a 100644 --- a/Lib/php/std_string.i +++ b/Lib/php/std_string.i @@ -53,6 +53,10 @@ namespace std { ZVAL_STRINGL($result, const_cast($1->data()), $1->size(), 1); %} + %typemap(directorin) const string & %{ + ZVAL_STRINGL($input, const_cast($1_name.data()), $1_name.size(), 1); + %} + %typemap(throws) string %{ SWIG_PHP_Error(E_ERROR, (char *)$1.c_str()); %}