FFI-C

 view release on metacpan or  search on metacpan

META.json  view on Meta::CPAN

            "Test::Strict" : "0",
            "YAML" : "0"
         }
      },
      "runtime" : {
         "requires" : {
            "Class::Inspector" : "0",
            "FFI::Platypus" : "1.24",
            "FFI::Platypus::Memory" : "0",
            "FFI::Platypus::Type::Enum" : "0.03",
            "Ref::Util" : "0",
            "Sub::Identify" : "0.05",
            "Sub::Install" : "0",
            "Sub::Util" : "0",
            "perl" : "5.008001"
         }
      },
      "test" : {
         "requires" : {
            "Capture::Tiny" : "0",
            "FFI::Platypus::Record" : "0",

META.yml  view on Meta::CPAN

  version: '1.4'
name: FFI-C
no_index:
  directory:
    - examples
requires:
  Class::Inspector: '0'
  FFI::Platypus: '1.24'
  FFI::Platypus::Memory: '0'
  FFI::Platypus::Type::Enum: '0.03'
  Ref::Util: '0'
  Sub::Identify: '0.05'
  Sub::Install: '0'
  Sub::Util: '0'
  perl: '5.008001'
resources:
  IRC: irc://irc.perl.org/#native
  bugtracker: https://github.com/PerlFFI/FFI-C/issues
  homepage: https://metacpan.org/pod/FFI::C
  repository: git://github.com/PerlFFI/FFI-C.git
version: '0.15'

Makefile.PL  view on Meta::CPAN

    "lib/FFI/C/StructDef.pm" => "\$(INST_LIB)/FFI/C/StructDef.pm",
    "lib/FFI/C/Union.pm"     => "\$(INST_LIB)/FFI/C/Union.pm",
    "lib/FFI/C/UnionDef.pm"  => "\$(INST_LIB)/FFI/C/UnionDef.pm",
    "lib/FFI/C/Util.pm"      => "\$(INST_LIB)/FFI/C/Util.pm"
  },
  "PREREQ_PM" => {
    "Class::Inspector"          => 0,
    "FFI::Platypus"             => "1.24",
    "FFI::Platypus::Memory"     => 0,
    "FFI::Platypus::Type::Enum" => "0.03",
    "Ref::Util"                 => 0,
    "Sub::Identify"             => "0.05",
    "Sub::Install"              => 0,
    "Sub::Util"                 => 0
  },
  "TEST_REQUIRES" => {
    "Capture::Tiny"         => 0,
    "FFI::Platypus::Record" => 0,
    "Path::Tiny"            => 0,
    "Test2::V0"             => "0.000081"
  },

Makefile.PL  view on Meta::CPAN

);

my %FallbackPrereqs = (
  "Capture::Tiny"             => 0,
  "Class::Inspector"          => 0,
  "FFI::Platypus"             => "1.24",
  "FFI::Platypus::Memory"     => 0,
  "FFI::Platypus::Record"     => 0,
  "FFI::Platypus::Type::Enum" => "0.03",
  "Path::Tiny"                => 0,
  "Ref::Util"                 => 0,
  "Sub::Identify"             => "0.05",
  "Sub::Install"              => 0,
  "Sub::Util"                 => 0,
  "Test2::V0"                 => "0.000081"
);

unless ( eval { ExtUtils::MakeMaker->VERSION(6.63_03) } ) {
  delete $WriteMakefileArgs{TEST_REQUIRES};
  delete $WriteMakefileArgs{BUILD_REQUIRES};
  $WriteMakefileArgs{PREREQ_PM} = \%FallbackPrereqs;

lib/FFI/C.pm  view on Meta::CPAN

package FFI::C;

use strict;
use warnings;
use 5.008001;
use Carp ();
use Ref::Util qw( is_ref is_plain_arrayref is_plain_hashref );

# ABSTRACT: C data types for FFI
our $VERSION = '0.15'; # VERSION


our %ffi;

sub _ffi_get
{
  my($filename) = @_;

lib/FFI/C/ArrayDef.pm  view on Meta::CPAN

package FFI::C::ArrayDef;

use strict;
use warnings;
use 5.008001;
use Ref::Util qw( is_blessed_ref is_ref is_plain_arrayref );
use FFI::C::Array;
use Sub::Install ();
use Sub::Util ();
use Scalar::Util qw( refaddr );
use base qw( FFI::C::Def );

our @CARP_NOT = qw( FFI::C );

# ABSTRACT: Array data definition for FFI
our $VERSION = '0.15'; # VERSION

lib/FFI/C/Def.pm  view on Meta::CPAN

package FFI::C::Def;

use strict;
use warnings;
use 5.008001;
use FFI::C::FFI qw( malloc memset );
use FFI::C::Util;
use Ref::Util qw( is_blessed_ref is_ref is_plain_hashref is_plain_arrayref );
use Sub::Install ();
use Sub::Util ();

our @CARP_NOT = qw( FFI::C );

# ABSTRACT: Data definition for FFI
our $VERSION = '0.15'; # VERSION


sub new

lib/FFI/C/Def.pm  view on Meta::CPAN

    owner => $owner,
  }, $class;

  FFI::C::Util::perl_to_c($inst, $_[0]) if @_ == 1 && is_plain_hashref $_[0];

  $inst;
}

package FFI::Platypus::Type::CDef;

use Ref::Util qw( is_blessed_ref );

push @FFI::Platypus::CARP_NOT, __PACKAGE__;

sub ffi_custom_type_api_1
{
  my(undef, undef, %args) = @_;

  my $perl_to_native;
  my $native_to_perl;

lib/FFI/C/Struct.pm  view on Meta::CPAN

package FFI::C::Struct;

use strict;
use warnings;
use FFI::C::Util;
use FFI::C::FFI ();
use Ref::Util qw( is_ref is_plain_arrayref );

# ABSTRACT: Structured data instance for FFI
our $VERSION = '0.15'; # VERSION


sub AUTOLOAD
{
  our $AUTOLOAD;
  my $self = shift;
  my $name = $AUTOLOAD;

lib/FFI/C/StructDef.pm  view on Meta::CPAN

package FFI::C::StructDef;

use strict;
use warnings;
use 5.008001;
use FFI::C::Util;
use FFI::C::Struct;
use FFI::C::FFI ();
use FFI::Platypus 1.24;
use Ref::Util qw( is_blessed_ref is_plain_arrayref is_ref );
use Carp ();
use Sub::Install ();
use Sub::Util ();
use Scalar::Util qw( refaddr );
use constant _is_union => 0;
use base qw( FFI::C::Def );

our @CARP_NOT = qw( FFI::C::Util FFI::C );

# ABSTRACT: Structured data definition for FFI

lib/FFI/C/Util.pm  view on Meta::CPAN

package FFI::C::Util;

use strict;
use warnings;
use 5.008001;
use Ref::Util qw( is_blessed_ref is_plain_arrayref is_plain_hashref is_ref is_blessed_hashref );
use Sub::Identify 0.05 ();
use Carp ();
use Class::Inspector;
use base qw( Exporter );

our @EXPORT_OK = qw( perl_to_c c_to_perl take owned set_array_count addressof );

# ABSTRACT: Utility functions for dealing with structured C data
our $VERSION = '0.15'; # VERSION

t/00_diag.t  view on Meta::CPAN

$modules{$_} = $_ for qw(
  Capture::Tiny
  Class::Inspector
  ExtUtils::MakeMaker
  FFI::Platypus
  FFI::Platypus::Memory
  FFI::Platypus::Record
  FFI::Platypus::Type::Enum
  Math::Int64
  Path::Tiny
  Ref::Util
  Sub::Identify
  Sub::Install
  Sub::Util
  Test2::V0
);



my @modules = sort keys %modules;



( run in 0.328 second using v1.01-cache-2.11-cpan-a5abf4f5562 )