Ruby: Replace all occurences of STR2CSTR macro with calls to StringValuePtr

STR2CSTR was deprecated in Ruby since years and got finally removed
in Ruby 1.9


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13967 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Klaus Kämpf 2012-12-14 15:48:31 +00:00
commit 23771ef027
8 changed files with 15 additions and 15 deletions

View file

@ -47,7 +47,7 @@ public:
#ifdef SWIGRUBY
%typemap(in) String {
Check_Type($input, T_STRING);
$1 = String(STR2CSTR($input));
$1 = String(StringValuePtr($input));
}
#endif

View file

@ -100,7 +100,7 @@ namespace test {
#endif
#ifdef SWIGRUBY
%typemap(in) string_class * {
$1 = new string_class(STR2CSTR($input));
$1 = new string_class(StringValuePtr($input));
}
%typemap(freearg) string_class * {
delete $1;