Use the right macro, which should avoid the warnings seen with Perl
headers on some architecture.
---
generator/perl.ml | 2 +-
perl/typemap | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/generator/perl.ml b/generator/perl.ml
index 19cabb6..a665051 100644
--- a/generator/perl.ml
+++ b/generator/perl.ml
@@ -242,7 +242,7 @@ DESTROY (sv)
HV *hv = (HV *) SvRV (sv);
SV **svp = hv_fetch (hv, \"_g\", 2, 0);
if (svp != NULL) {
- guestfs_h *g = (guestfs_h *) SvIV (*svp);
+ guestfs_h *g = INT2PTR (guestfs_h *, SvIV (*svp));
_close_handle (g);
}
diff --git a/perl/typemap b/perl/typemap
index 508e378..0a92e53 100644
--- a/perl/typemap
+++ b/perl/typemap
@@ -14,7 +14,7 @@ O_OBJECT_guestfs_h
SV **svp = hv_fetch (hv, \"_g\", 2, 0);
if (svp == NULL)
croak (\"${Package}::$func_name(): called on a closed handle\");
- $var = ($type) SvIV (*svp);
+ $var = INT2PTR ($type, SvIV (*svp));
} else {
croak (\"${Package}::$func_name(): $var is not a blessed HV
reference\");
}
--
2.5.5