Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Package-Stash-XS CPAN distribution.

Report information
The Basics
Id: 64995
Status: resolved
Priority: 0/
Queue: Package-Stash-XS

Owner: Nobody in particular
Requestors: davem [...]

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

Subject: GvCV and GvGP lvalue changes in perl core
Date: Fri, 21 Jan 2011 16:29:47 +0000
To: bug-Package-Stash-XS [...]
From: Dave Mitchell <davem [...]>
Download (untitled) / with headers
text/plain 870b
Hi, A search of sources on CPAN shows that your module(s) use GvCV() and/or GvGP() in an lvalue context (i.e. you assign to it). From perl 5.13.10 onwards, this will no longer be allowed, and you'll need to update your source code in such a way as to be compatible with both existing and the new perls. Probably the easiest way to do this is to add the following definitions: #ifndef GvCV_set # define GvCV_set(gv,cv) (GvGP(gv)->gp_cv = (cv)) #endif #ifndef GvGP_set # define GvGP_set(gv,gp) ((gv)->sv_u.svu_gp = (gp)) #endif then replace code like the following: GvGP(gv) = gp; GvCV(gv) = cv; with GvGP_set(gv, gp); GvCV_set(gv, cv); If you do something like SAVEGENERICSV(&(GvCV(gv))) then you may need to replace it with a custom SAVEDESTRUCTOR() or similar that does a GvCV_set(gv,old_value) upon restoration.
Subject: Re: [ #64995] AutoReply: GvCV and GvGP lvalue changes in perl core
Date: Fri, 21 Jan 2011 17:37:25 +0000
To: Bugs in Package-Stash-XS via RT <bug-Package-Stash-XS [...]>
From: Dave Mitchell <davem [...]>
Download (untitled) / with headers
text/plain 448b
On Fri, Jan 21, 2011 at 11:29:56AM -0500, I wrote: Show quoted text
> # define GvCV_set(gv,cv) (GvGP(gv)->gp_cv = (cv))
[snip] Show quoted text
> # define GvGP_set(gv,gp) ((gv)->sv_u.svu_gp = (gp))
Actually on reflection, those could be better written as: #define GvCV_set(gv, cv) (GvCV(gv) = (cv)) #define GvGP_set(gv, gp) (GvGP(gv) = (gp)) -- "Do not dabble in paradox, Edward, it puts you in danger of fortuitous wit." -- Lady Croom, "Arcadia"
Fixed in 0.21.

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to