Displaying 1 result from an estimated 1 matches for "opaquepointer".
2013 Jan 24
0
Libguestfs with Perl 6 :-)
...to the
horrific mess that is Perl5 XS. The answer is that it is a thing of
beauty !
Here is the libguestfs hello world example in Perl6
$ dd if=/dev/zero of=guest.img bs=1M count=100
$ mke2fs guest.img
$ cat guestfs.p6
use NativeCall;
say "Defining stubs";
sub guestfs_create() returns OpaquePointer is native('libguestfs') {}
sub guestfs_add_drive(OpaquePointer $handle, Str $path) returns Int is native('libguestfs') {}
sub guestfs_launch(OpaquePointer $handle) returns Int is native('libguestfs') {}
sub guestfs_mount(OpaquePointer $handle, Str $path, Str $target) returns...