Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit60c5f9d

Browse files
author
dse
committed
Interop fix for Py_ssize_t methods (it's produces problems only on NetCoreApp 2.0).
1 parentf5a002f commit60c5f9d

File tree

4 files changed

+220
-52
lines changed

4 files changed

+220
-52
lines changed

‎CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ This document follows the conventions laid out in [Keep a CHANGELOG][].
2121

2222
###Fixed
2323

24+
- Fixed interop methods with Py_ssize_t. NetCoreApp 2.0 is more sensitive than net40 and requires this fix.
2425
- Fixed Visual Studio 2017 compat (#434) for setup.py
2526
- Fixed crash on exit of the Python interpreter if a python class
2627
derived from a .NET class has a`__namespace__` or`__assembly__`

‎src/embed_tests/TestPySequence.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,8 @@ public void TestRepeat()
6969
PyObjectactual=t1.Repeat(3);
7070
Assert.AreEqual("FooFooFoo",actual.ToString());
7171

72-
// On 32 bit system this argument should be int, but on the 64 bit system this should be long value.
73-
// This works on the Framework 4.0 accidentally, it should produce out of memory!
74-
// actual = t1.Repeat(-3);
75-
// Assert.AreEqual("", actual.ToString());
72+
actual=t1.Repeat(-3);
73+
Assert.AreEqual("",actual.ToString());
7674
}
7775

7876
[Test]

‎src/runtime/exceptions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ public static void SetError(Exception e)
276276
/// </remarks>
277277
publicstaticboolErrorOccurred()
278278
{
279-
returnRuntime.PyErr_Occurred()!=0;
279+
returnRuntime.PyErr_Occurred()!=IntPtr.Zero;
280280
}
281281

282282
/// <summary>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp