| 155 | } |
| 156 | |
| 157 | static gssize |
| 158 | garrow_input_stream_read(GInputStream *stream, |
| 159 | void *buffer, |
| 160 | gsize count, |
| 161 | GCancellable *cancellable, |
| 162 | GError **error) |
| 163 | { |
| 164 | if (g_cancellable_set_error_if_cancelled(cancellable, error)) { |
| 165 | return -1; |
| 166 | } |
| 167 | auto arrow_input_stream = garrow_input_stream_get_raw(GARROW_INPUT_STREAM(stream)); |
| 168 | auto n_read_bytes = arrow_input_stream->Read(count, buffer); |
| 169 | if (!garrow::check(error, n_read_bytes, "[input-stream][read]")) { |
| 170 | return -1; |
| 171 | } |
| 172 | return n_read_bytes.ValueOrDie(); |
| 173 | } |
| 174 | |
| 175 | static gssize |
| 176 | garrow_input_stream_skip(GInputStream *stream, |
nothing calls this directly
no test coverage detected