Fix invalid C

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10048 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2007-10-26 00:40:18 +00:00
commit 145c1f42b8

View file

@ -99,6 +99,7 @@ const char* Ruby_Format_TypeError( const char* msg,
{
char buf[128];
VALUE str;
VALUE asStr;
if ( msg && *msg )
{
str = rb_str_new2(msg);
@ -115,7 +116,7 @@ const char* Ruby_Format_TypeError( const char* msg,
str = rb_str_cat2( str, ", but got " );
str = rb_str_cat2( str, rb_obj_classname(input) );
str = rb_str_cat2( str, " " );
VALUE asStr = rb_inspect(input);
asStr = rb_inspect(input);
if ( RSTRING_LEN(asStr) > 30 )
{
str = rb_str_cat( str, StringValuePtr(asStr), 30 );