Skip to content

Commit d2ba88a

Browse files
committed
Replace bufLength with size
1 parent 198f654 commit d2ba88a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/runtime/runtime.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1669,7 +1669,7 @@ internal static unsafe IntPtr PyUnicode_FromKindAndString(int kind,
16691669
Encoding.UTF32.GetBytes(ps, s.Length, (byte*)mem, bufLength);
16701670
}
16711671

1672-
var result = PyUnicode_FromKindAndString(kind, mem, bufLength);
1672+
var result = PyUnicode_FromKindAndString(kind, mem, size);
16731673
return result;
16741674
}
16751675
finally
@@ -1734,7 +1734,7 @@ internal static unsafe IntPtr PyUnicode_FromUnicode(string s, int size)
17341734
Encoding.UTF32.GetBytes(ps, s.Length, (byte*)mem, bufLength);
17351735
}
17361736

1737-
var result = PyUnicode_FromUnicode(mem, bufLength);
1737+
var result = PyUnicode_FromUnicode(mem, size);
17381738
return result;
17391739
}
17401740
finally

0 commit comments

Comments
 (0)