diff options
Diffstat (limited to 'URPM.xs')
-rw-r--r-- | URPM.xs | 164 |
1 files changed, 82 insertions, 82 deletions
@@ -292,12 +292,12 @@ static int callback_list_str_xpush(char *s, int slen, const char *name, uint32_t flags, const char *evr, __attribute__((unused)) void *param) { dSP; if (s) { - XPUSHs(sv_2mortal(newSVpv(s, slen))); + mXPUSHs(newSVpv(s, slen)); } else { char buff[4096]; int len = print_list_entry(buff, sizeof(buff)-1, name, flags, evr); if (len >= 0) - XPUSHs(sv_2mortal(newSVpv(buff, len))); + mXPUSHs(newSVpv(buff, len)); } PUTBACK; /* returning zero indicates to continue processing */ @@ -307,12 +307,12 @@ static int callback_list_str_xpush_requires(char *s, int slen, const char *name, const uint32_t flags, const char *evr, __attribute__((unused)) void *param) { dSP; if (s) { - XPUSHs(sv_2mortal(newSVpv(s, slen))); + mXPUSHs(newSVpv(s, slen)); } else if (is_not_old_suggests(flags)) { char buff[4096]; int len = print_list_entry(buff, sizeof(buff)-1, name, flags, evr); if (len >= 0) - XPUSHs(sv_2mortal(newSVpv(buff, len))); + mXPUSHs(newSVpv(buff, len)); } PUTBACK; /* returning zero indicates to continue processing */ @@ -322,12 +322,12 @@ static int callback_list_str_xpush_old_suggests(char *s, int slen, const char *name, uint32_t flags, const char *evr, __attribute__((unused)) void *param) { dSP; if (s) { - XPUSHs(sv_2mortal(newSVpv(s, slen))); + mXPUSHs(newSVpv(s, slen)); } else if (is_old_suggests(flags)) { char buff[4096]; int len = print_list_entry(buff, sizeof(buff)-1, name, flags, evr); if (len >= 0) - XPUSHs(sv_2mortal(newSVpv(buff, len))); + mXPUSHs(newSVpv(buff, len)); } PUTBACK; /* returning zero indicates to continue processing */ @@ -458,7 +458,7 @@ xpush_simple_list_str(Header header, int32_t tag_name) { size = rpmtdCount(&list); while ((val = rpmtdNextString(&list))) { - XPUSHs(sv_2mortal(newSVpv(val, 0))); + mXPUSHs(newSVpv(val, 0)); } rpmtdFreeData(&list); PUTBACK; @@ -475,7 +475,7 @@ return_list_int32_t(Header header, int32_t tag_name) { if (headerGet(header, tag_name, &list, HEADERGET_DEFAULT)) { uint32_t *val; while ((val = rpmtdNextUint32(&list))) - XPUSHs(sv_2mortal(newSViv(*val))); + mXPUSHs(newSViv(*val)); rpmtdFreeData(&list); } } @@ -492,7 +492,7 @@ return_list_uint_16(Header header, int32_t tag_name) { int i; uint16_t *list_ = list.data; for(i = 0; i < count; i++) { - XPUSHs(sv_2mortal(newSViv(list_[i]))); + mXPUSHs(newSViv(list_[i])); } rpmtdFreeData(&list); } @@ -532,7 +532,7 @@ return_list_tag_modifier(Header header, int32_t tag_name) { return; } *s = '\0'; - XPUSHs(sv_2mortal(newSVpv(buff, strlen(buff)))); + mXPUSHs(newSVpv(buff, strlen(buff))); } rpmtdFreeData(&td); PUTBACK; @@ -547,7 +547,7 @@ return_list_tag(URPM__Package pkg, int32_t tag_name) { void *list = td.data; int32_t count = rpmtdCount(&td); if (tag_name == RPMTAG_ARCH) { - XPUSHs(sv_2mortal(newSVpv(headerIsEntry(pkg->h, RPMTAG_SOURCERPM) ? (char *) list : "src", 0))); + mXPUSHs(newSVpv(headerIsEntry(pkg->h, RPMTAG_SOURCERPM) ? (char *) list : "src", 0)); } else switch (rpmtdType(&td)) { case RPM_NULL_TYPE: @@ -561,12 +561,12 @@ return_list_tag(URPM__Package pkg, int32_t tag_name) { int *r; r = (int *)list; for (i=0; i < count; i++) { - XPUSHs(sv_2mortal(newSViv(r[i]))); + mXPUSHs(newSViv(r[i])); } } break; case RPM_STRING_TYPE: - XPUSHs(sv_2mortal(newSVpv((char *) list, 0))); + mXPUSHs(newSVpv((char *) list, 0)); break; case RPM_BIN_TYPE: break; @@ -577,7 +577,7 @@ return_list_tag(URPM__Package pkg, int32_t tag_name) { s = (char **)list; for (i = 0; i < count; i++) { - XPUSHs(sv_2mortal(newSVpv(s[i], 0))); + mXPUSHs(newSVpv(s[i], 0)); } } break; @@ -598,31 +598,31 @@ return_list_tag(URPM__Package pkg, int32_t tag_name) { { get_fullname_parts(pkg, &name, &version, &release, &arch, &eos); if (version - name < 1) croak("invalid fullname"); - XPUSHs(sv_2mortal(newSVpv(name, version-name - 1))); + mXPUSHs(newSVpv(name, version-name - 1)); } break; case RPMTAG_VERSION: { get_fullname_parts(pkg, &name, &version, &release, &arch, &eos); if (release - version < 1) croak("invalid fullname"); - XPUSHs(sv_2mortal(newSVpv(version, release-version - 1))); + mXPUSHs(newSVpv(version, release-version - 1)); } break; case RPMTAG_RELEASE: { get_fullname_parts(pkg, &name, &version, &release, &arch, &eos); if (arch - release < 1) croak("invalid fullname"); - XPUSHs(sv_2mortal(newSVpv(release, arch-release - 1))); + mXPUSHs(newSVpv(release, arch-release - 1)); } break; case RPMTAG_ARCH: { get_fullname_parts(pkg, &name, &version, &release, &arch, &eos); - XPUSHs(sv_2mortal(newSVpv(arch, eos-arch))); + mXPUSHs(newSVpv(arch, eos-arch)); } break; case RPMTAG_SUMMARY: - XPUSHs(sv_2mortal(newSVpv(pkg->summary, 0))); + mXPUSHs(newSVpv(pkg->summary, 0)); break; } } @@ -681,7 +681,7 @@ return_files(Header header, int filter_mode) { if ((filter_mode & FILTER_MODE_CONF_FILES) && flags && (flags[i] & RPMFILE_CONFIG) == 0) continue; } - XPUSHs(sv_2mortal(newSVpv(s, len))); + mXPUSHs(newSVpv(s, len)); } free(baseNames); @@ -704,7 +704,7 @@ return_problems(rpmps ps, int translate_message, int raw_message) { const char *buf = rpmProblemString(p); SV *sv = newSVpv(buf, 0); if (rpm_codeset_is_utf8) SvUTF8_on(sv); - XPUSHs(sv_2mortal(sv)); + mXPUSHs(sv); _free(buf); } if (raw_message) { @@ -746,7 +746,7 @@ return_problems(rpmps ps, int translate_message, int raw_message) { default: sv = newSVpvf("unknown@%s", pkgNEVR); break; } - XPUSHs(sv_2mortal(sv)); + mXPUSHs(sv); } } rpmpsFreeIterator(iterator); @@ -1359,12 +1359,12 @@ static void *rpmRunTransactions_callback(__attribute__((unused)) const void *h, SAVETMPS; PUSHMARK(SP); XPUSHs(td->data); - XPUSHs(sv_2mortal(newSVpv(callback_type, 0))); + mXPUSHs(newSVpv(callback_type, 0)); XPUSHs(pkgKey != NULL ? sv_2mortal(newSViv((long)pkgKey - 1)) : &PL_sv_undef); if (callback_subtype != NULL) { - XPUSHs(sv_2mortal(newSVpv(callback_subtype, 0))); - XPUSHs(sv_2mortal(newSViv(amount))); - XPUSHs(sv_2mortal(newSViv(total))); + mXPUSHs(newSVpv(callback_subtype, 0)); + mXPUSHs(newSViv(amount)); + mXPUSHs(newSViv(total)); } PUTBACK; i = call_sv(callback, callback == td->callback_open ? G_SCALAR : G_DISCARD); @@ -1448,9 +1448,9 @@ Pkg_name(pkg) get_fullname_parts(pkg, &name, &version, NULL, NULL, NULL); if (version - name < 1) croak("invalid fullname"); - XPUSHs(sv_2mortal(newSVpv(name, version-name-1))); + mXPUSHs(newSVpv(name, version-name-1)); } else if (pkg->h) { - XPUSHs(sv_2mortal(newSVpv(get_name(pkg->h, RPMTAG_NAME), 0))); + mXPUSHs(newSVpv(get_name(pkg->h, RPMTAG_NAME), 0)); } void @@ -1463,9 +1463,9 @@ Pkg_version(pkg) get_fullname_parts(pkg, NULL, &version, &release, NULL, NULL); if (release - version < 1) croak("invalid fullname"); - XPUSHs(sv_2mortal(newSVpv(version, release-version-1))); + mXPUSHs(newSVpv(version, release-version-1)); } else if (pkg->h) { - XPUSHs(sv_2mortal(newSVpv(get_name(pkg->h, RPMTAG_VERSION), 0))); + mXPUSHs(newSVpv(get_name(pkg->h, RPMTAG_VERSION), 0)); } void @@ -1478,9 +1478,9 @@ Pkg_release(pkg) get_fullname_parts(pkg, NULL, NULL, &release, &arch, NULL); if (arch - release < 1) croak("invalid fullname"); - XPUSHs(sv_2mortal(newSVpv(release, arch-release-1))); + mXPUSHs(newSVpv(release, arch-release-1)); } else if (pkg->h) { - XPUSHs(sv_2mortal(newSVpv(get_name(pkg->h, RPMTAG_RELEASE), 0))); + mXPUSHs(newSVpv(get_name(pkg->h, RPMTAG_RELEASE), 0)); } void @@ -1492,9 +1492,9 @@ Pkg_arch(pkg) char *eos; get_fullname_parts(pkg, NULL, NULL, NULL, &arch, &eos); - XPUSHs(sv_2mortal(newSVpv(arch, eos-arch))); + mXPUSHs(newSVpv(arch, eos-arch)); } else if (pkg->h) { - XPUSHs(sv_2mortal(newSVpv(headerIsEntry(pkg->h, RPMTAG_SOURCERPM) ? get_name(pkg->h, RPMTAG_ARCH) : "src", 0))); + mXPUSHs(newSVpv(headerIsEntry(pkg->h, RPMTAG_SOURCERPM) ? get_name(pkg->h, RPMTAG_ARCH) : "src", 0)); } int @@ -1538,9 +1538,9 @@ Pkg_summary(pkg) URPM::Package pkg PPCODE: if (pkg->summary) { - XPUSHs(sv_2mortal(newSVpv_utf8(pkg->summary, 0))); + mXPUSHs(newSVpv_utf8(pkg->summary, 0)); } else if (pkg->h) { - XPUSHs(sv_2mortal(newSVpv_utf8(get_name(pkg->h, RPMTAG_SUMMARY), 0))); + mXPUSHs(newSVpv_utf8(get_name(pkg->h, RPMTAG_SUMMARY), 0)); } void @@ -1548,7 +1548,7 @@ Pkg_description(pkg) URPM::Package pkg PPCODE: if (pkg->h) { - XPUSHs(sv_2mortal(newSVpv_utf8(get_name(pkg->h, RPMTAG_DESCRIPTION), 0))); + mXPUSHs(newSVpv_utf8(get_name(pkg->h, RPMTAG_DESCRIPTION), 0)); } void @@ -1556,7 +1556,7 @@ Pkg_sourcerpm(pkg) URPM::Package pkg PPCODE: if (pkg->h) { - XPUSHs(sv_2mortal(newSVpv(get_name(pkg->h, RPMTAG_SOURCERPM), 0))); + mXPUSHs(newSVpv(get_name(pkg->h, RPMTAG_SOURCERPM), 0)); } void @@ -1564,7 +1564,7 @@ Pkg_packager(pkg) URPM::Package pkg PPCODE: if (pkg->h) { - XPUSHs(sv_2mortal(newSVpv_utf8(get_name(pkg->h, RPMTAG_PACKAGER), 0))); + mXPUSHs(newSVpv_utf8(get_name(pkg->h, RPMTAG_PACKAGER), 0)); } void @@ -1572,7 +1572,7 @@ Pkg_buildhost(pkg) URPM::Package pkg PPCODE: if (pkg->h) { - XPUSHs(sv_2mortal(newSVpv(get_name(pkg->h, RPMTAG_BUILDHOST), 0))); + mXPUSHs(newSVpv(get_name(pkg->h, RPMTAG_BUILDHOST), 0)); } int @@ -1604,7 +1604,7 @@ Pkg_url(pkg) URPM::Package pkg PPCODE: if (pkg->h) { - XPUSHs(sv_2mortal(newSVpv(get_name(pkg->h, RPMTAG_URL), 0))); + mXPUSHs(newSVpv(get_name(pkg->h, RPMTAG_URL), 0)); } void @@ -1612,7 +1612,7 @@ Pkg_license(pkg) URPM::Package pkg PPCODE: if (pkg->h) { - XPUSHs(sv_2mortal(newSVpv(get_name(pkg->h, RPMTAG_LICENSE), 0))); + mXPUSHs(newSVpv(get_name(pkg->h, RPMTAG_LICENSE), 0)); } void @@ -1620,7 +1620,7 @@ Pkg_distribution(pkg) URPM::Package pkg PPCODE: if (pkg->h) { - XPUSHs(sv_2mortal(newSVpv(get_name(pkg->h, RPMTAG_DISTRIBUTION), 0))); + mXPUSHs(newSVpv(get_name(pkg->h, RPMTAG_DISTRIBUTION), 0)); } void @@ -1628,7 +1628,7 @@ Pkg_vendor(pkg) URPM::Package pkg PPCODE: if (pkg->h) { - XPUSHs(sv_2mortal(newSVpv(get_name(pkg->h, RPMTAG_VENDOR), 0))); + mXPUSHs(newSVpv(get_name(pkg->h, RPMTAG_VENDOR), 0)); } void @@ -1636,7 +1636,7 @@ Pkg_os(pkg) URPM::Package pkg PPCODE: if (pkg->h) { - XPUSHs(sv_2mortal(newSVpv(get_name(pkg->h, RPMTAG_OS), 0))); + mXPUSHs(newSVpv(get_name(pkg->h, RPMTAG_OS), 0)); } void @@ -1644,7 +1644,7 @@ Pkg_payload_format(pkg) URPM::Package pkg PPCODE: if (pkg->h) { - XPUSHs(sv_2mortal(newSVpv(get_name(pkg->h, RPMTAG_PAYLOADFORMAT), 0))); + mXPUSHs(newSVpv(get_name(pkg->h, RPMTAG_PAYLOADFORMAT), 0)); } void @@ -1657,7 +1657,7 @@ Pkg_fullname(pkg) if (gimme == G_SCALAR) { char *eos; if ((eos = strchr(pkg->info, '@')) != NULL) { - XPUSHs(sv_2mortal(newSVpv(pkg->info, eos-pkg->info))); + mXPUSHs(newSVpv(pkg->info, eos-pkg->info)); } } else if (gimme == G_ARRAY) { char *name, *version, *release, *arch, *eos; @@ -1677,7 +1677,7 @@ Pkg_fullname(pkg) char *arch = headerIsEntry(pkg->h, RPMTAG_SOURCERPM) ? get_name(pkg->h, RPMTAG_ARCH) : "src"; if (gimme == G_SCALAR) { - XPUSHs(sv_2mortal(newSVpvf("%s-%s-%s.%s", name, version, release, arch))); + mXPUSHs(newSVpvf("%s-%s-%s.%s", name, version, release, arch)); } else if (gimme == G_ARRAY) { EXTEND(SP, 4); PUSHs(sv_2mortal(newSVpv(name, 0))); @@ -1935,10 +1935,10 @@ Pkg_group(pkg) if ((s = strchr(pkg->info, '@')) != NULL && (s = strchr(s+1, '@')) != NULL && (s = strchr(s+1, '@')) != NULL) { char *eos = strchr(s+1, '@'); - XPUSHs(sv_2mortal(newSVpv_utf8(s+1, eos != NULL ? eos-s-1 : 0))); + mXPUSHs(newSVpv_utf8(s+1, eos != NULL ? eos-s-1 : 0)); } } else if (pkg->h) { - XPUSHs(sv_2mortal(newSVpv_utf8(get_name(pkg->h, RPMTAG_GROUP), 0))); + mXPUSHs(newSVpv_utf8(get_name(pkg->h, RPMTAG_GROUP), 0)); } void @@ -1952,7 +1952,7 @@ Pkg_filename(pkg) char savbuf[4]; memcpy(savbuf, eon, 4); /* there should be at least epoch and size described so (@0@0 minimum) */ memcpy(eon, ".rpm", 4); - XPUSHs(sv_2mortal(newSVpv(pkg->info, eon-pkg->info+4))); + mXPUSHs(newSVpv(pkg->info, eon-pkg->info+4)); memcpy(eon, savbuf, 4); } } else if (pkg->h) { @@ -1961,7 +1961,7 @@ Pkg_filename(pkg) char *release = get_name(pkg->h, RPMTAG_RELEASE); char *arch = headerIsEntry(pkg->h, RPMTAG_SOURCERPM) ? get_name(pkg->h, RPMTAG_ARCH) : "src"; - XPUSHs(sv_2mortal(newSVpvf("%s-%s-%s.%s.rpm", name, version, release, arch))); + mXPUSHs(newSVpvf("%s-%s-%s.%s.rpm", name, version, release, arch)); } # deprecated @@ -1973,7 +1973,7 @@ Pkg_header_filename(pkg) char *eon; if ((eon = strchr(pkg->info, '@')) != NULL) { - XPUSHs(sv_2mortal(newSVpv(pkg->info, eon-pkg->info))); + mXPUSHs(newSVpv(pkg->info, eon-pkg->info)); } } else if (pkg->h) { char buff[1024]; @@ -1984,7 +1984,7 @@ Pkg_header_filename(pkg) char *arch = headerIsEntry(pkg->h, RPMTAG_SOURCERPM) ? get_name(pkg->h, RPMTAG_ARCH) : "src"; p += snprintf(buff, sizeof(buff), "%s-%s-%s.%s", name, version, release, arch); - XPUSHs(sv_2mortal(newSVpv(buff, p-buff))); + mXPUSHs(newSVpv(buff, p-buff)); } void @@ -1992,7 +1992,7 @@ Pkg_id(pkg) URPM::Package pkg PPCODE: if ((pkg->flag & FLAG_ID) <= FLAG_ID_MAX) { - XPUSHs(sv_2mortal(newSViv(pkg->flag & FLAG_ID))); + mXPUSHs(newSViv(pkg->flag & FLAG_ID)); } void @@ -2001,7 +2001,7 @@ Pkg_set_id(pkg, id=-1) int id PPCODE: if ((pkg->flag & FLAG_ID) <= FLAG_ID_MAX) { - XPUSHs(sv_2mortal(newSViv(pkg->flag & FLAG_ID))); + mXPUSHs(newSViv(pkg->flag & FLAG_ID)); } pkg->flag &= ~FLAG_ID; pkg->flag |= id >= 0 && id <= FLAG_ID_MAX ? id : FLAG_ID_INVALID; @@ -2201,7 +2201,7 @@ void Pkg_distepoch(pkg) PPCODE: #ifdef RPMTAG_DISTEPOCH if (pkg->h) { - XPUSHs(sv_2mortal(newSVpv(get_name(pkg->h, RPMTAG_DISTEPOCH), 0))); + mXPUSHs(newSVpv(get_name(pkg->h, RPMTAG_DISTEPOCH), 0)); } #else croak("distepoch isn't available with this rpm version"); @@ -2211,7 +2211,7 @@ void Pkg_disttag(pkg) URPM::Package pkg PPCODE: if (pkg->h) { - XPUSHs(sv_2mortal(newSVpv(get_name(pkg->h, RPMTAG_DISTTAG), 0))); + mXPUSHs(newSVpv(get_name(pkg->h, RPMTAG_DISTTAG), 0)); } void @@ -2344,7 +2344,7 @@ Pkg_queryformat(pkg, fmt) if (pkg->h) { s = headerFormat(pkg->h, fmt, NULL); if (s) { - XPUSHs(sv_2mortal(newSVpv_utf8(s,0))); + mXPUSHs(newSVpv_utf8(s,0)); } } @@ -2690,10 +2690,10 @@ Pkg_rflags(pkg) char *s = pkg->rflags; char *eos; while ((eos = strchr(s, '\t')) != NULL) { - XPUSHs(sv_2mortal(newSVpv(s, eos-s))); + mXPUSHs(newSVpv(s, eos-s)); s = eos + 1; } - XPUSHs(sv_2mortal(newSVpv(s, 0))); + mXPUSHs(newSVpv(s, 0)); } void @@ -2724,10 +2724,10 @@ Pkg_set_rflags(pkg, ...) char *s = pkg->rflags; char *eos; while ((eos = strchr(s, '\t')) != NULL) { - XPUSHs(sv_2mortal(newSVpv(s, eos-s))); + mXPUSHs(newSVpv(s, eos-s)); s = eos + 1; } - XPUSHs(sv_2mortal(newSVpv(s, 0))); + mXPUSHs(newSVpv(s, 0)); } free(pkg->rflags); @@ -2817,7 +2817,7 @@ Db_traverse(db,callback) pkg->h = header; PUSHMARK(SP); - XPUSHs(sv_2mortal(sv_setref_pv(newSVpv("", 0), "URPM::Package", pkg))); + mXPUSHs(sv_setref_pv(newSVpv("", 0), "URPM::Package", pkg)); PUTBACK; call_sv(callback, G_DISCARD | G_SCALAR); @@ -2871,7 +2871,7 @@ Db_traverse_tag(db,tag,names,callback) pkg->h = header; PUSHMARK(SP); - XPUSHs(sv_2mortal(sv_setref_pv(newSVpv("", 0), "URPM::Package", pkg))); + mXPUSHs(sv_setref_pv(newSVpv("", 0), "URPM::Package", pkg)); PUTBACK; call_sv(callback, G_DISCARD | G_SCALAR); @@ -2916,7 +2916,7 @@ Db_traverse_tag_find(db,tag,name,callback) pkg->h = header; PUSHMARK(SP); - XPUSHs(sv_2mortal(sv_setref_pv(newSVpv("", 0), "URPM::Package", pkg))); + mXPUSHs(sv_setref_pv(newSVpv("", 0), "URPM::Package", pkg)); PUTBACK; int count = call_sv(callback, G_SCALAR); @@ -3064,7 +3064,7 @@ Trans_traverse(trans, callback) pkg->flag = FLAG_ID_INVALID | FLAG_NO_HEADER_FREE; pkg->h = h; PUSHMARK(SP); - XPUSHs(sv_2mortal(sv_setref_pv(newSVpv("", 0), "URPM::Package", pkg))); + mXPUSHs(sv_setref_pv(newSVpv("", 0), "URPM::Package", pkg)); PUTBACK; call_sv(callback, G_DISCARD | G_SCALAR); SPAGAIN; @@ -3095,15 +3095,15 @@ Trans_check(trans, ...) } if (rpmtsCheck(trans->ts)) { if (gimme == G_SCALAR) { - XPUSHs(sv_2mortal(newSViv(0))); + mXPUSHs(newSViv(0)); } else if (gimme == G_ARRAY) { - XPUSHs(sv_2mortal(newSVpv("error while checking dependencies", 0))); + mXPUSHs(newSVpv("error while checking dependencies", 0)); } } else { rpmps ps = rpmtsProblems(trans->ts); if (rpmpsNumProblems(ps) > 0) { if (gimme == G_SCALAR) { - XPUSHs(sv_2mortal(newSViv(0))); + mXPUSHs(newSViv(0)); } else if (gimme == G_ARRAY) { /* now translation is handled by rpmlib, but only for version 4.2 and above */ PUTBACK; @@ -3111,7 +3111,7 @@ Trans_check(trans, ...) SPAGAIN; } } else if (gimme == G_SCALAR) { - XPUSHs(sv_2mortal(newSViv(1))); + mXPUSHs(newSViv(1)); } ps = rpmpsFree(ps); } @@ -3124,13 +3124,13 @@ Trans_order(trans) PPCODE: if (rpmtsOrder(trans->ts) == 0) { if (gimme == G_SCALAR) { - XPUSHs(sv_2mortal(newSViv(1))); + mXPUSHs(newSViv(1)); } } else { if (gimme == G_SCALAR) { - XPUSHs(sv_2mortal(newSViv(0))); + mXPUSHs(newSViv(0)); } else if (gimme == G_ARRAY) { - XPUSHs(sv_2mortal(newSVpv("error while ordering dependencies", 0))); + mXPUSHs(newSVpv("error while ordering dependencies", 0)); } } @@ -3408,8 +3408,8 @@ Urpm_parse_synthesis__XS(urpm, filename, ...) if (gzclose(f) != 0) ok = 0; SPAGAIN; if (ok) { - XPUSHs(sv_2mortal(newSViv(start_id))); - XPUSHs(sv_2mortal(newSViv(av_len(depslist)))); + mXPUSHs(newSViv(start_id)); + mXPUSHs(newSViv(av_len(depslist))); } } else { SV **nofatal = hv_fetch((HV*)SvRV(urpm), "nofatal", 7, 0); @@ -3446,8 +3446,8 @@ Urpm_parse_hdlist__XS(urpm, filename, ...) close(d); if (empty_archive) { - XPUSHs(sv_2mortal(newSViv(1 + av_len(depslist)))); - XPUSHs(sv_2mortal(newSViv(av_len(depslist)))); + mXPUSHs(newSViv(1 + av_len(depslist))); + mXPUSHs(newSViv(av_len(depslist))); } else if (d >= 0 && fd) { Header header; int start_id = 1 + av_len(depslist); @@ -3508,8 +3508,8 @@ Urpm_parse_hdlist__XS(urpm, filename, ...) } SPAGAIN; if (ok) { - XPUSHs(sv_2mortal(newSViv(start_id))); - XPUSHs(sv_2mortal(newSViv(av_len(depslist)))); + mXPUSHs(newSViv(start_id)); + mXPUSHs(newSViv(av_len(depslist))); } } else { SV **nofatal = hv_fetch((HV*)SvRV(urpm), "nofatal", 7, 0); @@ -3599,8 +3599,8 @@ Urpm_parse_rpm(urpm, filename, ...) } SPAGAIN; /* only one element read */ - XPUSHs(sv_2mortal(newSViv(av_len(depslist)))); - XPUSHs(sv_2mortal(newSViv(av_len(depslist)))); + mXPUSHs(newSViv(av_len(depslist))); + mXPUSHs(newSViv(av_len(depslist))); } else free(_pkg); } else croak("first argument should contain a depslist ARRAY reference"); } else croak("first argument should be a reference to a HASH"); |