diff options
author | Michael Schroeder <mls@suse.de> | 2013-06-14 11:50:12 +0200 |
---|---|---|
committer | Michael Schroeder <mls@suse.de> | 2013-06-14 11:50:12 +0200 |
commit | cb3836353d190ef3ce45778d29038d001f5b29b8 (patch) | |
tree | 0f9e0c378cbbea3fc471de11500f5004d7b4359e /bindings | |
parent | 8243f6d9275395544baa614e8788596fb11c5d34 (diff) | |
download | libsolv-cb3836353d190ef3ce45778d29038d001f5b29b8.tar.gz libsolv-cb3836353d190ef3ce45778d29038d001f5b29b8.tar.bz2 libsolv-cb3836353d190ef3ce45778d29038d001f5b29b8.zip |
bindings: add pool.errstr, make add_rpm/... return Solvable objects
Diffstat (limited to 'bindings')
-rw-r--r-- | bindings/solv.i | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/bindings/solv.i b/bindings/solv.i index 139a9a5..ed609d3 100644 --- a/bindings/solv.i +++ b/bindings/solv.i @@ -1248,6 +1248,7 @@ typedef struct { } Repo *installed; + const char * const errstr; %{ SWIGINTERN void Pool_installed_set(Pool *pool, Repo *installed) { pool_set_installed(pool, installed); @@ -1255,6 +1256,9 @@ typedef struct { Repo *Pool_installed_get(Pool *pool) { return pool->installed; } + const char *Pool_errstr_get(Pool *pool) { + return pool_errstr(pool); + } %} Queue matchprovidingids(const char *match, int flags) { @@ -1430,16 +1434,18 @@ rb_eval_string( bool add_rpmdb_reffp(FILE *reffp, int flags = 0) { return repo_add_rpmdb_reffp($self, reffp, flags) == 0; } - Id add_rpm(const char *name, int flags = 0) { - return repo_add_rpm($self, name, flags); + %newobject add_rpm; + XSolvable *add_rpm(const char *name, int flags = 0) { + return new_XSolvable($self->pool, repo_add_rpm($self, name, flags)); } #endif #ifdef ENABLE_RPMDB_PUBKEYS bool add_rpmdb_pubkeys(int flags = 0) { return repo_add_rpmdb_pubkeys($self, flags) == 0; } - Id add_pubkey(const char *key, int flags = 0) { - return repo_add_pubkey($self, key, flags); + %newobject add_pubkey; + XSolvable *add_pubkey(const char *key, int flags = 0) { + return new_XSolvable($self->pool, repo_add_pubkey($self, key, flags)); } #endif #ifdef ENABLE_RPMMD @@ -1463,8 +1469,9 @@ rb_eval_string( bool add_debpackages(FILE *fp, int flags = 0) { return repo_add_debpackages($self, fp, flags) == 0; } - Id add_deb(const char *name, int flags = 0) { - return repo_add_deb($self, name, flags); + %newobject add_deb; + XSolvable *add_deb(const char *name, int flags = 0) { + return new_XSolvable($self->pool, repo_add_deb($self, name, flags)); } #endif #ifdef ENABLE_SUSEREPO @@ -1493,8 +1500,9 @@ rb_eval_string( bool add_arch_local(const char *dir, int flags = 0) { return repo_add_arch_local($self, dir, flags) == 0; } - Id add_arch_pkg(const char *name, int flags = 0) { - return repo_add_arch_pkg($self, name, flags); + %newobject add_arch_pkg; + XSolvable *add_arch_pkg(const char *name, int flags = 0) { + return new_XSolvable($self->pool, repo_add_arch_pkg($self, name, flags)); } #endif void internalize() { |