NAME
FFI::Platypus::Type::GoString - Go String type for Platypus
VERSION
version 0.03
SYNOPSIS
use FFI::Platypus 1.00;
my $ffi = FFI::Platypus->new( api => 1 );
$ffi->load_custom_type('::GoString' => 'gostring');
$ffi->function( some_go_function => [ 'gostring' ] )->call("hello there!");
DESCRIPTION
This Platypus custom types lets you pass strings transparently into Go code without having to create/pass FFI::Go::String types manually. Under the covers FFI::Go::String is used.
The Go language plugin FFI::Platypus::Lang::Go will load this custom type automatically, so probably best to just do this:
use FFI::Platypus 1.00;
my $ffi = FFI::Platypus->new( api => 1, lang => 'Go' );
$ffi->function( some_go_function => [ 'gostring' ] )->call("hello there!");
Functions that return a string are not supported, as calling such functions outside of Go are not currently supported.
AUTHOR
Author: Graham Ollis <plicease@cpan.org>
Contributors:
Graham TerMarsch (GTERMARS)
COPYRIGHT AND LICENSE
This software is copyright (c) 2018-2022 by Graham Ollis.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.