Replaced all occurrences of the deprecated STR2CSTR() in Ruby code with

the new StringValuePtr().


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@4682 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Logan Johnson 2003-04-15 17:14:18 +00:00
commit 2de683e019
5 changed files with 19 additions and 14 deletions

View file

@ -27,7 +27,7 @@ bool SWIG_STRING_P(VALUE x) {
return TYPE(x) == T_STRING;
}
std::string SWIG_RB2STR(VALUE x) {
return std::string(STR2CSTR(x));
return std::string(StringValuePtr(x));
}
VALUE SWIG_STR2RB(const std::string& s) {
return rb_str_new2(s.c_str());