Skip to content

Commit

Permalink
fix output value for bool type
Browse files Browse the repository at this point in the history
  • Loading branch information
zavub committed Oct 3, 2024
1 parent d867f14 commit 6fae0c4
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Libraries/DSCPython/CPythonEvaluator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -556,7 +556,9 @@ public override object OutputDataMarshaler
}
}
// Special case for big long values: decode them as BigInteger
if (PyInt.IsIntType(pyObj))

var unmarshalled = pyObj.AsManagedObject(typeof(object));
if (unmarshalled is PyInt)
{
using (var pyLong = PyInt.AsInt(pyObj))
{
Expand All @@ -570,8 +572,8 @@ public override object OutputDataMarshaler
}
}
}

// Default handling for other Python objects
var unmarshalled = pyObj.AsManagedObject(typeof(object));
if (unmarshalled is PyObject)
{
using (unmarshalled as PyObject)
Expand Down

0 comments on commit 6fae0c4

Please sign in to comment.