From d24c9883a0b0110f8e8a7bd04f3283e90abf7a0c Mon Sep 17 00:00:00 2001 From: Michael Schroeder Date: Tue, 4 Mar 2014 15:36:27 +0100 Subject: [PATCH] bindings: don't let str(Datamatch) change the strings, instead create a copy Also always set the SEARCH_FILES and SEARCH_CHECKSUMS flags. --- bindings/solv.i | 5 +++-- 1 file 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; } } -- 2.7.4