Alt-Math-Prime-FastSieve-Inline

 view release on metacpan or  search on metacpan

inc/Inline/C.pm  view on Meta::CPAN

use strict; use warnings;
package Inline::C;
our $VERSION = '0.71';

use Inline 0.56;
use Config;
use Data::Dumper;
use Carp;
use Cwd qw(cwd abs_path);
use File::Spec;
use constant IS_WIN32 => $^O eq 'MSWin32';
use if !IS_WIN32, Fcntl => ':flock';
use if IS_WIN32, 'Win32::Mutex';

our @ISA = qw(Inline);

#==============================================================================
# Register this module as an Inline language support module
#==============================================================================
sub register {
    return {
        language => 'C',
        # XXX Breaking this on purpose; let's see who screams
        # aliases => ['c'],
        type => 'compiled',
        suffix => $Config{dlext},
    };
}

#==============================================================================
# Validate the C config options
#==============================================================================
sub usage_validate {
    my $key = shift;
    return <<END;
The value of config option '$key' must be a string or an array ref

END
}

sub validate {
    my $o = shift;

    print STDERR "validate Stage\n" if $o->{CONFIG}{BUILD_NOISY};
    $o->{ILSM} ||= {};
    $o->{ILSM}{XS} ||= {};
    $o->{ILSM}{MAKEFILE} ||= {};
    if (not $o->UNTAINT) {
        require FindBin;
        $o->{ILSM}{MAKEFILE}{INC} = "-I\"$FindBin::Bin\""
            if not defined $o->{ILSM}{MAKEFILE}{INC};
    }
    $o->{ILSM}{AUTOWRAP} = 0 if not defined $o->{ILSM}{AUTOWRAP};
    $o->{ILSM}{XSMODE} = 0 if not defined $o->{ILSM}{XSMODE};
    $o->{ILSM}{AUTO_INCLUDE} ||= <<END;
#include "EXTERN.h"
#include "perl.h"
#include "XSUB.h"
#include "INLINE.h"
END
    $o->{ILSM}{FILTERS} ||= [];
    $o->{STRUCT} ||= {
        '.macros' => '',
        '.xs' => '',
        '.any' => 0,
        '.all' => 0,
    };

 view all matches for this distribution
 view release on metacpan -  search on metacpan

( run in 1.249 second using v1.00-cache-2.02-grep-82fe00e-cpan-2c419f77a38b )