From: <ol...@us...> - 2010-05-25 21:46:29
|
Revision: 12052 http://swig.svn.sourceforge.net/swig/?rev=12052&view=rev Author: olly Date: 2010-05-25 21:46:23 +0000 (Tue, 25 May 2010) Log Message: ----------- Set string contents when we allocate it for a small efficiency gain. Modified Paths: -------------- trunk/Lib/php/std_string.i Modified: trunk/Lib/php/std_string.i =================================================================== --- trunk/Lib/php/std_string.i 2010-05-25 18:35:21 UTC (rev 12051) +++ trunk/Lib/php/std_string.i 2010-05-25 21:46:23 UTC (rev 12052) @@ -71,8 +71,7 @@ %typemap(directorout) string & (std::string *temp) %{ convert_to_string_ex($input); - temp = new std::string; - temp->assign(Z_STRVAL_PP($input), Z_STRLEN_PP($input)); + temp = new std::string(Z_STRVAL_PP($input), Z_STRLEN_PP($input)); swig_acquire_ownership(temp); $result = temp; %} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |