Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions src/ObjCRuntime/Dlfcn.cs
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,8 @@ public static ulong GetUInt64 (IntPtr handle, string symbol)
return (ulong) Marshal.ReadInt64 (indirect);
}

#if !XAMCORE_4_0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in general we put [Obsolete] on API we plan to remove
not sure it matter much in this case, the compiler should pick up the appropriate one...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@spouliot I've added the [Obsolete].

[Obsolete ("Use 'SetInt64' for long values instead.")]
public static void SetUInt64 (IntPtr handle, string symbol, long value)
{
var indirect = dlsym (handle, symbol);
Expand All @@ -219,6 +221,16 @@ public static void SetUInt64 (IntPtr handle, string symbol, long value)

Marshal.WriteInt64 (indirect, (long) value);
}
#endif

public static void SetUInt64 (IntPtr handle, string symbol, ulong value)
{
var indirect = dlsym (handle, symbol);
if (indirect == IntPtr.Zero)
return;

Marshal.WriteInt64 (indirect, (long) value);
}

public static void SetString (IntPtr handle, string symbol, string value)
{
Expand Down