ref: refs/heads/master
commit b77ab85e574dfa5544f5d5bbbe475fc628ac39ff
Author: Klaus Kämpf
Date: Mon Sep 14 11:58:16 2009 +0200
Add accessors to XSolvable attributes 'id' and 'pool'
---
applayer/xsolvable.c | 24 ++++++++++++++++++++++++
applayer/xsolvable.h | 14 ++++++++++++++
bindings/solvable.i | 10 +++++++++-
3 files changed, 47 insertions(+), 1 deletions(-)
diff --git a/applayer/xsolvable.c b/applayer/xsolvable.c
index cababe4..54fb3b8 100644
--- a/applayer/xsolvable.c
+++ b/applayer/xsolvable.c
@@ -78,6 +78,30 @@ xsolvable_solvable( const XSolvable *xs )
/*
+ * Return the internal id
+ *
+ * Check also pool for comparison !
+ *
+ */
+int
+xsolvable_id( const XSolvable *xs)
+{
+ return xs->id;
+}
+
+
+/*
+ * Return the Pool
+ *
+ */
+Pool *
+xsolvable_pool( const XSolvable *xs)
+{
+ return xs->pool;
+}
+
+
+/*
* equality
*/
diff --git a/applayer/xsolvable.h b/applayer/xsolvable.h
index 8fc989d..2afc5a9 100644
--- a/applayer/xsolvable.h
+++ b/applayer/xsolvable.h
@@ -60,6 +60,20 @@ int xsolvable_equal( const XSolvable *xs1, const XSolvable *xs2 );
Solvable *xsolvable_solvable( const XSolvable *xs );
/*
+ * Return the internal id
+ *
+ * Check also pool for comparison !
+ *
+ */
+int xsolvable_id( const XSolvable *xs);
+
+/*
+ * Return the Pool
+ *
+ */
+Pool *xsolvable_pool( const XSolvable *xs);
+
+/*
* Add an existing solvable to Repo
*/
XSolvable *xsolvable_add( Repo *repo, const XSolvable *xs );
diff --git a/bindings/solvable.i b/bindings/solvable.i
index bb49f44..0162e6d 100644
--- a/bindings/solvable.i
+++ b/bindings/solvable.i
@@ -47,11 +47,19 @@ typedef struct _Solvable {} XSolvable; /* expose XSolvable as 'Solvable' */
/*
* call-seq:
+ * solvable.id -> id
+ *
+ */
+ int id()
+ { return xsolvable_id($self); }
+
+ /*
+ * call-seq:
* solvable.pool -> Pool
*
*/
Pool *pool()
- { return xsolvable_solvable($self)->repo->pool; }
+ { return xsolvable_pool($self); }
/*
* call-seq:
--
To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org
For additional commands, e-mail: zypp-commit+help@opensuse.org