Skip to content
Closed
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Remove Runtime._UCS dependency from CustomMarshaler
  • Loading branch information
filmor committed Dec 15, 2019
commit ca99b178cf5f3a2835a1bc31b339969099ceb906
8 changes: 5 additions & 3 deletions Python.Runtime/CustomMarshaler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,11 @@ public static int GetUnicodeByteLength(IntPtr p)
var len = 0;
while (true)
{
int c = Runtime._UCS == 2
? Marshal.ReadInt16(p, len * 2)
: Marshal.ReadInt32(p, len * 4);
#if UCS2
int c = Marshal.ReadInt16(p, len * 2);
#else
int c = Marshal.ReadInt32(p, len * 4);
#endif

if (c == 0)
{
Expand Down