Skip to content

Commit

Permalink
Unsafe
Browse files Browse the repository at this point in the history
Signed-off-by: Anand Krishnamoorthi <[email protected]>
  • Loading branch information
anakrish committed May 25, 2024
1 parent 9e81444 commit 6b70b1d
Showing 1 changed file with 24 additions and 6 deletions.
30 changes: 24 additions & 6 deletions bindings/csharp/Regorus.cs
Original file line number Diff line number Diff line change
Expand Up @@ -139,32 +139,50 @@ public string EvalRule(string rule)

public void SetEnableCoverage(bool enable)
{
CheckAndDropResult(RegorusFFI.API.regorus_engine_set_enable_coverage(E, enable));
unsafe
{
CheckAndDropResult(RegorusFFI.API.regorus_engine_set_enable_coverage(E, enable));
}
}

public void ClearCoverageData()
{
CheckAndDropResult(RegorusFFI.API.regorus_engine_set_clear_coverage_data(E));
unsafe
{
CheckAndDropResult(RegorusFFI.API.regorus_engine_set_clear_coverage_data(E));

Check failure on line 152 in bindings/csharp/Regorus.cs

View workflow job for this annotation

GitHub Actions / test

'API' does not contain a definition for 'regorus_engine_set_clear_coverage_data'

Check failure on line 152 in bindings/csharp/Regorus.cs

View workflow job for this annotation

GitHub Actions / test

'API' does not contain a definition for 'regorus_engine_set_clear_coverage_data'
}
}

public string GetCoverageReport()
{
return CheckAndDropResult(RegorusFFI.API.regorus_engine_get_coverage_report(E));
unsafe
{
return CheckAndDropResult(RegorusFFI.API.regorus_engine_get_coverage_report(E));
}
}

public string GetCoverageReportPretty()
{
return CheckAndDropResult(RegorusFFI.API.regorus_engine_get_coverage_report_pretty(E));
unsafe
{
return CheckAndDropResult(RegorusFFI.API.regorus_engine_get_coverage_report_pretty(E));
}
}

public void SetGatherPrints(bool enable)
{
CheckAndDropResult(RegorusFFI.API.regorus_engine_set_gather_prints(E, enable));
unsafe
{
CheckAndDropResult(RegorusFFI.API.regorus_engine_set_gather_prints(E, enable));
}
}

public string TakePrints()
{
return CheckAndDropResult(RegorusFFI.API.regorus_engine_take_prints(E));
unsafe
{
return CheckAndDropResult(RegorusFFI.API.regorus_engine_take_prints(E));
}
}

~Engine()
Expand Down

0 comments on commit 6b70b1d

Please sign in to comment.