From 3ccbac69aaff42c350277f65181b74da6beee5b6 Mon Sep 17 00:00:00 2001 From: Gonzalo Garramuno Date: Tue, 1 May 2007 21:38:33 +0000 Subject: [PATCH] Fixed a problem with const correctness in new adde std_pair.i functions. git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9745 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- Lib/ruby/std_pair.i | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Lib/ruby/std_pair.i b/Lib/ruby/std_pair.i index 270cbc8f9..aaaf26619 100644 --- a/Lib/ruby/std_pair.i +++ b/Lib/ruby/std_pair.i @@ -106,7 +106,7 @@ struct traits_from > { static VALUE _wrap_pair_second( VALUE self ) { - std::pair* p = NULL; + std::pair< typename swig::noconst_traits::noconst_type,U>* p = NULL; swig::asptr( self, &p ); return swig::from( p->second ); fail: @@ -115,7 +115,7 @@ static VALUE _wrap_pair_second_eq( VALUE self, VALUE arg ) { - std::pair* p = NULL; + std::pair< typename swig::noconst_traits::noconst_type,U>* p = NULL; swig::asptr( self, &p ); return swig::from( p->second ); fail: @@ -124,7 +124,7 @@ static VALUE from(const std::pair& val) { VALUE obj = rb_ary_new2(2); - RARRAY_PTR(obj)[0] = swig::from(val.first); + RARRAY_PTR(obj)[0] = swig::from< typename swig::noconst_traits::noconst_type>(val.first); RARRAY_PTR(obj)[1] = swig::from(val.second); RARRAY_LEN(obj) = 2; rb_define_singleton_method(obj, "second",