File: Init.pm

package info (click to toggle)
libffi-platypus-perl 2.11-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,860 kB
  • sloc: perl: 7,388; ansic: 6,862; cpp: 53; sh: 19; makefile: 14
file content (26 lines) | stat: -rw-r--r-- 385 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
package Init;

use strict;
use warnings;
use FFI::Platypus 2.00;

our $VERSION = '1.00';

{
  my $ffi = FFI::Platypus->new( api => 2 );

  my $say = $ffi->closure(sub {
    my $string = shift;
    print "$string\n";
  });

  $ffi->bundle([
    $ffi->cast( 'string' => 'opaque', $VERSION ),
    $ffi->cast( '(string)->void' => 'opaque', $say ),
  ]);

  undef $ffi;
  undef $say;
}

1;