diff options
author | Thierry Vignaud <tv@mageia.org> | 2012-06-13 18:44:15 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mageia.org> | 2012-06-13 18:44:15 +0000 |
commit | 1869caccae3a2edd6cceb75e92e471169f0c6b64 (patch) | |
tree | 103ffbd417a7d23afff1960b6e91718ccf29ad43 | |
parent | 788837fec9ad925d0fa777fd853635a5faec4a66 (diff) | |
download | perl-URPM-1869caccae3a2edd6cceb75e92e471169f0c6b64.tar perl-URPM-1869caccae3a2edd6cceb75e92e471169f0c6b64.tar.gz perl-URPM-1869caccae3a2edd6cceb75e92e471169f0c6b64.tar.bz2 perl-URPM-1869caccae3a2edd6cceb75e92e471169f0c6b64.tar.xz perl-URPM-1869caccae3a2edd6cceb75e92e471169f0c6b64.zip |
(return_list_tag) preallocate the stack
-rw-r--r-- | URPM.xs | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -488,8 +488,9 @@ return_list_uint_16(const Header header, rpmTag tag_name) { int count = rpmtdCount(&list); int i; uint16_t *list_ = list.data; + EXTEND(SP, count); for(i = 0; i < count; i++) { - mXPUSHs(newSViv(list_[i])); + mPUSHs(newSViv(list_[i])); } rpmtdFreeData(&list); } @@ -554,8 +555,9 @@ return_list_tag(const URPM__Package pkg, rpmTag tag_name) { { int i; int *r = (int *)list; + EXTEND(SP, count); for (i=0; i < count; i++) { - mXPUSHs(newSViv(r[i])); + mPUSHs(newSViv(r[i])); } } break; @@ -568,8 +570,9 @@ return_list_tag(const URPM__Package pkg, rpmTag tag_name) { { int i; char **s = (char **)list; + EXTEND(SP, count); for (i = 0; i < count; i++) - mXPUSHs(newSVpv(s[i], 0)); + mPUSHs(newSVpv(s[i], 0)); } break; case RPM_I18NSTRING_TYPE: |