summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosef Reidinger <jreidinger@suse.cz>2012-02-11 18:58:59 +0100
committertux <tux@linux-hmt5.(none)>2012-02-11 20:05:33 +0100
commit60fc3705dcc2fa90755253116ca230be9ce82988 (patch)
tree7ac67a4224636c3c3e438c935acf3e249220cb2f
parent1c2be9c735fad839e3f107d3b3bfb5e154e76bb7 (diff)
downloadlibzypp-bindings-60fc3705dcc2fa90755253116ca230be9ce82988.tar.gz
libzypp-bindings-60fc3705dcc2fa90755253116ca230be9ce82988.tar.bz2
libzypp-bindings-60fc3705dcc2fa90755253116ca230be9ce82988.zip
use proper type and uncomment test so we demonstrate it
-rw-r--r--swig/ResPool.i8
-rw-r--r--swig/ruby/tests/target.rb8
2 files changed, 10 insertions, 6 deletions
diff --git a/swig/ResPool.i b/swig/ResPool.i
index be8782f..f6d8d2e 100644
--- a/swig/ResPool.i
+++ b/swig/ResPool.i
@@ -25,14 +25,14 @@ iter2(ResPool, PoolItem);
#ifdef SWIGRUBY
-iter3(ResPool, PoolItem*);
+iter3(ResPool, zypp::PoolItem*);
// %extend ResPool {
// void each()
// {
// ResPool::const_iterator i = self->begin();
// while ( i != self->end() ) {
-// rb_yield( SWIG_NewPointerObj( (void *) &*i, SWIGTYPE_p_PoolItem, 0));
+// rb_yield( SWIG_NewPointerObj( (void *) &*i, SWIGTYPE_p_zypp__PoolItem, 0));
// ++i;
// }
// }
@@ -43,7 +43,7 @@ iter3(ResPool, PoolItem*);
{
ResPool::byKind_iterator i = self->byKindBegin( kind_r );
while ( i != self->byKindEnd( kind_r ) ) {
- rb_yield( SWIG_NewPointerObj( (void *) &*i, SWIGTYPE_p_PoolItem, 0));
+ rb_yield( SWIG_NewPointerObj( (void *) &*i, SWIGTYPE_p_zypp__PoolItem, 0));
++i;
}
}
@@ -54,7 +54,7 @@ iter3(ResPool, PoolItem*);
{
ResPool::byName_iterator i = self->byNameBegin( name );
while ( i != self->byNameEnd( name ) ) {
- rb_yield( SWIG_NewPointerObj( (void *) &*i, $descriptor(PoolItem), 0));
+ rb_yield( SWIG_NewPointerObj( (void *) &*i, SWIGTYPE_p_zypp__PoolItem, 0));
++i;
}
}
diff --git a/swig/ruby/tests/target.rb b/swig/ruby/tests/target.rb
index 14bc0e4..a7dfe3e 100644
--- a/swig/ruby/tests/target.rb
+++ b/swig/ruby/tests/target.rb
@@ -35,8 +35,8 @@ class LoadTest < Test::Unit::TestCase
break if i > 10
puts pi
# PoolItems have status and a resolvable
-# r = pi.resolvable
-# puts "#{r.name}-#{r.edition}"
+ r = pi.resolvable
+ puts "#{r.name}-#{r.edition}"
end
puts "packages:"
#try iterate with kind
@@ -46,6 +46,8 @@ class LoadTest < Test::Unit::TestCase
i = i + 1
break if i > 10
puts pi
+ r = pi.resolvable
+ puts "#{r.name}-#{r.edition}"
end
i = 0
@@ -54,6 +56,8 @@ class LoadTest < Test::Unit::TestCase
i = i + 1
break if i > 10
puts pi
+ r = pi.resolvable
+ puts "#{r.name}-#{r.edition}"
end
assert true