Apply patch from Patrick Bennett to fix RARRAY_LEN and RARRAY_PTR usage for Ruby 1.9.x
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11859 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
cb6e87d0e9
commit
12b89ff406
4 changed files with 20 additions and 22 deletions
|
|
@ -170,10 +170,9 @@
|
|||
%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;
|
||||
rb_ary_push($result, SWIG_NewPointerObj(swig::make_set_nonconst_iterator(%static_cast($1,$type &).first),
|
||||
swig::Iterator::descriptor(),SWIG_POINTER_OWN));
|
||||
rb_ary_push($result, SWIG_From(bool)(%static_cast($1,const $type &).second));
|
||||
}
|
||||
|
||||
%extend {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue