Apply patch #3517769 from Robin Stocker to fix compile error on MacRuby using RSTRING_PTR

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12980 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2012-04-14 16:18:04 +00:00
commit 5effbc386c
2 changed files with 4 additions and 1 deletions

View file

@ -5,6 +5,9 @@ See the RELEASENOTES file for a summary of changes in each release.
Version 2.0.5 (in progress)
===========================
2012-04-14: wsfulton
[Ruby] Apply patch #3517769 from Robin Stocker to fix compile error on MacRuby using RSTRING_PTR.
2012-04-13: wsfulton
Apply patch #3511009 from Leif Middelschulte for slightly optimised char * variable wrappers.

View file

@ -189,7 +189,7 @@ SWIG_Ruby_NewPointerObj(void *ptr, swig_type_info *type, int flags)
downcast methods. */
if (obj != Qnil) {
VALUE value = rb_iv_get(obj, "@__swigtype__");
char* type_name = RSTRING_PTR(value);
const char* type_name = RSTRING_PTR(value);
if (strcmp(type->name, type_name) == 0) {
return obj;