diff options
author | Thierry Vignaud <thierry.vignaud@gmail.com> | 2017-09-07 11:53:38 +0200 |
---|---|---|
committer | Thierry Vignaud <thierry.vignaud@gmail.com> | 2017-09-07 11:57:24 +0200 |
commit | e5ee31898cdc9177df164a3c43a176b2d43846a5 (patch) | |
tree | 6385e5af6a3bedacf81404bf20da563e72b6c30e | |
parent | 862bc7db3b81352bd7d199b046cd9ed6475bb621 (diff) | |
download | perl-URPM-e5ee31898cdc9177df164a3c43a176b2d43846a5.tar perl-URPM-e5ee31898cdc9177df164a3c43a176b2d43846a5.tar.gz perl-URPM-e5ee31898cdc9177df164a3c43a176b2d43846a5.tar.bz2 perl-URPM-e5ee31898cdc9177df164a3c43a176b2d43846a5.tar.xz perl-URPM-e5ee31898cdc9177df164a3c43a176b2d43846a5.zip |
use native 64bit integers instead of Math::Int64
it's now possible since perl-5.26.0-8.mga7
-rw-r--r-- | NEWS | 3 | ||||
-rw-r--r-- | URPM.xs | 16 |
2 files changed, 11 insertions, 8 deletions
@@ -1,3 +1,6 @@ +- use native 64bit integers instead of Math::Int64 + (needs perl >= 5.26.0-8.mga7) + Version 5.13 - 23 August 2017 - add support to rpm-4.14 @@ -46,7 +46,7 @@ typedef struct rpmSpec_s * Spec; struct s_Package { Header h; - uint64_t filesize; + UV filesize; unsigned flag; char *info; char *requires; @@ -201,7 +201,7 @@ get_arch(const Header header) { return headerIsEntry(header, RPMTAG_SOURCERPM) ? get_name(header, RPMTAG_ARCH) : "src"; } -static uint64_t +static UV get_int(const Header header, rpmTag tag) { struct rpmtd_s val; @@ -209,7 +209,7 @@ get_int(const Header header, rpmTag tag) { return rpmtdGetNumber(&val); } -static uint64_t +static UV get_int2(const Header header, rpmTag newtag, rpmTag oldtag) { struct rpmtd_s val; @@ -218,7 +218,7 @@ get_int2(const Header header, rpmTag newtag, rpmTag oldtag) { return rpmtdGetNumber(&val); } -static uint64_t +static UV get_filesize(const Header h) { return get_int2(h, RPMTAG_LONGSIGSIZE, RPMTAG_SIGSIZE) + 440; /* 440 is the rpm header size (?) empirical, but works */ } @@ -1760,7 +1760,7 @@ Pkg_compare(pkg, evr) OUTPUT: RETVAL -uint64_t +UV Pkg_size(pkg) URPM::Package pkg CODE: @@ -1784,11 +1784,11 @@ Pkg_size(pkg) void Pkg_set_filesize(pkg, filesize) URPM::Package pkg - uint64_t filesize; + UV filesize; PPCODE: pkg->filesize = filesize; -uint64_t +UV Pkg_filesize(pkg) URPM::Package pkg CODE: @@ -2096,7 +2096,7 @@ Pkg_build_info(pkg, fileno, provides_files=NULL, recommends=0) CODE: if (pkg->info) { char buff[65536*2]; - uint64_t size; + UV size; /* info line should be the last to be written */ if (pkg->provides && *pkg->provides) { |