Skip to content

Commit

Permalink
Merge pull request #71 from gheber/master
Browse files Browse the repository at this point in the history
Fix for issue #68.
  • Loading branch information
hokb committed Jul 21, 2016
2 parents b4d327a + 5710bfd commit 52ea197
Show file tree
Hide file tree
Showing 7 changed files with 55 additions and 6 deletions.
7 changes: 7 additions & 0 deletions HDF.PInvoke.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,12 @@
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup>
<SignAssembly>true</SignAssembly>
</PropertyGroup>
<PropertyGroup>
<AssemblyOriginatorKeyFile>HDF.PInvoke.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Configuration" />
Expand Down Expand Up @@ -122,6 +128,7 @@
</ItemGroup>
<ItemGroup>
<None Include="app.config" />
<None Include="HDF.PInvoke.snk" />
<None Include="HDF5\H5Eglobals.csv" />
<None Include="HDF5\H5Pglobals.csv" />
<None Include="HDF5\H5Tglobals.csv" />
Expand Down
Binary file added HDF.PInvoke.snk
Binary file not shown.
30 changes: 29 additions & 1 deletion HDF5/H5Fpublic.cs
Original file line number Diff line number Diff line change
Expand Up @@ -373,10 +373,38 @@ public enum file_space_type_t
/// metadata items with checksum. Used by public routine
/// <code>H5F.get_metadata_read_retry_info</code>
/// </summary>
/*
*
* typedef struct H5F_retry_info_t {
* unsigned nbins;
* uint32_t *retries[H5F_NUM_METADATA_READ_RETRY_TYPES];
* } H5F_retry_info_t;
*
*/
public struct retry_info_t
{
public uint nbins;
public fixed uint32_t retries[NUM_METADATA_READ_RETRY_TYPES];
public IntPtr retries0;
public IntPtr retries1;
public IntPtr retries2;
public IntPtr retries3;
public IntPtr retries4;
public IntPtr retries5;
public IntPtr retries6;
public IntPtr retries7;
public IntPtr retries8;
public IntPtr retries9;
public IntPtr retries10;
public IntPtr retries11;
public IntPtr retries12;
public IntPtr retries13;
public IntPtr retries14;
public IntPtr retries15;
public IntPtr retries16;
public IntPtr retries17;
public IntPtr retries18;
public IntPtr retries19;
public IntPtr retries20;
}

/// <summary>
Expand Down
6 changes: 3 additions & 3 deletions Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
// associated with an assembly.
[assembly: AssemblyTitle("HDF.PInvoke")]
[assembly: AssemblyDescription(".NET interop with native HDF5 libraries")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyCompany("The HDF Group")]
[assembly: AssemblyProduct("HDF.PInvoke")]
[assembly: AssemblyCopyright("Copyright © 2015")]
[assembly: AssemblyCopyright("Copyright © 2016")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

Expand Down Expand Up @@ -42,4 +42,4 @@
#else
[assembly: AssemblyVersion("1.8.17.0")]
[assembly: AssemblyFileVersion("1.8.17.0")]
#endif
#endif
13 changes: 13 additions & 0 deletions UnitTests/H5SWMRTest/H5Fget_metadata_read_retry_info.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,22 @@ public partial class H5SWMRTest
public void H5Fget_metadata_read_retry_infoTestSWMR1()
{
H5F.retry_info_t info = new H5F.retry_info_t();

info.retries0 = new IntPtr(10);
info.retries6 = new IntPtr(60);
info.retries14 = new IntPtr(140);
info.retries20 = new IntPtr(200);

Assert.IsTrue(
H5F.get_metadata_read_retry_info(m_v3_test_file_swmr,
ref info) >= 0);

Assert.IsTrue(info.nbins == 2);

Assert.IsTrue(info.retries0 == IntPtr.Zero);
Assert.IsTrue(info.retries6 == IntPtr.Zero);
Assert.IsTrue(info.retries14 == IntPtr.Zero);
Assert.IsTrue(info.retries20 == IntPtr.Zero);
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions UnitTests/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
[assembly: AssemblyTitle("UnitTests")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyCompany("The HDF Group")]
[assembly: AssemblyProduct("UnitTests")]
[assembly: AssemblyCopyright("Copyright © 2015")]
[assembly: AssemblyCopyright("Copyright © 2016")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

Expand Down
1 change: 1 addition & 0 deletions UnitTests/UnitTests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,7 @@
<Compile Include="H5STest\H5Screate_simple.cs" />
<Compile Include="H5SWMRTest\H5Dflush.cs" />
<Compile Include="H5SWMRTest\H5Drefresh.cs" />
<Compile Include="H5SWMRTest\H5Fget_metadata_read_retry_info.cs" />
<Compile Include="H5SWMRTest\H5Fstart_mdc_logging.cs" />
<Compile Include="H5SWMRTest\H5Pget_mdc_log_options.cs" />
<Compile Include="H5SWMRTest\H5Pset_mdc_log_options.cs" />
Expand Down

0 comments on commit 52ea197

Please sign in to comment.