develooper Front page | perl.perl5.porters | Postings from October 2014

[perl #122985] XS CLEANUP after a PPCODE block. Doc discrepancy or bug?

Thread Next
ugexe via RT
October 16, 2014 13:09
[perl #122985] XS CLEANUP after a PPCODE block. Doc discrepancy or bug?
Message ID:
On Wed Oct 15 16:16:45 2014, jkeenan wrote:
> On Wed Oct 15 13:34:25 2014, wrote:
> > perlxs.pod: "When the CLEANUP: keyword is used it must follow any
> > CODE:, PPCODE:, or OUTPUT: blocks which are present in the XSUB."
> >
> > Should PPCODE not be listed here? If I put a CLEANUP after a PPCODE
> > make errors out with "PPCODE must be last thing"
> Could you provide the XS code in question?  (Please attach it to an
> email or to this RT.)
> Thank you very much.

> XS.xs
#include "EXTERN.h"
#include "perl.h"
#include "XSUB.h"

MODULE = Demo    PACKAGE = Demo

void *
some_func ()

> Makefile.PL
use strict;
use warnings;
use ExtUtils::MakeMaker ;

my %WriteMakefileArgs = (
  "AUTHOR"   => "ugexe <ugexe\>",
  "ABSTRACT" => "PPCODE must be last thing",
  "LICENSE"  => "perl",
  "NAME"     => "Demo",
  "VERSION"  => "0.01",


[nickl@db-server Demo]$ perl Makefile.PL
Generating a Unix-style Makefile
Writing Makefile for Demo
Writing MYMETA.yml and MYMETA.json
[nickl@db-server Demo]$ make
Running Mkbootstrap for Demo ()
chmod 644
/home/nickl/perl5/perlbrew/perls/perl-5.20.0/bin/perl /home/nickl/perl5/perlbrew/perls/perl-5.20.0/lib/5.20.0/ExtUtils/xsubpp  -typemap /home/nickl/perl5/perlbrew/perls/perl-5.20.0/lib/5.20.0/ExtUtils/typemap  Demo.xs > Demo.xsc && mv Demo.xsc Demo.c
PPCODE must be last thing in Demo.xs, line 11
make: *** [Demo.c] Error 1

via perlbug:  queue: perl5 status: open

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