Commit c4325dd
committed
Allow implicit safe conversion to System.Double/Single in method calls
Checking the exact type beforehand is unnecessary and `AsDouble` will
check whether `__float__` is available and call it.
This is not yet supported for integer types, which would use `__int__`
or `__index__` (for Python >=3.10), as the respective logic is for some
reason only implemented for `AsLongLong` and `AsLong`, not for the
unsigned counterparts and also not for the `AsSize_t` variants that we
are using.1 parent f1ef11d commit c4325dd
2 files changed
+27
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
777 | 777 | | |
778 | 778 | | |
779 | 779 | | |
780 | | - | |
781 | | - | |
782 | | - | |
783 | | - | |
784 | 780 | | |
785 | | - | |
| 781 | + | |
786 | 782 | | |
787 | 783 | | |
788 | 784 | | |
| |||
799 | 795 | | |
800 | 796 | | |
801 | 797 | | |
802 | | - | |
803 | | - | |
804 | | - | |
805 | | - | |
806 | 798 | | |
807 | | - | |
| 799 | + | |
808 | 800 | | |
809 | 801 | | |
810 | 802 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1256 | 1256 | | |
1257 | 1257 | | |
1258 | 1258 | | |
| 1259 | + | |
| 1260 | + | |
| 1261 | + | |
| 1262 | + | |
| 1263 | + | |
| 1264 | + | |
| 1265 | + | |
| 1266 | + | |
| 1267 | + | |
| 1268 | + | |
| 1269 | + | |
| 1270 | + | |
| 1271 | + | |
| 1272 | + | |
| 1273 | + | |
| 1274 | + | |
| 1275 | + | |
| 1276 | + | |
| 1277 | + | |
| 1278 | + | |
| 1279 | + | |
| 1280 | + | |
| 1281 | + | |
| 1282 | + | |
| 1283 | + | |
0 commit comments