aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--URPM.xs10
1 files changed, 5 insertions, 5 deletions
diff --git a/URPM.xs b/URPM.xs
index d7dd26c..ce8c8c2 100644
--- a/URPM.xs
+++ b/URPM.xs
@@ -110,7 +110,7 @@ static int rpmError_callback() {
return RPMLOG_DEFAULT;
}
-static inline int _run_cb_while_traversing(SV *callback, Header header) {
+static inline int _run_cb_while_traversing(SV *callback, Header header, VOL I32 flags) {
dSP;
URPM__Package pkg = calloc(1, sizeof(struct s_Package));
@@ -121,7 +121,7 @@ static inline int _run_cb_while_traversing(SV *callback, Header header) {
mXPUSHs(sv_setref_pv(newSVpvs(""), "URPM::Package", pkg));
PUTBACK;
- int count = call_sv(callback, G_SCALAR);
+ int count = call_sv(callback, G_SCALAR | flags);
SPAGAIN;
pkg->h = NULL; /* avoid using it anymore, in case it has been copied inside callback */
@@ -2416,7 +2416,7 @@ Db_traverse(db,callback)
mi = rpmtsInitIterator(db->ts, RPMDBI_PACKAGES, NULL, 0);
while ((header = rpmdbNextIterator(mi))) {
if (SvROK(callback)) {
- _run_cb_while_traversing(callback, header);
+ _run_cb_while_traversing(callback, header, G_DISCARD);
}
++count;
}
@@ -2454,7 +2454,7 @@ Db_traverse_tag(db,tag,names,callback)
mi = rpmtsInitIterator(db->ts, rpmtag, name, str_len);
while ((header = rpmdbNextIterator(mi))) {
if (SvROK(callback)) {
- _run_cb_while_traversing(callback, header);
+ _run_cb_while_traversing(callback, header, G_DISCARD);
}
++count;
}
@@ -2484,7 +2484,7 @@ Db_traverse_tag_find(db,tag,name,callback)
ovsflags = ts_nosignature(db->ts);
mi = rpmtsInitIterator(db->ts, rpmtag, name, 0);
while ((header = rpmdbNextIterator(mi))) {
- int count = _run_cb_while_traversing(callback, header);
+ int count = _run_cb_while_traversing(callback, header, 0);
if (count == 1 && POPi) {
found = 1;