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

Mailing List Archive: Perl: porters

[perl #112776] Uninitialized value $ExtUtils::ParseXS::num in subtraction

 

 

Perl porters RSS feed   Index | Next | Previous | View Threaded


perlbug-followup at perl

Jun 19, 2012, 9:58 PM

Post #1 of 1 (70 views)
Permalink
[perl #112776] Uninitialized value $ExtUtils::ParseXS::num in subtraction

On Tue May 08 06:34:12 2012, tonyc wrote:
> On Tue, May 08, 2012 at 10:13:58AM +0100, Nicholas Clark wrote:
> > On Tue, May 08, 2012 at 07:47:48AM +0200, Steffen Mueller wrote:
> > > On 05/06/2012 05:58 AM, Christopher J. Madsen via RT wrote:
> > > > On Sat May 05 20:53:41 2012, jkeenan wrote:
> > > >> Please review the patch attached.
> > > >
> > > > Well, I can confirm that it solves my problem, but I don't know
enough
> > > > about ExtUtils::ParseXS to be sure it's the right solution, or
if it's
> > > > just masking the real problem.
> > >
> > > That is precisely why I hadn't included a simple change like the
> > > proposed patch yet -- I am also not entirely certain about whether
it's
> > > a fix or just plaster. Jim's finding of key (var name) mismatches
does
> > > make it sound like there's a deeper issue.
> > >
> > > I'm on the fence on whether it's better to apply the patch to avoid
> > > confusing users or whether it's better not to in the hope that one of
> > > the affected users cares as much as Christopher and figures it out.
> > > Alas, I don't currently have the time to dig in myself.
> >
> > I fear that it's plaster, and hence applying it does nothing to
solve the
> > actual problem.
>
> There's one or both of two problems here:
>
> a) the generated Build forces $^W on, which isn't the normal state
> when the code is run within xsubpp
>
> b) the undefined value itself is caused because the:
>
> const char * s = SvPV(sv, len);
>
> in const-xs.inc is for a name that isn't a parameter.
>
> I can produce the same warning with code like:
>
> #include "EXTERN.h"
> #include "perl.h"
> #include "XSUB.h"
>
> #include "ppport.h"
>
> MODULE = Foo PACKAGE = Foo PREFIX = LIBMTP_
>
> PROTOTYPES: DISABLE
>
> void
> foo()
> const char *s = "world";
> CODE:
> printf("hello %s\n", s);
>
> I suspect the better change would be to change:
>
> my $arg = "ST(" . ($num - 1) . ")";
>
> to something along the lines of:
>
> my $arg = $num ? "ST(" . ($num - 1) . ")"
> : qq(die "$var isn't an argument\\n");

Just a reminder. :-)

--

Father Chrysostomos


---
via perlbug: queue: perl5 status: open
https://rt.perl.org:443/rt3/Ticket/Display.html?id=112776

Perl porters 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.