[libauthen-sasl-cyrus-perl] 04/05: Use INT2PTR to convert IV to pointers
Russ Allbery
rra at stanford.edu
Wed Mar 5 21:49:52 UTC 2014
This is an automated email from the git hooks/post-receive script.
rra pushed a commit to branch master
in repository libauthen-sasl-cyrus-perl.
commit da1a35e4247acb6e332d6cc975d4b48c6ba2d9bd
Author: Russ Allbery <eagle at eyrie.org>
Date: Wed Mar 5 13:42:07 2014 -0800
Use INT2PTR to convert IV to pointers
* Use the standard INT2PTR macro to convert passed Perl object values to
the underlying Cyrus SASL struct. This shouldn't change the generated
code, but it will fix build warnings and make it easier to find real
build issues.
---
debian/changelog | 4 ++++
debian/patches/series | 1 +
debian/patches/use-int2ptr | 19 +++++++++++++++++++
3 files changed, 24 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index 8df4b48..56d74f9 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -8,6 +8,10 @@ libauthen-sasl-cyrus-perl (0.13-server-9) UNRELEASED; urgency=low
[ Russ Allbery]
* Enable bindnow hardening flags.
+ * Use the standard INT2PTR macro to convert passed Perl object values to
+ the underlying Cyrus SASL struct. This shouldn't change the generated
+ code, but it will fix build warnings and make it easier to find real
+ build issues.
* Update Homepage to point to the author's CPAN directory, since the
author's home page appears to have gone away. (This package is of a
fork of the default CPAN version that adds server support, so the
diff --git a/debian/patches/series b/debian/patches/series
index 20fba59..396f1f6 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -5,3 +5,4 @@ generate-man-pages
fix-pod-errors
strlen-size
test-warnings
+use-int2ptr
diff --git a/debian/patches/use-int2ptr b/debian/patches/use-int2ptr
new file mode 100644
index 0000000..027cc4b
--- /dev/null
+++ b/debian/patches/use-int2ptr
@@ -0,0 +1,19 @@
+Author: Russ Allbery <rra at debian.org>
+Description: Use INT2PTR to map objects to Cyrus SASL pointers
+
+Rather than directly casting the IV to the target pointer, use
+Perl's standard INT2PTR macro. This shouldn't change the resulting
+code, but it will suppress build warnings and make it easier to
+spot real build issues.
+
+--- libauthen-sasl-cyrus-perl.orig/typemap
++++ libauthen-sasl-cyrus-perl/typemap
+@@ -6,7 +6,7 @@
+ T_PTROBJ_SPECIAL
+ if (sv_derived_from($arg, \"${(my $ntt=$ntype)=~s/_/::/g; \$ntt}\")) {
+ IV tmp = SvIV((SV*)SvRV($arg));
+- $var = ($type) tmp;
++ $var = INT2PTR($type, tmp);
+ }
+ else
+ croak(\"$var is not of type ${(my $ntt=$ntype)=~s /_/::/g;\$ntt}\")
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libauthen-sasl-cyrus-perl.git
More information about the Pkg-perl-cvs-commits
mailing list