better str_new

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@8155 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Marcelo Matus 2005-12-31 10:46:12 +00:00
commit 990aa04cd2

View file

@ -166,7 +166,7 @@ namespace Swig {
swig_msg += msg;
}
if (swig_msg.size()) {
VALUE str = rb_str_new2(swig_msg.c_str());
VALUE str = rb_str_new(swig_msg.data(), swig_msg.size());
swig_error = rb_exc_new3(error, str);
} else {
swig_error = error;