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

@ -30,7 +30,7 @@ namespace std {
%typemap(in) string {
if (TYPE($input) == T_STRING) {
$1 = std::string(STR2CSTR($input));
$1 = std::string(StringValuePtr($input));
} else {
SWIG_exception(SWIG_TypeError, "not a string");
}
@ -38,7 +38,7 @@ namespace std {
%typemap(in) const string & (std::string temp) {
if (TYPE($input) == T_STRING) {
temp = std::string(STR2CSTR($input));
temp = std::string(StringValuePtr($input));
$1 = &temp;
} else {
SWIG_exception(SWIG_TypeError, "not a string");