Skip to content

Commit ca99b17

Browse files
committed
Remove Runtime._UCS dependency from CustomMarshaler
1 parent 52caf17 commit ca99b17

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

Python.Runtime/CustomMarshaler.cs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,11 @@ public static int GetUnicodeByteLength(IntPtr p)
9191
var len = 0;
9292
while (true)
9393
{
94-
int c = Runtime._UCS == 2
95-
? Marshal.ReadInt16(p, len * 2)
96-
: Marshal.ReadInt32(p, len * 4);
94+
#if UCS2
95+
int c = Marshal.ReadInt16(p, len * 2);
96+
#else
97+
int c = Marshal.ReadInt32(p, len * 4);
98+
#endif
9799

98100
if (c == 0)
99101
{

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy