Skip to content

Commit

Permalink
define bool as Interop.BOOL to prevent upper bytes setting native bool (
Browse files Browse the repository at this point in the history
#92681)

Co-authored-by: yowl <scott.waye@hubse.com>
  • Loading branch information
github-actions[bot] and yowl authored Sep 27, 2023
1 parent 8c68206 commit 7027ff1
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,12 @@ internal static class InternalCalls
[RuntimeExport("RhCollect")]
internal static void RhCollect(int generation, InternalGCCollectionMode mode, bool lowMemoryP = false)
{
RhpCollect(generation, mode, lowMemoryP);
RhpCollect(generation, mode, lowMemoryP ? Interop.BOOL.TRUE : Interop.BOOL.FALSE);
}

[DllImport(Redhawk.BaseName)]
[UnmanagedCallConv(CallConvs = new Type[] { typeof(CallConvCdecl) })]
private static extern void RhpCollect(int generation, InternalGCCollectionMode mode, bool lowMemoryP);
private static extern void RhpCollect(int generation, InternalGCCollectionMode mode, Interop.BOOL lowMemoryP);

[RuntimeExport("RhGetGcTotalMemory")]
internal static long RhGetGcTotalMemory()
Expand Down

0 comments on commit 7027ff1

Please sign in to comment.