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:
parent
27b798c807
commit
2de683e019
5 changed files with 19 additions and 14 deletions
|
|
@ -72,7 +72,7 @@ SWIGRUNTIME(char *)
|
|||
SWIG_MangleStr(VALUE obj)
|
||||
{
|
||||
VALUE stype = rb_iv_get(obj, "__swigtype__");
|
||||
return STR2CSTR(stype);
|
||||
return StringValuePtr(stype);
|
||||
}
|
||||
|
||||
/* Convert a pointer value */
|
||||
|
|
@ -186,7 +186,7 @@ SWIG_ConvertPacked(VALUE obj, void *ptr, int sz, swig_type_info *ty, int flags)
|
|||
char *c;
|
||||
|
||||
if (TYPE(obj) != T_STRING) goto type_error;
|
||||
c = STR2CSTR(obj);
|
||||
c = StringValuePtr(obj);
|
||||
/* Pointer values must start with leading underscore */
|
||||
if (*c != '_') goto type_error;
|
||||
c++;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue