8000 use .NET Standard 2.0 platform detection features · pythonnet/pythonnet@47e926e · GitHub
[go: up one dir, main page]

Skip to content

Commit 47e926e

Browse files
committed
use .NET Standard 2.0 platform detection features
1 parent 909ed1f commit 47e926e

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

src/runtime/platform/NativeCodePage.cs

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,20 @@ class NativeCodePageHelper
88
{
99
/// <summary>
1010
/// Initialized by InitializeNativeCodePage.
11-
///
11+
/// <para>
1212
/// This points to a page of memory allocated using mmap or VirtualAlloc
1313
/// (depending on the system), and marked read and execute (not write).
1414
/// Very much on purpose, the page is *not* released on a shutdown and
1515
/// is instead leaked. See the TestDomainReload test case.
16-
///
16+
/// </para>
17+
/// <para>
1718
/// The contents of the page are two native functions: one that returns 0,
1819
/// one that returns 1.
19-
///
20+
/// </para>
21+
/// <para>
2022
/// If python didn't keep its gc list through a Py_Finalize we could remove
2123
/// this entire section.
24+
/// </para>
2225
/// </summary>
2326
internal static IntPtr NativeCodePage = IntPtr.Zero;
2427

@@ -95,10 +98,11 @@ public static NativeCode Active
9598
};
9699

97100
/// <summary>
98-
/// Code for X86.
99-
///
101+
/// <para>Code for X86.</para>
102+
/// <para>
100103
/// It's bitwise identical to X86_64, so we just point to it.
101104
/// <see cref="NativeCode.X86_64"/>
105+
/// </para>
102106
/// </summary>
103107
public static readonly NativeCode I386 = X86_64;
104108
}
@@ -145,7 +149,7 @@ public void SetReadExec(IntPtr mappedMemory, int numBytes)
145149
}
146150
}
147151

148-
class UnixMemoryMapper : IMemoryMapper
152+
class PosixMemoryMapper : IMemoryMapper
149153
{
150154
const int PROT_READ = 0x1;
151155
const int PROT_WRITE = 0x2;
@@ -196,7 +200,7 @@ internal static IMemoryMapper CreateMemoryMapper()
196200
else
197201
{
198202
// Linux, OSX, FreeBSD
199-
return new UnixMemoryMapper();
203+
return new PosixMemoryMapper();
200204
}
201205
}
202206

0 commit comments

Comments
 (0)
0