| 2534 | Py_GCC_ATTRIBUTE((format(printf, 2, 3))); |
| 2535 | |
| 2536 | static inline int |
| 2537 | PyBytesWriter_Format(PyBytesWriter *writer, const char *format, ...) |
| 2538 | { |
| 2539 | va_list vargs; |
| 2540 | va_start(vargs, format); |
| 2541 | PyObject *str = PyBytes_FromFormatV(format, vargs); |
| 2542 | va_end(vargs); |
| 2543 | |
| 2544 | if (str == NULL) { |
| 2545 | return -1; |
| 2546 | } |
| 2547 | int res = PyBytesWriter_WriteBytes(writer, |
| 2548 | PyBytes_AS_STRING(str), |
| 2549 | PyBytes_GET_SIZE(str)); |
| 2550 | Py_DECREF(str); |
| 2551 | return res; |
| 2552 | } |
| 2553 | #endif // PY_VERSION_HEX < 0x030F00A1 |
| 2554 | |
| 2555 |
nothing calls this directly
no test coverage detected