Added Ruby_Format_TypeError() function to format

swig type errors for ruby properly.



git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9710 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Gonzalo Garramuno 2007-04-29 20:49:19 +00:00
commit effab096e5

View file

@ -87,4 +87,13 @@ SWIG_Ruby_ErrorType(int SWIG_code) {
}
const char* Ruby_Format_TypeError( const char* msg,
const char* type,
const char* name,
const int argn )
{
static char buf[1024];
sprintf( buf, "%sin method '%s', argument %d of type %s",
msg, name, argn-1, type );
return buf;
}