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:
parent
c01ba3666c
commit
145c1f42b8
1 changed files with 2 additions and 1 deletions
|
|
@ -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 );
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue