| 1608 | } |
| 1609 | |
| 1610 | int Fory_PyBindBufferToOutputStream(Buffer *buffer, OutputStream *output_stream, |
| 1611 | std::string *error_message) { |
| 1612 | if (buffer == nullptr) { |
| 1613 | *error_message = "buffer must not be null"; |
| 1614 | return -1; |
| 1615 | } |
| 1616 | if (output_stream == nullptr) { |
| 1617 | *error_message = "output stream must not be null"; |
| 1618 | return -1; |
| 1619 | } |
| 1620 | buffer->bind_output_stream(output_stream); |
| 1621 | return 0; |
| 1622 | } |
| 1623 | |
| 1624 | int Fory_PyClearBufferOutputStream(Buffer *buffer, std::string *error_message) { |
| 1625 | if (buffer == nullptr) { |
nothing calls this directly
no test coverage detected