Skip to content

Commit

Permalink
Merge pull request #55 from fpl/no-platypus-declare
Browse files Browse the repository at this point in the history
Removed use of now discouraged FFI::Platypus::Declare module.
  • Loading branch information
shawnlaffan authored Oct 24, 2023
2 parents 3b63a13 + 82eac25 commit b3c7b76
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
6 changes: 3 additions & 3 deletions Changes
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Revision history for Perl extension Geo::GDAL::FFI

0.11
-
0.11 unreleased
- Removed use of to FFI::Platypus::Declare, now discouraged.

0.10 July 10, 2023
- Add dependency to FFI::Platypus::Declare
Expand Down Expand Up @@ -55,4 +55,4 @@ Revision history for Perl extension Geo::GDAL::FFI

0.01 Apr 6, 2018
- Included all basic functionality but lots of docs and methods to do.


1 change: 0 additions & 1 deletion Makefile.PL
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ use Config;
PREREQ_PM => {
PkgConfig => 0.23026,
FFI::Platypus => 0,
FFI::Platypus::Declare => 0,
PDL => 0,
Sort::Versions => 0,
Alien::gdal => 0,
Expand Down
4 changes: 2 additions & 2 deletions lib/Geo/GDAL/FFI/VSI/File.pm
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ use warnings;
use Encode qw(decode encode);
use Carp;
use FFI::Platypus::Buffer;
use FFI::Platypus::Declare;

our $VERSION = 0.1100;

Expand Down Expand Up @@ -45,7 +44,8 @@ sub Read {
sub Write {
my ($self, $buf) = @_;
my $len = do {use bytes; length($buf)};
my $address = cast 'string' => 'opaque', $buf;
my $ffi = FFI::Platypus->new();
my $address = $ffi->cast('string' => 'opaque', $buf);
return Geo::GDAL::FFI::VSIFWriteL($address, 1, $len, $self->{handle});
}

Expand Down

0 comments on commit b3c7b76

Please sign in to comment.