aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <thierry.vignaud@gmail.com>2017-09-07 11:53:38 +0200
committerThierry Vignaud <thierry.vignaud@gmail.com>2017-09-07 11:57:24 +0200
commite5ee31898cdc9177df164a3c43a176b2d43846a5 (patch)
tree6385e5af6a3bedacf81404bf20da563e72b6c30e
parent862bc7db3b81352bd7d199b046cd9ed6475bb621 (diff)
downloadperl-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--NEWS3
-rw-r--r--URPM.xs16
2 files changed, 11 insertions, 8 deletions
diff --git a/NEWS b/NEWS
index b5183b6..dcaeec5 100644
--- a/NEWS
+++ b/NEWS
@@ -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
diff --git a/URPM.xs b/URPM.xs
index 305e4aa..8926770 100644
--- a/URPM.xs
+++ b/URPM.xs
@@ -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) {