Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Drop PyLong_Check (which checked for exact type) in favour of PyInt_C…
…heck (which checks for subtype)
  • Loading branch information
filmor committed Sep 19, 2022
commit 2194d6c3ee392b85825c01d134dbd68e7e91fc39
2 changes: 1 addition & 1 deletion src/runtime/Converter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -710,7 +710,7 @@ internal static bool ToPrimitive(BorrowedReference value, Type obType, out objec
{
if (Runtime.Is32Bit)
{
if (!Runtime.PyLong_Check(value))
if (!Runtime.PyInt_Check(value))
{
goto type_error;
}
Expand Down
5 changes: 0 additions & 5 deletions src/runtime/Runtime.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1101,11 +1101,6 @@ internal static bool PyBool_Check(BorrowedReference ob)

internal static NewReference PyInt_FromInt64(long value) => PyLong_FromLongLong(value);

internal static bool PyLong_Check(BorrowedReference ob)
{
return PyObject_TYPE(ob) == PyLongType;
}

internal static NewReference PyLong_FromLongLong(long value) => Delegates.PyLong_FromLongLong(value);


Expand Down