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

Commit2194d6c

Browse files
committed
Drop PyLong_Check (which checked for exact type) in favour of PyInt_Check (which checks for subtype)
1 parenta02799d commit2194d6c

File tree

2 files changed

+1
-6
lines changed

2 files changed

+1
-6
lines changed

‎src/runtime/Converter.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -710,7 +710,7 @@ internal static bool ToPrimitive(BorrowedReference value, Type obType, out objec
710710
{
711711
if(Runtime.Is32Bit)
712712
{
713-
if(!Runtime.PyLong_Check(value))
713+
if(!Runtime.PyInt_Check(value))
714714
{
715715
gototype_error;
716716
}

‎src/runtime/Runtime.cs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1101,11 +1101,6 @@ internal static bool PyBool_Check(BorrowedReference ob)
11011101

11021102
internalstaticNewReferencePyInt_FromInt64(longvalue)=>PyLong_FromLongLong(value);
11031103

1104-
internalstaticboolPyLong_Check(BorrowedReferenceob)
1105-
{
1106-
returnPyObject_TYPE(ob)==PyLongType;
1107-
}
1108-
11091104
internalstaticNewReferencePyLong_FromLongLong(longvalue)=>Delegates.PyLong_FromLongLong(value);
11101105

11111106

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp