summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Markdown/GFM/SyntaxExtensionList.pm
blob: 06a9798c2bb1cc430c7a19e4a683a3be4099ec3b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
package Bugzilla::Markdown::GFM::SyntaxExtensionList;

use 5.10.1;
use strict;
use warnings;

sub SETUP {
    my ($class, $FFI) = @_;

    $FFI->custom_type(
        markdown_syntax_extension_list_t => {
            native_type    => 'opaque',
            native_to_perl => sub {
                bless \$_[0], $class if $_[0];
            },
            perl_to_native => sub { $_[0] ? ${ $_[0] } : 0 },
        }
    );
}

1;

__END__