summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <thierry.vignaud@gmail.com>2022-04-27 00:33:09 +0200
committerThierry Vignaud <thierry.vignaud@gmail.com>2022-04-27 00:59:41 +0200
commitab1249d6ad5af36cc8bf2e8e7c9051b13943ebd6 (patch)
treed71f5e662767a048d829d3ac2267d2538106c6f8
parent88e4b74ee7198c110166ddfe790f62dd5eeef1c6 (diff)
downloadperl-RPM4-ab1249d6ad5af36cc8bf2e8e7c9051b13943ebd6.tar
perl-RPM4-ab1249d6ad5af36cc8bf2e8e7c9051b13943ebd6.tar.gz
perl-RPM4-ab1249d6ad5af36cc8bf2e8e7c9051b13943ebd6.tar.bz2
perl-RPM4-ab1249d6ad5af36cc8bf2e8e7c9051b13943ebd6.tar.xz
perl-RPM4-ab1249d6ad5af36cc8bf2e8e7c9051b13943ebd6.zip
Prepare for rpm-4.19: switch to headerExport()
-rw-r--r--RPM4/src/RPM4.xs6
1 files changed, 3 insertions, 3 deletions
diff --git a/RPM4/src/RPM4.xs b/RPM4/src/RPM4.xs
index 3f54b29..3f252dc 100644
--- a/RPM4/src/RPM4.xs
+++ b/RPM4/src/RPM4.xs
@@ -946,11 +946,11 @@ Header_string(h, no_header_magic = 0)
PREINIT:
char * string = NULL;
char * ptr = NULL;
- int hsize = 0;
+ unsigned int hsize = 0;
PPCODE:
- hsize = headerSizeof(h, no_header_magic ? HEADER_MAGIC_NO : HEADER_MAGIC_YES);
- string = headerUnload(h);
+ string = headerExport(h, &hsize);
if (! no_header_magic) {
+ hsize +=sizeof(header_magic); // Adjust for header_magic
ptr = malloc(hsize);
memcpy(ptr, header_magic, 8);
memcpy(ptr + 8, string, hsize - 8);