aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2012-06-18 17:20:43 +0000
committerThierry Vignaud <tv@mageia.org>2012-06-18 17:20:43 +0000
commitaaf8972748e365e30c3b60bfe9f8f1b08351cd42 (patch)
treed61535f8c3f522e3765595ce4f360a96a6bb06a4
parent9465024cfe24c271496e481e64f0fb06f6c0cfb1 (diff)
downloadperl-URPM-aaf8972748e365e30c3b60bfe9f8f1b08351cd42.tar
perl-URPM-aaf8972748e365e30c3b60bfe9f8f1b08351cd42.tar.gz
perl-URPM-aaf8972748e365e30c3b60bfe9f8f1b08351cd42.tar.bz2
perl-URPM-aaf8972748e365e30c3b60bfe9f8f1b08351cd42.tar.xz
perl-URPM-aaf8972748e365e30c3b60bfe9f8f1b08351cd42.zip
(xpush_simple_list_str) preallocate the stack
-rw-r--r--URPM.xs3
1 files changed, 2 insertions, 1 deletions
diff --git a/URPM.xs b/URPM.xs
index 5b61c4c..a4a00e8 100644
--- a/URPM.xs
+++ b/URPM.xs
@@ -471,8 +471,9 @@ xpush_simple_list_str(const Header header, rpmTag tag_name) {
return 0;
size = rpmtdCount(&list);
+ EXTEND(SP, size);
while ((val = rpmtdNextString(&list))) {
- mXPUSHs(newSVpv(val, 0));
+ mPUSHs(newSVpv(val, 0));
}
rpmtdFreeData(&list);
PUTBACK;