Commit 8ada517
committed
fix: replace
resolves #1434
Instead use [`PyList_GetItem()`] for python < 3.13 or [`PyList_GetItemRef()`] for python >= 3.13.
Both are part of the Stable ABI but also propagate errors.
Whereas the previous [`PyList_GET_ITEM()`] did not do any error checking and was not part of the Stable ABI.
[`PyList_GetItemRef()`]: https://docs.python.org/3/c-api/list.html#c.PyList_GetItemRef
[`PyList_GetItem()`]: https://docs.python.org/3/c-api/list.html#c.PyList_GetItem
[`PyList_GET_ITEM()`]: https://docs.python.org/3/c-api/list.html#c.PyList_GET_ITEMPyList_GET_ITEM()
1 parent 8fb06fa commit 8ada517
1 file changed
+24
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
599 | 599 | | |
600 | 600 | | |
601 | 601 | | |
602 | | - | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
603 | 610 | | |
604 | 611 | | |
605 | 612 | | |
| |||
1052 | 1059 | | |
1053 | 1060 | | |
1054 | 1061 | | |
1055 | | - | |
| 1062 | + | |
| 1063 | + | |
| 1064 | + | |
| 1065 | + | |
| 1066 | + | |
| 1067 | + | |
| 1068 | + | |
| 1069 | + | |
1056 | 1070 | | |
1057 | 1071 | | |
1058 | 1072 | | |
| |||
1135 | 1149 | | |
1136 | 1150 | | |
1137 | 1151 | | |
1138 | | - | |
| 1152 | + | |
| 1153 | + | |
| 1154 | + | |
| 1155 | + | |
| 1156 | + | |
| 1157 | + | |
| 1158 | + | |
| 1159 | + | |
1139 | 1160 | | |
1140 | 1161 | | |
1141 | 1162 | | |
| |||
0 commit comments