| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1094,8 +1094,13 @@ internal static nint PyBuffer_SizeFromFormat(string format) | |||
| 1094 | 1094 | internal static bool PyInt_Check(BorrowedReference ob) | |
| 1095 | 1095 | => PyObject_TypeCheck(ob, PyLongType); | |
| 1096 | 1096 | ||
| 1097 | + internal static bool PyInt_CheckExact(BorrowedReference ob) | ||
| 1098 | + => PyObject_TypeCheckExact(ob, PyLongType); | ||
| 1099 | + | ||
| 1097 | 1100 | internal static bool PyBool_Check(BorrowedReference ob) | |
| 1098 | 1101 | => PyObject_TypeCheck(ob, PyBoolType); | |
| 1102 | + internal static bool PyBool_CheckExact(BorrowedReference ob) | ||
| 1103 | + => PyObject_TypeCheckExact(ob, PyBoolType); | ||
| 1099 | 1104 | ||
| 1100 | 1105 | internal static NewReference PyInt_FromInt32(int value) => PyLong_FromLongLong(value); | |
| 1101 | 1106 | ||
@@ -1141,6 +1146,8 @@ internal static NewReference PyLong_FromString(string value, int radix) | |||
| 1141 | 1146 | ||
| 1142 | 1147 | internal static bool PyFloat_Check(BorrowedReference ob) | |
| 1143 | 1148 | => PyObject_TypeCheck(ob, PyFloatType); | |
| 1149 | + internal static bool PyFloat_CheckExact(BorrowedReference ob) | ||
| 1150 | + => PyObject_TypeCheckExact(ob, PyFloatType); | ||
| 1144 | 1151 | ||
| 1145 | 1152 | /// <summary> | |
| 1146 | 1153 | /// Return value: New reference. | |
@@ -1282,9 +1289,9 @@ internal static bool PyFloat_Check(BorrowedReference ob) | |||
| 1282 | 1289 | // Python string API | |
| 1283 | 1290 | //==================================================================== | |
| 1284 | 1291 | internal static bool PyString_Check(BorrowedReference ob) | |
| 1285 | - { | ||
| 1286 | - return PyObject_TYPE(ob) == PyStringType; | ||
| 1287 | - } | ||
| 1292 | + => PyObject_TypeCheck(ob, PyStringType); | ||
| 1293 | + internal static bool PyString_CheckExact(BorrowedReference ob) | ||
| 1294 | + => PyObject_TypeCheckExact(ob, PyStringType); | ||
| 1288 | 1295 | ||
| 1289 | 1296 | internal static NewReference PyString_FromString(string value) | |
| 1290 | 1297 | { | |
@@ -1643,6 +1650,8 @@ internal static bool PyType_IsSubtype(BorrowedReference t1, BorrowedReference t2 | |||
| 1643 | 1650 | return Delegates.PyType_IsSubtype(t1, t2); | |
| 1644 | 1651 | } | |
| 1645 | 1652 | ||
| 1653 | + internal static bool PyObject_TypeCheckExact(BorrowedReference ob, BorrowedReference tp) | ||
| 1654 | + => PyObject_TYPE(ob) == tp; | ||
| 1646 | 1655 | internal static bool PyObject_TypeCheck(BorrowedReference ob, BorrowedReference tp) | |
| 1647 | 1656 | { | |
| 1648 | 1657 | BorrowedReference t = PyObject_TYPE(ob); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments