aboutsummaryrefslogtreecommitdiffstats
path: root/URPM.xs
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2006-01-19 13:24:14 +0000
committerRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2006-01-19 13:24:14 +0000
commit787fd6f4f4c904510a477641dd21197b6564318c (patch)
treef13a997dd191aa72a52b4caa87bd4f66bedfce17 /URPM.xs
parentec9cacadc5e93e90a4c4e859a04c716edba442b3 (diff)
downloadperl-URPM-787fd6f4f4c904510a477641dd21197b6564318c.tar
perl-URPM-787fd6f4f4c904510a477641dd21197b6564318c.tar.gz
perl-URPM-787fd6f4f4c904510a477641dd21197b6564318c.tar.bz2
perl-URPM-787fd6f4f4c904510a477641dd21197b6564318c.tar.xz
perl-URPM-787fd6f4f4c904510a477641dd21197b6564318c.zip
In spec2srcheader(): extend stack; fudge with errno.
Diffstat (limited to 'URPM.xs')
-rw-r--r--URPM.xs8
1 files changed, 5 insertions, 3 deletions
diff --git a/URPM.xs b/URPM.xs
index 23a1950..0391ec2 100644
--- a/URPM.xs
+++ b/URPM.xs
@@ -3666,13 +3666,15 @@ Urpm_spec2srcheader(specfile)
pkg = (URPM__Package)malloc(sizeof(struct s_Package));
memset(pkg, 0, sizeof(struct s_Package));
pkg->h = headerLink(spec->sourceHeader);
- EXTEND(SP, 1);
sv_pkg = sv_newmortal();
sv_setref_pv(sv_pkg, "URPM::Package", (void*)pkg);
- PUSHs(sv_pkg);
+ XPUSHs(sv_pkg);
spec = freeSpec(spec);
} else {
- PUSHs(&PL_sv_undef);
+ XPUSHs(&PL_sv_undef);
+ /* apparently rpmlib sets errno this when given a bad spec. */
+ if (errno == EBADF)
+ errno = 0;
}
ts = rpmtsFree(ts);