Added fix for std::pair< iterator, bool >.

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10070 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Gonzalo Garramuno 2007-10-29 16:39:05 +00:00
commit 169a953991

View file

@ -168,6 +168,15 @@ iterator, reverse_iterator {
swig::Iterator::descriptor(),SWIG_POINTER_OWN);
}
// Redefine std::set std::pair<iterator, bool> typemap
%typemap(out,noblock=1,fragment="RubyPairBoolOutputIterator")
std::pair<iterator, bool> {
$result = rb_ary_new2(2);
RARRAY_PTR($result)[0] = SWIG_NewPointerObj(swig::make_set_nonconst_iterator(%static_cast($1,$type &).first),
swig::Iterator::descriptor(),SWIG_POINTER_OWN);
RARRAY_PTR($result)[1] = SWIG_From(bool)(%static_cast($1,const $type &).second);
RARRAY_LEN($result) = 2;
}
%extend {
%alias push "<<";