Id const id;
} Dep;
+# put before pool/repo so we can access the constructor
+%nodefaultdtor Dataiterator;
+typedef struct {} Dataiterator;
+
typedef struct {
Pool* const pool;
Id const id;
Id const id;
} XRepodata;
-# put before pool/repo so we can access the constructor
-%nodefaultdtor Dataiterator;
-typedef struct {} Dataiterator;
typedef struct {} Pool_solvable_iterator;
typedef struct {} Pool_repo_iterator;
typedef struct {} Repo_solvable_iterator;
%extend Dataiterator {
static const int SEARCH_STRING = SEARCH_STRING;
+ static const int SEARCH_STRINGSTART = SEARCH_STRINGSTART;
+ static const int SEARCH_STRINGEND = SEARCH_STRINGEND;
static const int SEARCH_SUBSTRING = SEARCH_SUBSTRING;
static const int SEARCH_GLOB = SEARCH_GLOB;
static const int SEARCH_REGEX = SEARCH_REGEX;
void setpos_parent() {
dataiterator_setpos_parent($self);
}
+#if defined(SWIGPERL)
+ %rename("str") __str__;
+#endif
+ const char *__str__() {
+ if (!repodata_stringify($self->pool, $self->data, $self->key, &$self->kv, $self->flags))
+ return "";
+ return $self->kv.str;
+ }
}
%extend Pool_solvable_iterator {
const char *lookup_location(unsigned int *OUTPUT) {
return solvable_lookup_location($self->pool->solvables + $self->id, OUTPUT);
}
+ %newobject Dataiterator;
+ Dataiterator *Dataiterator(Id key, const char *match, int flags) {
+ return new_Dataiterator($self->pool, 0, $self->id, key, match, flags);
+ }
#ifdef SWIGRUBY
%rename("installable?") installable;
#endif
if (!datamatcher_match(&di->matcher, di->kv.str))
continue;
}
+ else
+ {
+ if (di->keyname == SOLVABLE_FILELIST && di->key->type == REPOKEY_TYPE_DIRSTRARRAY && (di->flags & SEARCH_FILES) != 0)
+ repodata_stringify(di->pool, di->data, di->key, &di->kv, di->flags);
+ }
/* found something! */
return 1;
}