Moved the std::pair< iterator, bool > typemap to std_set.i

where it belongs.
This solves the problem with swig conflicts (at least for now).



git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10071 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Gonzalo Garramuno 2007-10-29 22:12:56 +00:00
commit f2f29c9ba5
2 changed files with 5 additions and 24 deletions

View file

@ -453,7 +453,7 @@ namespace swig
RARRAY_LEN($result) = 2;
}
// std::map/multimap allow returning std::pair< iterator, iterator > from
// std::map/multimap/set allow returning std::pair< iterator, iterator > from
// equal_range, but we cannot still modify the key, so the iterator is
// const.
%typemap(out,noblock=1,fragment="RubySequence_Cont")
@ -467,26 +467,6 @@ namespace swig
}
%fragment("RubyPairBoolOutputIterator","header",fragment=SWIG_From_frag(bool),fragment="RubySequence_Cont") {}
%typemap(out,noblock=1,fragment="RubyPairBoolOutputIterator")
std::pair<const_iterator, bool> {
$result = rb_ary_new2(2);
RARRAY_PTR($result)[0] = SWIG_NewPointerObj(swig::make_const_iterator(%static_cast($1,const $type &).first),
swig::ConstIterator::descriptor(),SWIG_POINTER_OWN);
RARRAY_PTR($result)[1] = SWIG_From(bool)(%static_cast($1,const $type &).second);
RARRAY_LEN($result) = 2;
}
%typemap(out,noblock=1,fragment="RubyPairBoolOutputIterator")
std::pair<iterator, bool> {
$result = rb_ary_new2(2);
RARRAY_PTR($result)[0] = SWIG_NewPointerObj(swig::make_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;
}
%typemap(in,noblock=1,fragment="RubySequence_Cont")
const_iterator(swig::ConstIterator *iter = 0, int res),
const_reverse_iterator(swig::ConstIterator *iter = 0, int res) {

View file

@ -160,12 +160,13 @@
%swig_sequence_methods_common(%arg(set));
%fragment("RubyPairBoolOutputIterator","header",fragment=SWIG_From_frag(bool),fragment="RubySequence_Cont") {}
// Redefine std::set iterator/reverse_iterator typemap
%typemap(out,noblock=1)
iterator, reverse_iterator {
%typemap(out,noblock=1) iterator, reverse_iterator {
$result = SWIG_NewPointerObj(swig::make_set_nonconst_iterator(%static_cast($1,const $type &),
self),
swig::Iterator::descriptor(),SWIG_POINTER_OWN);
swig::Iterator::descriptor(),SWIG_POINTER_OWN);
}
// Redefine std::set std::pair<iterator, bool> typemap