Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Devel-PPPort CPAN distribution.

Report information
The Basics
Id: 43155
Status: resolved
Priority: 0/
Queue: Devel-PPPort

People
Owner: Nobody in particular
Requestors: CHOCOLATE [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in:
  • 2.99_01
  • 2.99_02
  • 2.99_03
  • 2.99_04
  • 2.99_05
  • 2.99_06
  • 2.99_07
  • 3.00
  • 3.00_01
  • 3.00_02
  • 3.00_03
  • 3.01
  • 3.02
  • 3.03
  • 3.04
  • 3.05
  • 3.06
  • 3.06_01
  • 3.06_02
  • 3.06_03
  • 3.06_04
  • 3.07
  • 3.08
  • 3.08_01
  • 3.08_02
  • 3.08_03
  • 3.08_04
  • 3.08_05
  • 3.08_07
  • 3.09
  • 3.09_01
  • 3.09_02
  • 3.10
  • 3.10_01
  • 3.10_02
  • 3.11
  • 3.11_01
  • 3.11_02
  • 3.11_03
  • 3.11_04
  • 3.11_05
  • 3.11_06
  • 3.12
  • 3.13
  • 3.13_02
  • 3.13_03
  • 3.14
  • 3.14_01
  • 3.14_02
  • 3.14_03
  • 3.14_04
  • 3.14_05
  • 3.15
  • 3.16
Fixed in: 3.17



Subject: patch to add PTR2nat and fix PTR2ul
The attached patch against 3.16 adds support for PTR2nat, introduced in perl 5.8.8. It also includes a fix for PTR2ul. INT2PTR was introduced in 5.6.0. PTR2ul was introduced in 5.6.1. Previously ppport.h only defined PTR2ul if INT2PTR was undefined, so 5.6.0 missed out. The metadata for PTR2ul has been fixed as well: s/5007001/5006001/.
Subject: ppport-3.16.h.diff
--- ppport.h.orig 2009-02-09 18:06:05.000000000 +0000 +++ ppport.h 2009-02-09 19:06:12.000000000 +0000 @@ -703,7 +703,8 @@ PTR2IV|5.006000||p PTR2NV|5.006000||p PTR2UV|5.006000||p -PTR2ul|5.007001||p +PTR2nat|5.008008||p +PTR2ul|5.006001||p PTRV|5.006000||p PUSHMARK||| PUSH_MULTICALL||5.011000| @@ -3750,13 +3751,20 @@ # define PTR2UV(p) INT2PTR(UV,p) # define PTR2NV(p) NUM2PTR(NV,p) +#endif /* !INT2PTR */ + +/* don't include this under #ifndef INT2PTR - INT2PTR is defined from 5.6.0, while PTR2ul is defined from 5.6.1 */ +#ifndef PTR2ul # if PTRSIZE == LONGSIZE # define PTR2ul(p) (unsigned long)(p) # else # define PTR2ul(p) INT2PTR(unsigned long,p) # endif +#endif -#endif /* !INT2PTR */ +#ifndef PTR2nat /* introduced in 5.8.8 */ +# define PTR2nat(p) (PTRV)(p) /* pointer to (unsigned) integer of PTRSIZE */ +#endif #undef START_EXTERN_C #undef END_EXTERN_C
Hi, thanks for the patch. However, as ppport.h says in its header, it doesn't like being patched (see HACKERS for details). I've reworked the whole PTR stuff (which btw is in parts/inc/misc) and also added some test cases. This is now part of Devel::PPPort 3.17. And sorry for the delayed response, but I've been on vacation the last 5 weeks. Cheers, Marcus