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: 80339
Status: stalled
Priority: 0/
Queue: Devel-PPPort

People
Owner: Nobody in particular
Requestors: 'spro^^*%*^6ut# [...] &$%*c
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: 5.17.4 pad API
I thought you might want to consider adding support for 5.17.4’s pad API. Here is what I have been using for the modules I have patched: #ifndef PadARRAY typedef AV PADNAMELIST; typedef SV PADNAME; # if PERL_VERSION < 8 || (PERL_VERSION == 8 && !PERL_SUBVERSION) typedef AV PADLIST; typedef AV PAD; # endif # define PadlistARRAY(pl) ((PAD **)AvARRAY(pl)) # define PadlistMAX(pl) AvFILLp(pl) # define PadlistNAMES(pl) (*PadlistARRAY(pl)) # define PadlistNAMESARRAY(pl) AvARRAY(*PadlistARRAY(pl)) # define PadlistNAMESMAX(pl) AvFILLp(*PadlistARRAY(pl)) # define PadnamelistARRAY(pnl) ((PADNAME **)AvARRAY(pnl)) # define PadnamelistMAX(pnl) AvFILLp(pnl) # define PadARRAY(pad) AvARRAY(pad) # define PadMAX(pad) AvFILLp(pad) # define PadnameIsOUR(pn) !!(SvFLAGS(pn) & SVpad_OUR) # define PadnameLEN(pn) SvCUR(pn) # define PadnameOURSTASH(pn) SvOURSTASH(pn) # define PadnameOUTER(pn) !!SvFAKE(pn) # define PadnamePV(pn) (SvPOKp(pn) ? SvPVX(pn) : NULL) # ifdef SvPAD_STATE # define PadnameSTATE(pn) SvPAD_STATE(pn) # else # define PadnameSTATE(pn) 0 # endif # define PadnameSV(pn) pn # define PadlistREFCNT(pl) 1 #endif
On Mon Oct 22 16:35:23 2012, SPROUT wrote: Show quoted text
> I thought you might want to consider adding support for 5.17.4’s pad > API. Here is what I > have been using for the modules I have patched: > > > #ifndef PadARRAY > typedef AV PADNAMELIST; > typedef SV PADNAME; > # if PERL_VERSION < 8 || (PERL_VERSION == 8 && !PERL_SUBVERSION) > typedef AV PADLIST; > typedef AV PAD; > # endif > # define PadlistARRAY(pl) ((PAD **)AvARRAY(pl)) > # define PadlistMAX(pl) AvFILLp(pl) > # define PadlistNAMES(pl) (*PadlistARRAY(pl)) > # define PadlistNAMESARRAY(pl) AvARRAY(*PadlistARRAY(pl)) > # define PadlistNAMESMAX(pl) AvFILLp(*PadlistARRAY(pl)) > # define PadnamelistARRAY(pnl) ((PADNAME **)AvARRAY(pnl)) > # define PadnamelistMAX(pnl) AvFILLp(pnl) > # define PadARRAY(pad) AvARRAY(pad) > # define PadMAX(pad) AvFILLp(pad) > # define PadnameIsOUR(pn) !!(SvFLAGS(pn) & SVpad_OUR) > # define PadnameLEN(pn) SvCUR(pn) > # define PadnameOURSTASH(pn) SvOURSTASH(pn) > # define PadnameOUTER(pn) !!SvFAKE(pn) > # define PadnamePV(pn) (SvPOKp(pn) ? SvPVX(pn) : NULL) > # ifdef SvPAD_STATE > # define PadnameSTATE(pn) SvPAD_STATE(pn) > # else > # define PadnameSTATE(pn) 0 > # endif > # define PadnameSV(pn) pn > # define PadlistREFCNT(pl) 1 > #endif
Hi! Sorry for the late reply and thanks for the code. Could you come up with a set of test cases? They would make integration into D::PPP a lot easier. Thanks, Marcus