develooper Front page | perl.perl5.porters | Postings from April 2008

RE: [perl #53244] perl-5.10.0-33733 assertion with JSON::XS-2.2

Thread Previous | Thread Next
Jan Dubois
April 25, 2008 17:21
RE: [perl #53244] perl-5.10.0-33733 assertion with JSON::XS-2.2
Message ID:
On Fri, 25 Apr 2008, Marc Lehmann wrote:
> On Fri, Apr 25, 2008 at 02:58:37PM +0100, Nicholas Clark <> wrote:
> > It can be fixed with the appended patch.
> This is especially troubling as the code goes to the expense of upgrading
> to SVt_PV before. If XS code cannot use SvCUR anymore after upgrading to
> SVt_PV then I would consider this a serious regression.

I don't think you should rely on SvCUR() to have any particular value if
SvPOK() isn't true.  I don't think this was ever guaranteed.

> At least the new requirement of having to check a private flag (which
> isn't explained anywhere) before calling SVCUR even on pv's should be
> clearly documented as a change in behaviour.

I don't think a CPAN module should _ever_ check the private flags. They
are for core Perl usage only.  At least that's how it used to be.  Isn't
checking SvPOK() before accessing SvCUR() doing the right thing for you?


Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About