Skip to content

Commit 652bd49

Browse files
zavubGitHub Enterprise
authored andcommitted
fix output value for bool type (#3)
1 parent 47fb051 commit 652bd49

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

DSPythonNet3/DSPythonNet3Evaluator.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -563,7 +563,8 @@ public override object OutputDataMarshaler
563563
}
564564
}
565565
// Special case for big long values: decode them as BigInteger
566-
if (PyInt.IsIntType(pyObj))
566+
var unmarshalled = pyObj.AsManagedObject(typeof(object));
567+
if (unmarshalled is PyInt)
567568
{
568569
using (var pyLong = PyInt.AsInt(pyObj))
569570
{
@@ -578,7 +579,6 @@ public override object OutputDataMarshaler
578579
}
579580
}
580581
// Default handling for other Python objects
581-
var unmarshalled = pyObj.AsManagedObject(typeof(object));
582582
if (unmarshalled is PyObject)
583583
{
584584
using (unmarshalled as PyObject)

0 commit comments

Comments
 (0)