Skip to content

Commit f061d28

Browse files
committed
Revert stuff that I don't understand
1 parent d084b2e commit f061d28

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

AUTHORS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
- Meinrad Recheis ([@henon](https://github.com/henon))
5656
- Mohamed Koubaa ([@koubaa](https://github.com/koubaa))
5757
- Patrick Stewart ([@patstew](https://github.com/patstew))
58-
- Peter Kese ([@patstew](https://github.com/pkese))
58+
- Peter Kese ([@pkese](https://github.com/pkese))
5959
- Raphael Nestler ([@rnestler](https://github.com/rnestler))
6060
- Rickard Holmberg ([@rickardraysearch](https://github.com/rickardraysearch))
6161
- Sam Winstanley ([@swinstanley](https://github.com/swinstanley))

src/runtime/runtime.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1619,12 +1619,12 @@ internal static string GetManagedString(IntPtr op)
16191619
if (type == PyUnicodeType)
16201620
{
16211621
using var p = PyUnicode_AsUTF16String(new BorrowedReference(op));
1622-
var bytesPtr = p.DangerousMoveToPointerOrNull();
1623-
nint bytesLength = (nint)Runtime.PyBytes_Size(bytesPtr);
1622+
var bytesPtr = p.DangerousGetAddress();
1623+
int bytesLength = (int)Runtime.PyBytes_Size(bytesPtr);
16241624
char* codePoints = (char*)PyBytes_AsString(bytesPtr);
16251625
return new string(codePoints,
16261626
startIndex: 1, // skip BOM
1627-
length: (int) (bytesLength/2-1)); // utf16 - BOM
1627+
length: bytesLength/2-1); // utf16 - BOM
16281628
}
16291629

16301630
return null;

0 commit comments

Comments
 (0)