Various ruby-1.9.x compile fixes including patch from Nibble
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11862 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
00880434ef
commit
830de4d2f1
7 changed files with 17 additions and 10 deletions
|
|
@ -1,6 +1,9 @@
|
|||
Version 1.3.41 (in progress)
|
||||
============================
|
||||
|
||||
2010-02-13: wsfulton
|
||||
[Ruby] A few fixes for compiling under ruby-1.9.x including patch from 'Nibble'.
|
||||
|
||||
2010-02-13: wsfulton
|
||||
[Ruby] Apply patch from Patrick Bennett to fix RARRAY_LEN and RARRAY_PTR usage for Ruby 1.9.x
|
||||
used in various STL wrappers.
|
||||
|
|
|
|||
|
|
@ -564,7 +564,8 @@ namespace swig
|
|||
{
|
||||
Sequence::const_iterator i = $self->begin();
|
||||
Sequence::const_iterator e = $self->end();
|
||||
VALUE str = rb_str_new2( swig::type_name< Sequence >() );
|
||||
const char *type_name = swig::type_name< Sequence >();
|
||||
VALUE str = rb_str_new2(type_name);
|
||||
str = rb_str_cat2( str, " [" );
|
||||
bool comma = false;
|
||||
VALUE tmp;
|
||||
|
|
@ -928,7 +929,7 @@ namespace swig
|
|||
}
|
||||
catch( std::invalid_argument )
|
||||
{
|
||||
rb_raise( rb_eArgError,
|
||||
rb_raise( rb_eArgError, "%s",
|
||||
Ruby_Format_TypeError( "",
|
||||
swig::type_name<Sequence::value_type>(),
|
||||
__FUNCTION__, idx+2, elem ));
|
||||
|
|
@ -955,7 +956,7 @@ namespace swig
|
|||
}
|
||||
catch( std::invalid_argument )
|
||||
{
|
||||
rb_raise( rb_eArgError,
|
||||
rb_raise( rb_eArgError, "%s",
|
||||
Ruby_Format_TypeError( "",
|
||||
swig::type_name<Sequence::value_type>(),
|
||||
__FUNCTION__, idx+2, elem ));
|
||||
|
|
@ -1010,7 +1011,7 @@ namespace swig {
|
|||
if (seq) {
|
||||
VALUE lastErr = rb_gv_get("$!");
|
||||
if (lastErr == Qnil) {
|
||||
rb_raise(rb_eTypeError, e.what());
|
||||
rb_raise(rb_eTypeError, "%s", e.what());
|
||||
}
|
||||
}
|
||||
return SWIG_ERROR;
|
||||
|
|
@ -1050,7 +1051,7 @@ namespace swig {
|
|||
if (seq) {
|
||||
VALUE lastErr = rb_gv_get("$!");
|
||||
if (lastErr == Qnil) {
|
||||
rb_raise(rb_eTypeError, e.what());
|
||||
rb_raise(rb_eTypeError, "%s", e.what());
|
||||
}
|
||||
}
|
||||
return SWIG_ERROR;
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@
|
|||
catch ( const std::invalid_argument& )
|
||||
{
|
||||
rb_raise(rb_eTypeError,
|
||||
"Yield block did not return a valid element for " #Container);
|
||||
"Yield block did not return a valid element for " "Container");
|
||||
}
|
||||
|
||||
return $self;
|
||||
|
|
|
|||
|
|
@ -100,7 +100,7 @@ static ID swig_call_id = 0;
|
|||
++swig_virtual_calls;
|
||||
# define SWIG_RELEASE_STACK --swig_virtual_calls;
|
||||
# define Ruby_DirectorTypeMismatchException(x) \
|
||||
rb_raise( rb_eTypeError, x ); return c_result;
|
||||
rb_raise( rb_eTypeError, "%s", x ); return c_result;
|
||||
|
||||
static unsigned int swig_virtual_calls = 0;
|
||||
|
||||
|
|
|
|||
|
|
@ -345,7 +345,8 @@
|
|||
{
|
||||
Map::const_iterator i = $self->begin();
|
||||
Map::const_iterator e = $self->end();
|
||||
VALUE str = rb_str_new2( swig::type_name< Map >() );
|
||||
const char *type_name = swig::type_name< Map >();
|
||||
VALUE str = rb_str_new2( type_name );
|
||||
str = rb_str_cat2( str, " {" );
|
||||
bool comma = false;
|
||||
VALUE tmp;
|
||||
|
|
|
|||
|
|
@ -115,7 +115,8 @@
|
|||
{
|
||||
MultiMap::iterator i = $self->begin();
|
||||
MultiMap::iterator e = $self->end();
|
||||
VALUE str = rb_str_new2( swig::type_name< MultiMap >() );
|
||||
const char *type_name = swig::type_name< MultiMap >();
|
||||
VALUE str = rb_str_new2( type_name );
|
||||
str = rb_str_cat2( str, " {" );
|
||||
VALUE tmp;
|
||||
while ( i != e )
|
||||
|
|
|
|||
|
|
@ -146,7 +146,8 @@
|
|||
VALUE inspect() const
|
||||
{
|
||||
VALUE tmp;
|
||||
VALUE str = rb_str_new2( swig::type_name< pair >() );
|
||||
const char *type_name = swig::type_name< pair >();
|
||||
VALUE str = rb_str_new2( type_name );
|
||||
str = rb_str_cat2( str, " (" );
|
||||
tmp = swig::from( $self->first );
|
||||
tmp = rb_obj_as_string( tmp );
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue