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:
parent
d0a5fe3ba5
commit
990aa04cd2
1 changed files with 1 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue