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

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

Thread Next
From:
ugexe via RT
Date:
October 16, 2014 13:09
Subject:
[perl #122985] XS CLEANUP after a PPCODE block. Doc discrepancy or bug?
Message ID:
rt-4.0.18-6609-1413418252-449.122985-15-0@perl.org
On Wed Oct 15 16:16:45 2014, jkeenan wrote:
> On Wed Oct 15 13:34:25 2014, ugexe@cpan.org 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 ()
PPCODE:
    XSRETURN_UNDEF;
CLEANUP:


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

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

WriteMakefile(%WriteMakefileArgs);


[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 Demo.bs
/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
https://rt.perl.org/Ticket/Display.html?id=122985

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About