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:
parent
b8629b298c
commit
169a953991
1 changed files with 9 additions and 0 deletions
|
|
@ -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 "<<";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue