Skip to content

Commit

Permalink
Encapsulate the interface into the implementing class
Browse files Browse the repository at this point in the history
  • Loading branch information
danipen committed May 6, 2023
1 parent e50fd0f commit d9e7464
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions src/TextMateSharp/Internal/Oniguruma/OnigInterop.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,20 @@

namespace TextMateSharp.Internal.Oniguruma
{
internal unsafe interface IOnigInterop
internal static class OnigInterop
{
IntPtr onigwrap_create(char* pattern, int len, int ignoreCase, int multiline);
IntPtr onigwrap_region_new();
void onigwrap_region_free(IntPtr region);
void onigwrap_free(IntPtr regex);
int onigwrap_search(IntPtr regex, char* text, int offset, int length, IntPtr region);
int onigwrap_num_regs(IntPtr region);
int onigwrap_pos(IntPtr region, int nth);
int onigwrap_len(IntPtr region, int nth);
}
internal unsafe interface IOnigInterop
{
IntPtr onigwrap_create(char* pattern, int len, int ignoreCase, int multiline);
IntPtr onigwrap_region_new();
void onigwrap_region_free(IntPtr region);
void onigwrap_free(IntPtr regex);
int onigwrap_search(IntPtr regex, char* text, int offset, int length, IntPtr region);
int onigwrap_num_regs(IntPtr region);
int onigwrap_pos(IntPtr region, int nth);
int onigwrap_len(IntPtr region, int nth);
}

internal unsafe class OnigInterop
{
internal static IOnigInterop Instance { get; private set; }

static OnigInterop()
Expand Down

0 comments on commit d9e7464

Please sign in to comment.