aboutsummaryrefslogtreecommitdiffstats
path: root/URPM.xs
diff options
context:
space:
mode:
authorPascal Terjan <pterjan@gmail.com>2014-11-12 22:22:22 +0000
committerThierry Vignaud <thierry.vignaud@gmail.com>2014-11-14 13:34:27 +0100
commit0efdc769b260bb832e7f59d8bfb80def65f554ff (patch)
treef530eeca19f8c6afaec6fe13749233a05c104c4e /URPM.xs
parenta1e561b402e695b7f5ed67fe931fe337b61170ab (diff)
downloadperl-URPM-0efdc769b260bb832e7f59d8bfb80def65f554ff.tar
perl-URPM-0efdc769b260bb832e7f59d8bfb80def65f554ff.tar.gz
perl-URPM-0efdc769b260bb832e7f59d8bfb80def65f554ff.tar.bz2
perl-URPM-0efdc769b260bb832e7f59d8bfb80def65f554ff.tar.xz
perl-URPM-0efdc769b260bb832e7f59d8bfb80def65f554ff.zip
Handle non numeric returns for traverse_tag_find callback
fix a warning spot by Angelo Naselli
Diffstat (limited to 'URPM.xs')
-rw-r--r--URPM.xs9
1 files changed, 6 insertions, 3 deletions
diff --git a/URPM.xs b/URPM.xs
index 10d9c2c..aac4b43 100644
--- a/URPM.xs
+++ b/URPM.xs
@@ -2447,11 +2447,14 @@ Db_traverse_tag_find(db,tag,name,callback)
int count = _run_cb_while_traversing(callback, header, 0);
SPAGAIN;
- if (count == 1 && POPi) {
- found = 1;
- break;
+ if (count == 1) {
+ SV* ret = POPs;
+ found = SvTRUE(ret);
}
PUTBACK;
+ if (found) {
+ break;
+ }
}
rpmtsSetVSFlags(db->ts, ovsflags);
(void)rpmdbFreeIterator(mi);