| 730 | // PyMapping_GetOptionalItemString() to Python 3.13.0a1 |
| 731 | #if PY_VERSION_HEX < 0x030D00A1 |
| 732 | static inline int |
| 733 | PyMapping_GetOptionalItem(PyObject *obj, PyObject *key, PyObject **result) |
| 734 | { |
| 735 | *result = PyObject_GetItem(obj, key); |
| 736 | if (*result) { |
| 737 | return 1; |
| 738 | } |
| 739 | if (!PyErr_ExceptionMatches(PyExc_KeyError)) { |
| 740 | return -1; |
| 741 | } |
| 742 | PyErr_Clear(); |
| 743 | return 0; |
| 744 | } |
| 745 | |
| 746 | static inline int |
| 747 | PyMapping_GetOptionalItemString(PyObject *obj, const char *key, PyObject **result) |
no outgoing calls
no test coverage detected