| 1413 | } |
| 1414 | |
| 1415 | static inline int |
| 1416 | PyUnicodeWriter_WriteStr(PyUnicodeWriter *writer, PyObject *obj) |
| 1417 | { |
| 1418 | PyObject *str = PyObject_Str(obj); |
| 1419 | if (str == NULL) { |
| 1420 | return -1; |
| 1421 | } |
| 1422 | |
| 1423 | int res = _PyUnicodeWriter_WriteStr((_PyUnicodeWriter*)writer, str); |
| 1424 | Py_DECREF(str); |
| 1425 | return res; |
| 1426 | } |
| 1427 | |
| 1428 | static inline int |
| 1429 | PyUnicodeWriter_WriteRepr(PyUnicodeWriter *writer, PyObject *obj) |