Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: ModPerl: Dev

Fwd: [rt.cpan.org #64999] GvCV and GvGP lvalue changes in perl core

 

 

ModPerl dev RSS feed   Index | Next | Previous | View Threaded


fred at redhotpenguin

Jan 21, 2011, 8:38 AM

Post #1 of 2 (296 views)
Permalink
Fwd: [rt.cpan.org #64999] GvCV and GvGP lvalue changes in perl core

---------- Forwarded message ----------
From: Dave Mitchell via RT <bug-mod_perl [at] rt>
Date: Fri, Jan 21, 2011 at 8:37 AM
Subject: [rt.cpan.org #64999] GvCV and GvGP lvalue changes in perl core
To:


Fri Jan 21 11:37:33 2011: Request 64999 was acted upon.
Transaction: Ticket created by davem [at] iabyn
      Queue: mod_perl
    Subject: GvCV and GvGP lvalue changes in perl core
  Broken in: (no value)
   Severity: (no value)
      Owner: Nobody
 Requestors: davem [at] iabyn
     Status: new
 Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=64999 >


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.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe [at] perl
For additional commands, e-mail: dev-help [at] perl


torsten.foertsch at gmx

Jan 21, 2011, 10:04 AM

Post #2 of 2 (275 views)
Permalink
Re: Fwd: [rt.cpan.org #64999] GvCV and GvGP lvalue changes in perl core [In reply to]

On Friday, January 21, 2011 17:38:48 Fred Moyer wrote:
> #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

probably better:

# define GvCV_set(gv, cv) (GvCV(gv)=(cv))
# define GvGP_set(gv, gp) (GvGP(gv)=(gp))

Torsten Förtsch

--
Need professional modperl support? Hire me! (http://foertsch.name)

Like fantasy? http://kabatinte.net

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe [at] perl
For additional commands, e-mail: dev-help [at] perl

ModPerl dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.