This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
%x can't be used directly with pointers.
authorBen Morrow <ben@morrow.me.uk>
Sun, 17 Oct 2010 22:03:58 +0000 (23:03 +0100)
committerFather Chrysostomos <sprout@cpan.org>
Mon, 22 Nov 2010 17:17:41 +0000 (09:17 -0800)
(I keep forgetting this.) Change the four occurrences in the new custom
op tests to UVxf with a PTR2UV around the pointer.

ext/XS-APItest/APItest.xs

index 60047ea..358159b 100644 (file)
@@ -914,8 +914,8 @@ static void
 peep_xop(pTHX_ OP *o, OP *oldop)
 {
     dMY_CXT;
-    av_push(MY_CXT.xop_record, newSVpvf("peep:%x", o));
-    av_push(MY_CXT.xop_record, newSVpvf("oldop:%x", oldop));
+    av_push(MY_CXT.xop_record, newSVpvf("peep:%"UVxf, PTR2UV(o)));
+    av_push(MY_CXT.xop_record, newSVpvf("oldop:%"UVxf, PTR2UV(oldop)));
 }
 
 XS(XS_XS__APItest__XSUB_XS_VERSION_undef);
@@ -1456,8 +1456,8 @@ xop_build_optree ()
         unop->op_next       = NULL;
         kid->op_next        = (OP*)unop;
 
-        av_push(MY_CXT.xop_record, newSVpvf("unop:%x", unop));
-        av_push(MY_CXT.xop_record, newSVpvf("kid:%x", kid));
+        av_push(MY_CXT.xop_record, newSVpvf("unop:%"UVxf, PTR2UV(unop)));
+        av_push(MY_CXT.xop_record, newSVpvf("kid:%"UVxf, PTR2UV(kid)));
 
         av_push(MY_CXT.xop_record, newSVpvf("NAME:%s", OP_NAME((OP*)unop)));
         av_push(MY_CXT.xop_record, newSVpvf("DESC:%s", OP_DESC((OP*)unop)));