diff options
Diffstat (limited to 'bindings/solv.i')
-rw-r--r-- | bindings/solv.i | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/bindings/solv.i b/bindings/solv.i index 7302d3a..354cde7 100644 --- a/bindings/solv.i +++ b/bindings/solv.i @@ -330,7 +330,8 @@ typedef struct { #if defined(SWIGPERL) -/* work around a swig bug */ +/* work around a swig bug for swig versions < 2.0.5 */ +#if SWIG_VERSION < 0x020005 %{ #undef SWIG_CALLXS #ifdef PERL_OBJECT @@ -343,6 +344,7 @@ typedef struct { # endif #endif %} +#endif %define perliter(class) @@ -2609,7 +2611,6 @@ rb_eval_string( #ifdef SWIGPERL perliter(solv::Pool_repo_iterator) #endif - %newobject __next__; Repo *__next__() { Pool *pool = $self->pool; if ($self->id >= pool->nrepos) @@ -2625,7 +2626,7 @@ rb_eval_string( void each() { Repo *n; while ((n = Pool_repo_iterator___next__($self)) != 0) { - rb_yield(SWIG_NewPointerObj(SWIG_as_voidptr(n), SWIGTYPE_p_Repo, SWIG_POINTER_OWN | 0)); + rb_yield(SWIG_NewPointerObj(SWIG_as_voidptr(n), SWIGTYPE_p_Repo, 0 | 0)); } } #endif @@ -2830,6 +2831,9 @@ rb_eval_string( const char *lookup_location(unsigned int *OUTPUT) { return solvable_lookup_location($self->pool->solvables + $self->id, OUTPUT); } + const char *lookup_sourcepkg() { + return solvable_lookup_sourcepkg($self->pool->solvables + $self->id); + } %newobject Dataiterator; Dataiterator *Dataiterator(Id key, const char *match = 0, int flags = 0) { return new_Dataiterator($self->pool, 0, $self->id, key, match, flags); @@ -3792,6 +3796,9 @@ rb_eval_string( if (buf) repodata_set_bin_checksum(repo_id2repodata($self->repo, $self->id), solvid, keyname, solv_chksum_get_type(chksum), buf); } + void set_sourcepkg(Id solvid, const char *sourcepkg) { + repodata_set_sourcepkg(repo_id2repodata($self->repo, $self->id), solvid, sourcepkg); + } const char *lookup_str(Id solvid, Id keyname) { return repodata_lookup_str(repo_id2repodata($self->repo, $self->id), solvid, keyname); } |