Skip to content

Commit

Permalink
Merge pull request #11033 from EmilRybergAkson/feature/getmemfilebuff…
Browse files Browse the repository at this point in the history
…er-csharp

CSharp bindings: Add VSIGetMemFileBuffer bindings
  • Loading branch information
rouault authored Oct 29, 2024
2 parents 81a7b1a + 34afc2d commit 8fb79c4
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions swig/include/csharp/gdal_csharp.i
Original file line number Diff line number Diff line change
Expand Up @@ -378,3 +378,20 @@ public CPLErr SetGCPs(GCP[] pGCPs, string pszGCPProjection) {
}

%}

%rename (GetMemFileBuffer) wrapper_VSIGetMemFileBuffer;

%typemap(cstype) (vsi_l_offset *pnDataLength) "out ulong";
%typemap(imtype) (vsi_l_offset *pnDataLength) "out ulong";
%apply (unsigned long long *OUTPUT) {(vsi_l_offset *pnDataLength)}
%typemap(cstype) (int bUnlinkAndSeize) "bool";
%typemap(csin) (int bUnlinkAndSeize) "$csinput ? 1 : 0";

%inline {
GByte* wrapper_VSIGetMemFileBuffer(const char *utf8_path, vsi_l_offset *pnDataLength, int bUnlinkAndSeize)
{
return VSIGetMemFileBuffer(utf8_path, pnDataLength, bUnlinkAndSeize);
}
}

%clear (vsi_l_offset *pnDataLength);

0 comments on commit 8fb79c4

Please sign in to comment.