Implicit float conversion in function calls by filmor · Pull Request #1908 · pythonnet/pythonnet · GitHub
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion src/runtime/Converter.cs
9 changes: 1 addition & 8 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 Expand Up @@ -1145,9 +1140,7 @@ internal static NewReference PyLong_FromString(string value, int radix)
}

internal static bool PyFloat_Check(BorrowedReference ob)
{
return PyObject_TYPE(ob) == PyFloatType;
}
=> PyObject_TypeCheck(ob, PyFloatType);

/// <summary>
/// Return value: New reference.
Expand Down
38 changes: 38 additions & 0 deletions tests/test_method.py