Skip to content

Commit

Permalink
Trying to fix C# naming
Browse files Browse the repository at this point in the history
  • Loading branch information
barshaul committed Dec 19, 2023
1 parent 54b433b commit cd8639d
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
1 change: 0 additions & 1 deletion benchmarks/install_and_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ dataSize="100 4000"
clientCount="1"
chosenClients="all"
host="localhost"
host="localhost"
port=6379
tlsFlag="--tls"
javaTlsFlag="-tls"
Expand Down
8 changes: 4 additions & 4 deletions csharp/lib/AsyncClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -95,17 +95,17 @@ private void FailureCallback(ulong index)

private delegate void StringAction(ulong index, IntPtr str);
private delegate void FailureAction(ulong index);
[DllImport("libglide-rs", CallingConvention = CallingConvention.Cdecl, EntryPoint = "get")]
[DllImport("libglide_rs", CallingConvention = CallingConvention.Cdecl, EntryPoint = "get")]
private static extern void GetFfi(IntPtr client, ulong index, IntPtr key);

[DllImport("libglide-rs", CallingConvention = CallingConvention.Cdecl, EntryPoint = "set")]
[DllImport("libglide_rs", CallingConvention = CallingConvention.Cdecl, EntryPoint = "set")]
private static extern void SetFfi(IntPtr client, ulong index, IntPtr key, IntPtr value);

private delegate void IntAction(IntPtr arg);
[DllImport("libglide-rs", CallingConvention = CallingConvention.Cdecl, EntryPoint = "create_client")]
[DllImport("libglide_rs", CallingConvention = CallingConvention.Cdecl, EntryPoint = "create_client")]
private static extern IntPtr CreateClientFfi(String host, UInt32 port, bool useTLS, IntPtr successCallback, IntPtr failureCallback);

[DllImport("libglide-rs", CallingConvention = CallingConvention.Cdecl, EntryPoint = "close_client")]
[DllImport("libglide_rs", CallingConvention = CallingConvention.Cdecl, EntryPoint = "close_client")]
private static extern void CloseClientFfi(IntPtr client);

#endregion
Expand Down
1 change: 1 addition & 0 deletions csharp/lib/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ authors = ["Amazon Web Services"]
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[lib]
name = "glide_rs"
crate-type = ["cdylib"]

[dependencies]
Expand Down
4 changes: 2 additions & 2 deletions csharp/lib/Logger.cs
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,10 @@ public static void SetLoggerConfig(Level? level, string? filename = null)
#endregion public methods

#region FFI function declaration
[DllImport("libglide-rs", CallingConvention = CallingConvention.Cdecl, EntryPoint = "log")]
[DllImport("libglide_rs", CallingConvention = CallingConvention.Cdecl, EntryPoint = "log")]
private static extern void log(Int32 logLevel, byte[] logIdentifier, byte[] message);

[DllImport("libglide-rs", CallingConvention = CallingConvention.Cdecl, EntryPoint = "init")]
[DllImport("libglide_rs", CallingConvention = CallingConvention.Cdecl, EntryPoint = "init")]
private static extern Level InitInternalLogger(Int32 level, byte[]? filename);

#endregion
Expand Down
2 changes: 1 addition & 1 deletion csharp/lib/glide.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
</Target>

<ItemGroup Condition=" '$(OS)' == 'UNIX'">
<Content Include="$(MSBuildThisFileDirectory)target/release/libglide-rs.so">
<Content Include="$(MSBuildThisFileDirectory)target/release/libglide_rs.so">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<Link>%(FileName)%(Extension)</Link>
</Content>
Expand Down

0 comments on commit cd8639d

Please sign in to comment.