summaryrefslogtreecommitdiff
path: root/bindings/solv.i
diff options
context:
space:
mode:
authorMichael Schroeder <mls@suse.de>2014-03-04 15:36:27 +0100
committerMichael Schroeder <mls@suse.de>2014-03-04 15:37:12 +0100
commitd24c9883a0b0110f8e8a7bd04f3283e90abf7a0c (patch)
tree9799394980071de5c37e653136069482d78f2e35 /bindings/solv.i
parent7263313294b9e0c8329b3c92720677ecbd9e492e (diff)
downloadlibsolv-d24c9883a0b0110f8e8a7bd04f3283e90abf7a0c.tar.gz
libsolv-d24c9883a0b0110f8e8a7bd04f3283e90abf7a0c.tar.bz2
libsolv-d24c9883a0b0110f8e8a7bd04f3283e90abf7a0c.zip
bindings: don't let str(Datamatch) change the strings, instead create a copy
Also always set the SEARCH_FILES and SEARCH_CHECKSUMS flags.
Diffstat (limited to 'bindings/solv.i')
-rw-r--r--bindings/solv.i5
1 files changed, 3 insertions, 2 deletions
diff --git a/bindings/solv.i b/bindings/solv.i
index afabd01..b7fd80d 100644
--- a/bindings/solv.i
+++ b/bindings/solv.i
@@ -1956,9 +1956,10 @@ rb_eval_string(
%rename("str") __str__;
#endif
const char *__str__() {
- if (!repodata_stringify($self->pool, $self->data, $self->key, &$self->kv, $self->flags))
+ KeyValue kv = $self->kv;
+ if (!repodata_stringify($self->pool, $self->data, $self->key, &kv, SEARCH_FILES | SEARCH_CHECKSUMS))
return "";
- return $self->kv.str;
+ return kv.str;
}
}