----- Original Message ----- From: "David Oswald" <daosw...@gmail.com>
To: <inline@perl.org>
Sent: Monday, May 07, 2012 6:08 PM
Subject: FYI: Inline::CPP v0.39 released


I've uploaded Inline::CPP v0.39 to CPAN.

No problems here - it works fine for all my MinGW-built perls.

I've just uploaded InlineX-CPP2XS-0.21, which now has the capability of writing a portable Makefile.PL and xs file - by specifying WRITE_MAKEFILE_PL => 'p' (or --write_makefile_pl=p if you use the cpp2xs utility).

The test script (t_portability.t) uses the Math::Primes::FastSieve demo to do some checking. It just checks that the expected files are generated, and does some sanity checks on them.

One thing I noticed in CPP.pm's validate subroutine is that it does:

#################################
$o->{ILSM}{AUTO_INCLUDE} ||= $auto_include;
$o->{ILSM}{AUTO_INCLUDE} =   $flavor_defs  .  $o->{ILSM}{AUTO_INCLUDE};
#################################

(You've probably always done it that way - I haven't checked.)

For the purposes of InlineX::CPP2XS (and perhaps other purposes, too), it would make things easier if it did:

#################################
$o->{ILSM}{AUTO_INCLUDE} ||= $flavor_defs . $auto_include;
#################################

But I don't know whether that fixes a bug in validate(), or creates one, or does neither. As regards the tests in the I::CPP test suite it seems we can do it either way, and it makes no difference.

In case you haven't spotted the relevance, validate() will currently always prepend auto_include with $flavor_defs. But you can avoid that if you use the latter. And, for portability, we don't want the contents of $flavor_defs to appear anywhere in the shipped C++ source code - hence the relevance to InlineX::CPP2XS.

(Btw, don't stress about this .... I already have "workarounds" in place, anyway :-)

Cheers,
Rob



Reply via email to