| 833 | } |
| 834 | |
| 835 | static inline int |
| 836 | PyDict_GetItemStringRef(PyObject *mp, const char *key, PyObject **result) |
| 837 | { |
| 838 | int res; |
| 839 | #if PY_VERSION_HEX >= 0x03000000 |
| 840 | PyObject *key_obj = PyUnicode_FromString(key); |
| 841 | #else |
| 842 | PyObject *key_obj = PyString_FromString(key); |
| 843 | #endif |
| 844 | if (key_obj == NULL) { |
| 845 | *result = NULL; |
| 846 | return -1; |
| 847 | } |
| 848 | res = PyDict_GetItemRef(mp, key_obj, result); |
| 849 | Py_DECREF(key_obj); |
| 850 | return res; |
| 851 | } |
| 852 | #endif |
| 853 | |
| 854 |
nothing calls this directly
no test coverage detected